On 19 Jan 2019, at 4:03, Yasuhiro KIMURA wrote:
Hello,
I use Debian 9 on AWS EC2. If mail is sent directly from EC2 host then
some mail service provider such as Gmail rejects receiving it. So I
set up
so that mail is sent through AWS SES with following steps.
1. Obtain SES SMTP credential accoring to following document
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html
2. Verify domain with SES accoring to following document
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-domain-procedure.html
3. Move the domain out of SES sandbox accoring to following document
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html
4. Set up postfix to following document
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html
Notably missing from that list:
"Receiving Email with Amazon SES"
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html
Which seems critical if you want SES to accept mail for you.
And postfix is configured so that 'postconf -n' shows as following.
[...]
And with this settings I confirmed that mail is successfully delivered
from the EC2 host to destination that mail is rejected if delivered
directly.
But if I try to forward mail sent from outside to this host by using
~/.forward or something else, then SES rejects such mail with
following log messages.
Yes, which is *probably* because ~/.forward or aliases use 'transparent'
forwarding, using the same SMTP envelope sender as the incoming message
and making no modifications to the message itself except to add a
Received header.
Because it is an Amazon SES machine which is rejecting the forwarded
email, only Amazon can provide a definitive answer to your query of how
to make this work. You may need to modify the SMTP envelope sender to an
address in your domain, you may need to modify headers, you may need to
set up DKIM signing, or do something else Amazon-specific.
--
Bill Cole
[email protected] or [email protected]
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Available For Hire: https://linkedin.com/in/billcole