Skip to content

WorkMail Connection unexpectedly closed 554 5.7.1 You are not allowed to connect

0

Using python smtplib.SMTP_SSL to send myself a daily email from my laptop. My code works with an alternative email provider.

Trying to send to AWS Workmail, python says smtplib.SMTPServerDisconnected: Connection unexpectedly closed

and the SMTP debug trace says:** 554 5.7.1 You are not allowed to connect**

AWS Health Dashboard says No Recent Issues and No Open Issues.

SMTP endpoint is smtp.mail.eu-west-1.awsapps.com:465

The full trace is: send: 'ehlo [myhost]' reply: '250-smtp.eu-west-1.mail.awsapps.com' reply: '250-8BITMIME' reply: '250-AUTH PLAIN LOGIN' reply: '250 Ok' send: 'AUTH PLAIN [encoded]' reply: '554 5.7.1 You are not allowed to connect' send: 'AUTH LOGIN [encoded]' send: 'QUIT'

Anyone know what I can try next?

Cheers Baron.

asked a year ago89 views

2 Answers
0

As an alternative, I can connect to AWS SES and send the email without any problem. I am using this as a workaround for now.

Frustrating that AWS Workmail rejects the login and I don't understand why.

answered a year ago

-1

It appears you're experiencing an authentication issue when trying to send emails through Amazon WorkMail using Python's smtplib.SMTP_SSL.

This error message "554 5.7.1 You are not allowed to connect" typically indicates a permissions problem. There are a few potential causes:

  1. WorkMail may not have the necessary permissions to send emails on your behalf. This is a common issue where WorkMail needs proper authorization to use Amazon SES (Simple Email Service) for email sending.

  2. Your account might be experiencing some restriction or limitation that's preventing outgoing emails.

Here are some troubleshooting steps you can try:

  1. Verify that WorkMail has the proper permissions to send emails on your behalf. This typically involves checking the permissions between WorkMail and Amazon SES.

  2. Check if your WorkMail organization has any sending restrictions or if your account has been flagged for any reason. You mentioned checking the AWS Health Dashboard, but you might also want to check any notifications specific to your WorkMail account.

  3. Ensure your authentication credentials are correct and that you're using the right endpoint for your region.

  4. If you're using a custom domain, verify that all DNS records are properly configured and verified.

If the issue persists, you might need to contact AWS Support for further assistance, as there could be a specific restriction on your account that requires their intervention.
Sources
I can receive emails BUT can't send | AWS re:Post
Amazon WorkMail Not Allowed to send Outgoing Email | AWS re:Post

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.