Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to rewrite a subject line based on recipient domain?

Status
Not open for further replies.

Chapter11

Technical User
Apr 15, 2002
791
US
My postfix machine accepts mail for several domains, and relays all of it on to internal mailservers. That works fine.

We are converting all of our mail to receive from a new domain, ie, "user@domain1.com" is also "user@domain2.com". Right now the world sends mail to user@domain1.com. We want to add some flag text to the subject lines of any mail sent to user@domain1.com, so users see an indication that this mail arrived on the old address. This should happen only for domain1.com-destined email, not any of the other domains I handle.

Possible or not?
 
You could write a filter for it. Basically you accept the mail then use the content_filter to send it to a new service which can manipulate the mail anyway you like. Look for articles on how to set up spam and virus filtering and use those as a model. The FILTER_README distributed with postfix has all the instructions you should need, but there are also howtos on the net.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top