1

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

root@support@mydomain.com

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[107.20.142.169]: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[107.20.142.169] said: 501 Invalid MAIL FROM address provided (in reply to MAIL FROM command))
EEAA
  • 108,414
  • 18
  • 172
  • 242
Donnie
  • 121
  • 1
  • 1
  • 4

2 Answers2

9
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).

EEAA
  • 108,414
  • 18
  • 172
  • 242
1

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
xs2rashid
  • 184
  • 5