AWS SES still uses from @us-west-2.amazonses.com

Domain is fully verified but sometimes we did get FROM 0101016efadf82da-b7e07022-37ba-4cae-aa6c-780052992485-000000@us-west-2.amazonses.com instead of using FROM from our domain this is log can you show me what could be possible the reason ?

<< 220 email-smtp.amazonaws.com ESMTP SimpleEmailService-d-XTDLI25GD >> EHLO [IP] << 250-email-smtp.amazonaws.com 250-8BITMIME 250-SIZE 10485760 250-STARTTLS 250-AUTH PLAIN LOGIN 250 Ok >> STARTTLS << 220 Ready to start TLS >> EHLO [IP] << 250-email-smtp.amazonaws.com 250-8BITMIME 250-SIZE 10485760 250-STARTTLS 250-AUTH PLAIN LOGIN 250 Ok >> AUTH LOGIN << 334 val >> val << 334 val >> Qk8= << 235 Authentication successful. ++ Swift_SmtpTransport started >> MAIL FROM:<[email protected]> << 250 Ok >> RCPT TO:<[email protected]> << 250 Ok >> DATA << 354 End data with <CR><LF>.<CR><LF> >> . << 250 Ok 
2

1 Answer

First to understand, there are two things in SMTP:

  • Mailfrom (Envelope From): It's a SMTP command
  • From header (thats something you see in Outlook)
  • SES always changes Mailfrom address to [email protected] or [email protected] (if region used other than us-east-1).

    SES does that so you can always pass in SPF. SPF check happens on mailfrom domain which is now us-west-2.amazonses.com and Amazon publishes the TXT/SPF record for it so you don't need to configure it your domain.

    AWS SES provides an option to use custom mail from where you can use your own mailfrom but in this case you would need to publish a TXT record so SPF can be passed.

    https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from.html

    Generally, you don't see Mailfrom in outlook or any webmail. The reason you're seeing it because in your telnet test, you're not adding from header. Try below test: (Add DATA command after "rcpt to" and add below line)

    >> MAIL FROM:<[email protected]> << 250 Ok >> RCPT TO:<[email protected]> Data From: [email protected] To: [email protected] Subject: Test . 

    Once you add the From header, you should be able to see correct address in outlook or webmail.

    ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJobHJrZWt%2Bc32Omq6sZaOawG6%2F06KjpWWlqLK0ecWrpqZlpah6uLHSrWRrZZGirru7zaycrGWTpLo%3D