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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

POSTFIX - rewrite Envelope From

Status
Not open for further replies.

igfc

IS-IT--Management
Nov 22, 2011
1
Hi

I am running postfix 2.8.2-1ubuntu on Ubuntu 11.04. I am using authSMTP as a mail server where all external mail gets sent. This has a restriction on it that means that the authSMTP account will only accept mail if the Envelope From address is specifically "noreply@mydomain.com"

I have a java app on a server that sends mail from a form that a user fills in.
The user enters their email address and the recipients email address and the app generates the mail for delivery and passes it to postfix.

What I want to do is simply rewrite the Envelope From to the noreply@mydomain.com and leave all other fields the same (esp the From: header)

The problemI seem to be up against is the original envelope From from the app can have any old email address in it so I need to not care about the original and just make every mail have the same envelope From.
I have tried the sender_canonical_maps and sender_canonical_classes in main.cf but no joy.

Anyone help?

Iain
 
I would have to dig into the postfix documentation to follow up on the user mapping as it has been too long since I have looked at it.

However, I am also wondering if this might be better handled in your Java app? I assume that your app uses a mail call that effectively uses the sendmail (compatibility) command. One of the pieces of information would be the sender. Could you replaced the information that the user provides with the desired noreply@mydomain.com?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top