I have a mail server the receives email from a website. The website uses Amazon SES to send its email out. This email gets sent to somebody@HOST_A address. Then, the email client on the server has a filter installed to forward to a local address and then to an email address on another adrees, somebody@HOST_B.

The problem is that postfix server at HOST_B is rejecting the forwarded emails coming from HOST_A with a "Message rejected due to: SPF fail - not authorized."

I'm thinking the easiest solution is to just rewrite the "from" header on HOST_A before sending it off to HOST_B.

So I followed the instructions at http://www.postfix.org/ADDRESS_REWRITING_README.html#generic for generic mapping and set that up. I modified main.cf with:

smtp_generic_maps = hash:/etc/postfix/smtp_generic_map


and have this in the smtp_generic_maps file:

*@amazonses.com somebody@HOST_A

I also tried:

/*@amazonses.com/ somebody@HOST_A

Anyway, I postmapped and reloaded postfix. However, emails are still getting rejected and logs on HOST_B show emails are still coming from amazonses.com.

Anything else I can try?

Reply via email to