aliasing the TO name in Unix mails


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users aliasing the TO name in Unix mails
# 1  
Old 03-26-2008
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
# 2  
Old 03-26-2008
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.

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

really
HERE

# 3  
Old 03-26-2008
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.
# 4  
Old 03-26-2008
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to receive mails in unix .....

HI experts, By using mailx command i can send mails to any email id. and my DNS is like oper@xyz.com ..... but if someone replied to the mail sent earlier using mailx command. then how to recieve or view that mail ... Is dre any command to do the same ... Im working on some project and got... (7 Replies)
Discussion started by: ankitknit
7 Replies

2. UNIX for Advanced & Expert Users

Accessing outlook mails from unix

Hi, For a requirement in my project, i need to implement code in unix such that unix checks whether the necessary mails from a particular client is received in outook inbox. Note that, i ve to check whether that particular mail has got any attachment too.. Please tell me whether this is... (0 Replies)
Discussion started by: nazeembenazir
0 Replies

3. UNIX for Advanced & Expert Users

Checking Mails Using Unix

Hi..Is it possible for unix to monitor outlook for a particualr period of time and trigger oracle upon receiving a mail with particular content... Thanks in advance (1 Reply)
Discussion started by: varadharajan87
1 Replies

4. Shell Programming and Scripting

Set FLAG in MAils from UNIX

Is there any way i can set flag or change the color of the subject line of a mail sent from unix. ? (1 Reply)
Discussion started by: Gaurav Goyal
1 Replies

5. UNIX for Dummies Questions & Answers

aliasing question in UNIX

Folks; I know this might sound stupid, but Can i alias a web link to another web link in a UNIX server? Let say i have a web link named http://test.new.com/wiki Can i alias that so when i click on it or i type it in the browser address it opens but the link in the browser say something like:... (1 Reply)
Discussion started by: Katkota
1 Replies

6. Shell Programming and Scripting

Deleting some mails from Unix mail accounts

Hi there, Is there a way to delete some messages from the mail account on a Unix machine via a script?. Regards (0 Replies)
Discussion started by: JimJim
0 Replies

7. UNIX for Dummies Questions & Answers

mails from unix server are not being received

Both A and B people has mail client to mail client interaction happily. 1) mails from A company unix server 'uuu' are being received by A company people onto their mail client. So A company people are happy. 2) mails from A company unix server 'uuu' are not being received by B ... (4 Replies)
Discussion started by: vkandati
4 Replies

8. UNIX for Dummies Questions & Answers

Unix to MicroSoft Outlook Mails

I want to send a text file from Unix as an attachment to a Microsoft Outlook address. I have tried the 'elm' command which does this. But it is in an interactive mode. I want this to be automatically done by a program. Is there any other way to this? (3 Replies)
Discussion started by: Deepali Potnis
3 Replies
Login or Register to Ask a Question