aliasing the TO name in Unix mails

HI All,

I have a small question/clarification/doubt . Does anyone know how to provide alias in the mails that come from Unix servers.

Like i have a Unix server that generates status mails every hour for a scheduled job , it sends me mails with status with the ID in from field as "root@xyzsym.com" ( my server name) .

Some times when i add a new user to this then the new user finds the mails in Junk mail box as this is not a valid mail and this in not in his outlook contacts). Can there be aliasing provided in the mailx command to chnage the to field of the server from 'root@xyzsym.com' to 'alert-status@sym.com' ?

Please let me know

Thanks,
Sandeep

mailx has a somewhat cryptic -r option but if you have control over the script, use something else than mailx if it doesn't suit your needs. mailx doesn't really have any significant intelligence of its own, it just passes stuff to sendmail AFAIK, so you might as well invoke sendmail directly -- though then you have to be more careful to make sure the mail message is valid and has all the necessary headers. That would be To:, From:, and Subject:, basically.

 sendmail -oi -t <<HERE
From: alert-status@sym.com
To: sandy@xyz.com
Subject: it's this simple

really
HERE

does help but i thought it would be easier with mailx as lots of scripts i use this for alert mails and also sending maisl as attachment.

Welp, from reading the documentation a bit, it seems that the mailx -r option should indeed work, or if you can put a .mailrc file for root, you can set it there.