My email logs are filling up with bounced emails being sent from my domain with a From header formatted like so:


What is causing this?

Full log entry:

Mar 13 14:05:09 ip-10-122-201-212 postfix/smtp[26788]: 4D21881CA8: to=<root@support@mydomain.com>, relay=email-smtp.us-east-1.amazonaws.com[]:25, delay=0.12, delays=0.01/0/0.11/0, dsn=5.0.0, status=bounced (host email-smtp.us-east-1.amazonaws.com[] said: 501 Invalid MAIL FROM address provided (in reply to MAIL FROM command))
  • 2
    Your application is causing the problem. Mar 13 '14 at 15:19
Invalid MAIL FROM address provided (in reply to MAIL FROM command)

When sending via SES, you need to set your From: header to one of the "verified" email addresses you configured when setting up SES for your AWS account.

You're setting your From: address to root@support@mydomain.com, which is an invalid email address. You need to set this to a valid email address that you've verifed through the SES console (or API).


I was having the same issue "Invalid MAIL FROM address provided (in reply to MAIL FROM command))".

Following is the work around

  1. Check from postfix logs which "From" address postfix is using.
  2. MAP that from address in "/etc/postfix/generic" like following.

    root@xyz xyz@YourSesDomain.com

  3. Run postmap /etc/postfix/generic
  4. Make sure that you have following in your /etc/postfix/main.cf

    smtp_generic_maps = hash:/etc/postfix/generic

  5. Reload postfix service

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.