Need help configuring Postfix to use any SMTP


#1

I have followed the guide https://easyengine.io/tutorials/linux/ubuntu-postfix-gmail-smtp
and used these steps to change the exposed port How to change the default port used by postfix.
But I’m still unable to send mails.
Can someone help?
@mrrobot47


#2

tutorials v3 not active v4 :slight_smile:

Have you ever tried the plugin?


#3

The plugin works but I’d rather do it without one. I ran the commands of the tutorial inside the docker container assuming it would work.


#4

bro, use alternatives like zoho mail or yandex mail


#5

@zac

One suggestion:
If you want to make things work with Gmail you will need to ensure you have correct DNS setup:

  • SPF
  • Dkim

Gmail is very particular about setup - probably to avoid spam?

I hope this puts you a step closer to getting things working…


#6

Not only Gmail, I’ve been unable to connect postfix with Amazon SES.
Here is what I did

ee shell example.com --service=postfix

postconf -e "relayhost = [email-smtp.us-east-1.amazonaws.com]:587" \
"smtp_sasl_auth_enable = yes" \
"smtp_sasl_security_options = noanonymous" \
"smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd" \
"smtp_use_tls = yes" \
"smtp_tls_security_level = encrypt" \
"smtp_tls_note_starttls_offer = yes" \
"smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt"

cat > /etc/postfix/sasl_passwd
[email-smtp.us-east-1.amazonaws.com]:587 SMTPUSERNAME:SMTPPASSWORD

postmap hash:/etc/postfix/sasl_passwd
postfix reload

I also exposed ports 465 and 587 in the postfix docker container.

Can someone help?