Unable to send mail from Ubuntu 17.04 container

echo "This is the body of the email" | mail -s "This is the subject line" -r sender@mydomain.com recipent@gmail.com

I get:
guest postfix/smtp[7551]: connect to alt3.gmail-smtp-in.l.google.com[]:25: Connection timed out

When I check:
telnet gmail-smtp-in.l.google.com. 25

I get no response. How do I configure the server to send mail?


  • Under certain cases, an accounts SMTP privileges may be limited after signup:

    This appears to be the case for your account. I have lifted this block and you will need to restart your instances from the customer portal for this to take effect. If you are still having issues, please open a support ticket.
This discussion has been closed.