问题
can anyone help me configure postfix to use with amazon ses please.. i can successfully follow instructions here using sendgrid https://developers.google.com/compute/docs/sending-mail and it is working fine using sendgrid..
But i would like to adjust settings to use amazon SES instead of sendgrid, I am not even sure if that is possible seems google has blocked all smtp ports.
any help greatly appreciated...
I have tried these.. http://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html but did not work running debian 7 google VM instance
回答1:
solved it already.. in case it helps others Google Instance VM can use port 2587. I unblocked that from my console, then used the popular phpmailer php library to send mail...
now all is working perfectly..
finding the port was hard.. google documentation does not make that clear..
回答2:
I finally got it to work too, and as per to the comments in the answer, I will provide how I did it step by step.
Amazon uses the mentioned port in the answer, and this is mentioned here, under STARTTLS: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-connect.html#smtp-connect-secure-tunnel
I have an already working postfix installation and followed the guide posted in the question: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html
I installed stunnel on my ubuntu using:
sudo apt-get install stunnel4
Followed the guide here: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp-secure-tunnel.html
And the content of the final stunnel config file:
[smtp-tls-wrapper]
accept = 2525
client = yes
connect = email-smtp.eu-west-1.amazonaws.com:2587
delay = yes
cert = /etc/stunnel/mail.pem
protocol = smtp
Important Notes:
- The "protocol" config value is not mentioned in the docs, but it won't work without it
- Replace the "connect" value to match your region, but keep the port as 2587.
- As mentioned in the answer, you need to allow port 2587 from your google cloud console
- There is also port "2465" available for "TLS Wrapper" wich should also be possible to use with Google's Compute Engine.
回答3:
Simply use the port 2587. That's all. (I have tested via PHPmailer.)
来源:https://stackoverflow.com/questions/24834047/amazon-ses-on-google-cloud-computing-instance-vm-using-postfix