0

I'm desperately trying to get Postfix to 'rewrite' the MAIL FROM envelope so that it's always in the form of: authenticated-user@$mydomain

I've been playing with the smtpd_sender_login_maps and smtpd_sender_restrictions options but these don't seem to provide anyway of forcing a certain value, merely accepting or rejecting the given value.

How can achieve this?

Thanks.

2 Answers 2

2

No you can't.

Currently, postfix rewriting feature only doing some mapping like sender_canonical_maps. It will rewrite the sender like from [email protected] to [email protected]. Also, postfix won't pass the SASL information to rewriting engine.

You need milter or some kind of content_filter to do that.

I've been playing with the smtpd_sender_login_maps and smtpd_sender_restrictions options but these don't seem to provide anyway of forcing a certain value, merely accepting or rejecting the given value.

That's principle design of MTA, it has ACL-like functionality (to reject or permit email). And yes, postfix still has limited rewriting capability. See Address Rewriting README.

-1

You probably want to use the generic maps feature. Take a look at:

http://www.postfix.org/SOHO_README.html

http://www.postfix.org/ADDRESS_REWRITING_README.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .