Operating System - HP-UX
1825706 Members
3242 Online
109686 Solutions
New Discussion

Re: Rewriting subject of outgoing mail

 
Geoff Wild
Honored Contributor

Rewriting subject of outgoing mail

Ok - I looked all over for a ruleset in sendmail - but alas - none appear.

HP-UX by default uses Mlocal P=/usr/bin/rmail

No problem - I can change to procmail if need be...

We have our servers configured into a distribution list on an Exchange server - so that all email from Unix boxes appears to come from a Generic email account we call unixteam.

Unfortunately, you can NOT tell which server sent the original message...

What I want, is to be able to re-write the Subject to include the hostname.

How can I do this? I'm pretty sure I can do something with .procmailrc - but I am unfamiliar with procmail...

This has to happen on all outgoing messages...

Thanks...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
4 REPLIES 4
Michael Schulte zur Sur
Honored Contributor

Re: Rewriting subject of outgoing mail

Hi,

what about mailx -s "from server bla"
?

greetings,

Michael
James A. Donovan
Honored Contributor

Re: Rewriting subject of outgoing mail

This might help you.

http://user.it.uu.se/~erikb/subject.html
Remember, wherever you go, there you are...
Geoff Wild
Honored Contributor

Re: Rewriting subject of outgoing mail

Michael - sorry - won't work as not all email from root is sent that way (scripts, cron, etc...).

Jim - yeah - I saw that - but not too sure how to implement - as he is redirecting locally - I just need to know what to put in root's .procmailrc file to rewrite the subject of all outgoing emails...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: Rewriting subject of outgoing mail

ping...
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.