Question

Cannot send mail from my droplet

Hi i have problems with sending emails from my droplets. I am usim exim. I tested for example by typing

mailx ***@gmail.com -s"TEST" TEST . but I am receiving this error:

2017-12-16 18:19:17 1eQH3M-00031M-Ud ** ***@gmail.com R=lookuphost T=remote_smtp H=gmail- smtp-in.l.google.com [209.85.232.27] X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=yes: SMTP error from remote mail server after end of data: 550-5.7.1 This message does not have authentication information or fails to pass\n550-5.7.1 authentication checks. To best protect our users from spam, the\n550-5.7.1 message has been blocked. Please visit\n550-5.7.1 https://support.google.com/mail/answer/81126#authentication for more\n550 5.7.1 information. p14si3542435qki.429 - gsmtp

If I try protonmail:

2:ECDHE-RSA-AES256-GCM-SHA384:256 CV=yes: SMTP error from remote mail server after RCPT TO:****@protonmail.com: 504 5.5.2 root@localhost: Sender address rejected: need fully-qualified address

Please help :)

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Gmail will only accept email from a configured domain so mails that say they are from user@localhost or something similar are automatically rejected. For best results, before attempting to send mail through Google’s servers you should:

Ensure your domain and PTR are set up properly. (The PTR is created automatically based on the name of your droplet. This should be a resolvable domain or subdomain name).

Create an SPF record for your domain This record will tell the receiving mail server that this IP address is authorized to send emails for your domain.

With these changes the Gmail servers should begin accepting messages from your server.