PHP `sendmail()` not working on Magento 2 AWS AMI

Keywords: Magento - AWS - Technical issue - Email configuration (SMTP)
bnsupport ID: 84ce40cd-21b4-db93-17cf-e026334aafc6
Description:
Hi,
I have set up a magento store using the magento bitnami ami. However, the email feature while creating a new user or order is not working. I have installed sendmail as documented here: https://docs.bitnami.com/aws/apps/magento/troubleshooting/send-mail/

However, when testing the php scripts, I still don’t receive any emails from the server to my mailbox. Let me know if any other details are required.

Thanks

Hi @mohrjewelry

Thanks for using Bitnami Magento!

In order to check the errors related to sendmail, could you please execute the following commands?

$ cat /var/log/mail.info
$ cat /var/log/mail.log

Please, if they contain sensitive information (such us the full email address) you may mask it our (e.g. XXXXX@gmail.com).

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Hi @jcarmona,

Please find the requested details:

$ cat /var/log/mail.info
Nov 19 12:25:11 ip-172-31-71-90 sendmail[3404]: 0AJCPBhi003404: from=bitnami, size=91, class=0, nrcpts=1, msgid=<202011191225.0AJCPBhi003404@ip-172-31-71-90.ec2.internal>, relay=bitnami@localhost
Nov 19 12:25:11 ip-172-31-71-90 sm-mta[3405]: 0AJCPB3A003405: from=<bitnami@ip-172-31-71-90.ec2.internal>, size=391, class=0, nrcpts=1, msgid=<202011191225.0AJCPBhi003404@ip-172-31-71-90.ec2.internal>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 19 12:25:11 ip-172-31-71-90 sendmail[3404]: 0AJCPBhi003404: to=XXXXXXXXXX@gmail.com, ctladdr=bitnami (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30091, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0AJCPB3A003405 Message accepted for delivery)
Nov 19 12:25:11 ip-172-31-71-90 sm-mta[3407]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1.3, verify=FAIL, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
Nov 19 12:25:11 ip-172-31-71-90 sm-mta[3407]: 0AJCPB3A003405: to=<XXXXXXXXXX@gmail.com>, ctladdr=<bitnami@ip-172-31-71-90.ec2.internal> (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120391, relay=gmail-smtp-in.l.google.com. [173.194.207.26], dsn=2.0.0, stat=Sent (OK  1605788711 p25si14423281qtq.29 - gsmtp)
Nov 19 12:26:02 ip-172-31-71-90 sendmail[3491]: 0AJCQ2Rg003491: from=daemon, size=2334, class=0, nrcpts=1, msgid=<202011191226.0AJCQ2Rg003491@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=daemon@localhost
Nov 19 12:26:02 ip-172-31-71-90 sm-mta[3492]: 0AJCQ2vt003492: from=<daemon@ip-172-31-71-90.ec2.internal>, size=2650, class=0, nrcpts=1, msgid=<202011191226.0AJCQ2Rg003491@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 19 12:26:02 ip-172-31-71-90 sendmail[3491]: 0AJCQ2Rg003491: to=daemon, ctladdr=daemon (1/1), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32334, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0AJCQ2vt003492 Message accepted for delivery)
Nov 19 12:26:02 ip-172-31-71-90 sm-mta[3493]: 0AJCQ2vt003492: to=<daemon@ip-172-31-71-90.ec2.internal>, ctladdr=<daemon@ip-172-31-71-90.ec2.internal> (1/1), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32909, dsn=2.0.0, stat=Sent
Nov 19 12:26:03 ip-172-31-71-90 sendmail[3495]: 0AJCQ32W003495: from=root, size=2330, class=0, nrcpts=1, msgid=<202011191226.0AJCQ32W003495@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=root@localhost
Nov 19 12:26:03 ip-172-31-71-90 sm-mta[3496]: 0AJCQ3oU003496: from=<root@ip-172-31-71-90.ec2.internal>, size=2642, class=0, nrcpts=1, msgid=<202011191226.0AJCQ32W003495@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 19 12:26:03 ip-172-31-71-90 sendmail[3495]: 0AJCQ32W003495: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32330, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0AJCQ3oU003496 Message accepted for delivery)
Nov 19 12:26:03 ip-172-31-71-90 sm-mta[3502]: 0AJCQ3oU003496: to=<root@ip-172-31-71-90.ec2.internal>, ctladdr=<root@ip-172-31-71-90.ec2.internal> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32897, dsn=2.0.0, stat=Sent
$ cat /var/log/mail.log
Nov 19 12:25:11 ip-172-31-71-90 sendmail[3404]: 0AJCPBhi003404: from=bitnami, size=91, class=0, nrcpts=1, msgid=<202011191225.0AJCPBhi003404@ip-172-31-71-90.ec2.internal>, relay=bitnami@localhost
Nov 19 12:25:11 ip-172-31-71-90 sm-mta[3405]: 0AJCPB3A003405: from=<bitnami@ip-172-31-71-90.ec2.internal>, size=391, class=0, nrcpts=1, msgid=<202011191225.0AJCPBhi003404@ip-172-31-71-90.ec2.internal>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 19 12:25:11 ip-172-31-71-90 sendmail[3404]: 0AJCPBhi003404: to=XXXXXXXXXX@gmail.com, ctladdr=bitnami (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30091, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0AJCPB3A003405 Message accepted for delivery)
Nov 19 12:25:11 ip-172-31-71-90 sm-mta[3407]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1.3, verify=FAIL, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
Nov 19 12:25:11 ip-172-31-71-90 sm-mta[3407]: 0AJCPB3A003405: to=<XXXXXXXXXX@gmail.com>, ctladdr=<bitnami@ip-172-31-71-90.ec2.internal> (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120391, relay=gmail-smtp-in.l.google.com. [173.194.207.26], dsn=2.0.0, stat=Sent (OK  1605788711 p25si14423281qtq.29 - gsmtp)
Nov 19 12:26:02 ip-172-31-71-90 sendmail[3491]: 0AJCQ2Rg003491: from=daemon, size=2334, class=0, nrcpts=1, msgid=<202011191226.0AJCQ2Rg003491@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=daemon@localhost
Nov 19 12:26:02 ip-172-31-71-90 sm-mta[3492]: 0AJCQ2vt003492: from=<daemon@ip-172-31-71-90.ec2.internal>, size=2650, class=0, nrcpts=1, msgid=<202011191226.0AJCQ2Rg003491@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 19 12:26:02 ip-172-31-71-90 sendmail[3491]: 0AJCQ2Rg003491: to=daemon, ctladdr=daemon (1/1), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32334, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0AJCQ2vt003492 Message accepted for delivery)
Nov 19 12:26:02 ip-172-31-71-90 sm-mta[3493]: 0AJCQ2vt003492: to=<daemon@ip-172-31-71-90.ec2.internal>, ctladdr=<daemon@ip-172-31-71-90.ec2.internal> (1/1), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32909, dsn=2.0.0, stat=Sent
Nov 19 12:26:03 ip-172-31-71-90 sendmail[3495]: 0AJCQ32W003495: from=root, size=2330, class=0, nrcpts=1, msgid=<202011191226.0AJCQ32W003495@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=root@localhost
Nov 19 12:26:03 ip-172-31-71-90 sm-mta[3496]: 0AJCQ3oU003496: from=<root@ip-172-31-71-90.ec2.internal>, size=2642, class=0, nrcpts=1, msgid=<202011191226.0AJCQ32W003495@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 19 12:26:03 ip-172-31-71-90 sendmail[3495]: 0AJCQ32W003495: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32330, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0AJCQ3oU003496 Message accepted for delivery)
Nov 19 12:26:03 ip-172-31-71-90 sm-mta[3502]: 0AJCQ3oU003496: to=<root@ip-172-31-71-90.ec2.internal>, ctladdr=<root@ip-172-31-71-90.ec2.internal> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32897, dsn=2.0.0, stat=Sent
Nov 19 12:27:03 ip-172-31-71-90 sendmail[3609]: 0AJCR3OX003609: from=daemon, size=2334, class=0, nrcpts=1, msgid=<202011191227.0AJCR3OX003609@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=daemon@localhost
Nov 19 12:27:03 ip-172-31-71-90 sm-mta[3610]: 0AJCR3Al003610: from=<daemon@ip-172-31-71-90.ec2.internal>, size=2650, class=0, nrcpts=1, msgid=<202011191227.0AJCR3OX003609@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 19 12:27:03 ip-172-31-71-90 sendmail[3609]: 0AJCR3OX003609: to=daemon, ctladdr=daemon (1/1), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32334, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0AJCR3Al003610 Message accepted for delivery)
Nov 19 12:27:03 ip-172-31-71-90 sm-mta[3611]: 0AJCR3Al003610: to=<daemon@ip-172-31-71-90.ec2.internal>, ctladdr=<daemon@ip-172-31-71-90.ec2.internal> (1/1), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32909, dsn=2.0.0, stat=Sent
Nov 19 12:27:03 ip-172-31-71-90 sendmail[3620]: 0AJCR3D3003620: from=root, size=2330, class=0, nrcpts=1, msgid=<202011191227.0AJCR3D3003620@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=root@localhost
Nov 19 12:27:03 ip-172-31-71-90 sm-mta[3623]: 0AJCR3eZ003623: from=<root@ip-172-31-71-90.ec2.internal>, size=2642, class=0, nrcpts=1, msgid=<202011191227.0AJCR3D3003620@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 19 12:27:03 ip-172-31-71-90 sendmail[3620]: 0AJCR3D3003620: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32330, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0AJCR3eZ003623 Message accepted for delivery)
Nov 19 12:27:03 ip-172-31-71-90 sm-mta[3625]: 0AJCR3eZ003623: to=<root@ip-172-31-71-90.ec2.internal>, ctladdr=<root@ip-172-31-71-90.ec2.internal> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32897, dsn=2.0.0, stat=Sent
Nov 19 12:28:03 ip-172-31-71-90 sendmail[3733]: 0AJCS3dd003733: from=daemon, size=2334, class=0, nrcpts=1, msgid=<202011191228.0AJCS3dd003733@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=daemon@localhost
Nov 19 12:28:03 ip-172-31-71-90 sm-mta[3737]: 0AJCS3nd003737: from=<daemon@ip-172-31-71-90.ec2.internal>, size=2650, class=0, nrcpts=1, msgid=<202011191228.0AJCS3dd003733@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 19 12:28:03 ip-172-31-71-90 sendmail[3733]: 0AJCS3dd003733: to=daemon, ctladdr=daemon (1/1), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32334, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0AJCS3nd003737 Message accepted for delivery)
Nov 19 12:28:03 ip-172-31-71-90 sm-mta[3738]: 0AJCS3nd003737: to=<daemon@ip-172-31-71-90.ec2.internal>, ctladdr=<daemon@ip-172-31-71-90.ec2.internal> (1/1), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32909, dsn=2.0.0, stat=Sent
Nov 19 12:28:03 ip-172-31-71-90 sendmail[3740]: 0AJCS3k9003740: from=root, size=2330, class=0, nrcpts=1, msgid=<202011191228.0AJCS3k9003740@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=root@localhost
Nov 19 12:28:03 ip-172-31-71-90 sm-mta[3741]: 0AJCS3YF003741: from=<root@ip-172-31-71-90.ec2.internal>, size=2642, class=0, nrcpts=1, msgid=<202011191228.0AJCS3k9003740@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 19 12:28:03 ip-172-31-71-90 sendmail[3740]: 0AJCS3k9003740: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32330, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0AJCS3YF003741 Message accepted for delivery)
Nov 19 12:28:03 ip-172-31-71-90 sm-mta[3742]: 0AJCS3YF003741: to=<root@ip-172-31-71-90.ec2.internal>, ctladdr=<root@ip-172-31-71-90.ec2.internal> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32897, dsn=2.0.0, stat=Sent
Nov 19 12:29:02 ip-172-31-71-90 sendmail[3858]: 0AJCT2Mr003858: from=daemon, size=2334, class=0, nrcpts=1, msgid=<202011191229.0AJCT2Mr003858@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=daemon@localhost
Nov 19 12:29:02 ip-172-31-71-90 sm-mta[3863]: 0AJCT2p9003863: from=<daemon@ip-172-31-71-90.ec2.internal>, size=2650, class=0, nrcpts=1, msgid=<202011191229.0AJCT2Mr003858@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 19 12:29:02 ip-172-31-71-90 sendmail[3858]: 0AJCT2Mr003858: to=daemon, ctladdr=daemon (1/1), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32334, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0AJCT2p9003863 Message accepted for delivery)
Nov 19 12:29:02 ip-172-31-71-90 sm-mta[3864]: 0AJCT2p9003863: to=<daemon@ip-172-31-71-90.ec2.internal>, ctladdr=<daemon@ip-172-31-71-90.ec2.internal> (1/1), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32909, dsn=2.0.0, stat=Sent
Nov 19 12:29:03 ip-172-31-71-90 sendmail[3866]: 0AJCT324003866: from=root, size=2330, class=0, nrcpts=1, msgid=<202011191229.0AJCT324003866@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=root@localhost
Nov 19 12:29:03 ip-172-31-71-90 sm-mta[3867]: 0AJCT3q5003867: from=<root@ip-172-31-71-90.ec2.internal>, size=2642, class=0, nrcpts=1, msgid=<202011191229.0AJCT324003866@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 19 12:29:03 ip-172-31-71-90 sendmail[3866]: 0AJCT324003866: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32330, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0AJCT3q5003867 Message accepted for delivery)
Nov 19 12:29:03 ip-172-31-71-90 sm-mta[3868]: 0AJCT3q5003867: to=<root@ip-172-31-71-90.ec2.internal>, ctladdr=<root@ip-172-31-71-90.ec2.internal> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32897, dsn=2.0.0, stat=Sent
Nov 19 12:30:03 ip-172-31-71-90 sendmail[3969]: 0AJCU3nE003969: from=daemon, size=2334, class=0, nrcpts=1, msgid=<202011191230.0AJCU3nE003969@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=daemon@localhost
Nov 19 12:30:03 ip-172-31-71-90 sm-mta[3970]: 0AJCU3sX003970: from=<daemon@ip-172-31-71-90.ec2.internal>, size=2650, class=0, nrcpts=1, msgid=<202011191230.0AJCU3nE003969@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 19 12:30:03 ip-172-31-71-90 sendmail[3969]: 0AJCU3nE003969: to=daemon, ctladdr=daemon (1/1), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32334, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0AJCU3sX003970 Message accepted for delivery)
Nov 19 12:30:03 ip-172-31-71-90 sendmail[3972]: 0AJCU388003972: from=root, size=2330, class=0, nrcpts=1, msgid=<202011191230.0AJCU388003972@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=root@localhost
Nov 19 12:30:03 ip-172-31-71-90 sm-mta[3973]: 0AJCU3sX003970: to=<daemon@ip-172-31-71-90.ec2.internal>, ctladdr=<daemon@ip-172-31-71-90.ec2.internal> (1/1), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32909, dsn=2.0.0, stat=Sent
Nov 19 12:30:03 ip-172-31-71-90 sm-mta[3979]: 0AJCU3KD003979: from=<root@ip-172-31-71-90.ec2.internal>, size=2642, class=0, nrcpts=1, msgid=<202011191230.0AJCU388003972@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 19 12:30:03 ip-172-31-71-90 sendmail[3972]: 0AJCU388003972: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32330, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0AJCU3KD003979 Message accepted for delivery)
Nov 19 12:30:03 ip-172-31-71-90 sm-mta[3985]: 0AJCU3KD003979: to=<root@ip-172-31-71-90.ec2.internal>, ctladdr=<root@ip-172-31-71-90.ec2.internal> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32897, dsn=2.0.0, stat=Sent

Thanks

Somehow my reply with the logs has been marked spam and hidden @jcarmona

Hi @mohrjewelry

From your logs I can see this:

Nov 19 12:25:11 ip-172-31-71-90 sm-mta[3407]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1.3, verify=FAIL, cipher=TLS_AES_256_GCM_SHA384

Maybe you don’t have up-to-date (or don’t have at all) CA certificates in your system. Could you please execute the following command?

$ sudo apt-get update && sudo apt-get install ca-certificates

After that, please retry and check if it works now :slightly_smiling_face:

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Hi @jcarmona,

ca-certificates is already installed and upto date.

$ sudo apt-get update && sudo apt-get install ca-certificates

Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://cdn-aws.deb.debian.org/debian buster InRelease
Hit:3 http://cdn-aws.deb.debian.org/debian buster-updates InRelease
Hit:4 http://cdn-aws.deb.debian.org/debian buster-backports InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
ca-certificates is already the newest version (20200601~deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
 


For the retry, I’m getting similar results.

$ cat /var/log/mail.info
Nov 23 10:55:50 ip-172-31-71-90 sendmail[4519]: 0ANAtoTt004519: from=bitnami, size=91, class=0, nrcpts=1, msgid=<202011231055.0ANAtoTt004519@ip-172-31-71-90.ec2.internal>, relay=bitnami@localhost
Nov 23 10:55:50 ip-172-31-71-90 sm-mta[4520]: 0ANAtoqb004520: from=<bitnami@ip-172-31-71-90.ec2.internal>, size=391, class=0, nrcpts=1, msgid=<202011231055.0ANAtoTt004519@ip-172-31-71-90.ec2.internal>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 23 10:55:50 ip-172-31-71-90 sendmail[4519]: 0ANAtoTt004519: to=XXXXXXXXXX@gmail.com, ctladdr=bitnami (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30091, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0ANAtoqb004520 Message accepted for delivery)
Nov 23 10:56:03 ip-172-31-71-90 sendmail[4615]: 0ANAu3a9004615: from=daemon, size=2334, class=0, nrcpts=1, msgid=<202011231056.0ANAu3a9004615@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=daemon@localhost
Nov 23 10:56:03 ip-172-31-71-90 sm-mta[4616]: 0ANAu3wC004616: from=<daemon@ip-172-31-71-90.ec2.internal>, size=2650, class=0, nrcpts=1, msgid=<202011231056.0ANAu3a9004615@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 23 10:56:03 ip-172-31-71-90 sendmail[4615]: 0ANAu3a9004615: to=daemon, ctladdr=daemon (1/1), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32334, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0ANAu3wC004616 Message accepted for delivery)
Nov 23 10:56:03 ip-172-31-71-90 sm-mta[4617]: 0ANAu3wC004616: to=<daemon@ip-172-31-71-90.ec2.internal>, ctladdr=<daemon@ip-172-31-71-90.ec2.internal> (1/1), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32909, dsn=2.0.0, stat=Sent
Nov 23 10:56:03 ip-172-31-71-90 sendmail[4619]: 0ANAu3NG004619: from=root, size=2330, class=0, nrcpts=1, msgid=<202011231056.0ANAu3NG004619@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=root@localhost
Nov 23 10:56:03 ip-172-31-71-90 sm-mta[4620]: 0ANAu3Y3004620: from=<root@ip-172-31-71-90.ec2.internal>, size=2642, class=0, nrcpts=1, msgid=<202011231056.0ANAu3NG004619@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 23 10:56:03 ip-172-31-71-90 sendmail[4619]: 0ANAu3NG004619: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32330, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0ANAu3Y3004620 Message accepted for delivery)
Nov 23 10:56:03 ip-172-31-71-90 sm-mta[4621]: 0ANAu3Y3004620: to=<root@ip-172-31-71-90.ec2.internal>, ctladdr=<root@ip-172-31-71-90.ec2.internal> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32897, dsn=2.0.0, stat=Sent
Nov 23 10:56:21 ip-172-31-71-90 sm-mta[4189]: 0ANAriBH004187: to=<XXXXXXXXXX@gmail.com>, ctladdr=<bitnami@ip-172-31-71-90.ec2.internal> (1000/1000), delay=00:02:37, xdelay=00:02:37, mailer=esmtp, pri=120391, relay=alt4.gmail-smtp-in.l.google.com. [172.217.218.26], dsn=4.0.0, stat=Deferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.


$ cat /var/log/mail.log
Nov 23 10:55:50 ip-172-31-71-90 sendmail[4519]: 0ANAtoTt004519: from=bitnami, size=91, class=0, nrcpts=1, msgid=<202011231055.0ANAtoTt004519@ip-172-31-71-90.ec2.internal>, relay=bitnami@localhost
Nov 23 10:55:50 ip-172-31-71-90 sm-mta[4520]: 0ANAtoqb004520: from=<bitnami@ip-172-31-71-90.ec2.internal>, size=391, class=0, nrcpts=1, msgid=<202011231055.0ANAtoTt004519@ip-172-31-71-90.ec2.internal>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 23 10:55:50 ip-172-31-71-90 sendmail[4519]: 0ANAtoTt004519: to=XXXXXXXXXX@gmail.com, ctladdr=bitnami (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30091, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0ANAtoqb004520 Message accepted for delivery)
Nov 23 10:56:03 ip-172-31-71-90 sendmail[4615]: 0ANAu3a9004615: from=daemon, size=2334, class=0, nrcpts=1, msgid=<202011231056.0ANAu3a9004615@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=daemon@localhost
Nov 23 10:56:03 ip-172-31-71-90 sm-mta[4616]: 0ANAu3wC004616: from=<daemon@ip-172-31-71-90.ec2.internal>, size=2650, class=0, nrcpts=1, msgid=<202011231056.0ANAu3a9004615@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 23 10:56:03 ip-172-31-71-90 sendmail[4615]: 0ANAu3a9004615: to=daemon, ctladdr=daemon (1/1), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32334, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0ANAu3wC004616 Message accepted for delivery)
Nov 23 10:56:03 ip-172-31-71-90 sm-mta[4617]: 0ANAu3wC004616: to=<daemon@ip-172-31-71-90.ec2.internal>, ctladdr=<daemon@ip-172-31-71-90.ec2.internal> (1/1), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32909, dsn=2.0.0, stat=Sent
Nov 23 10:56:03 ip-172-31-71-90 sendmail[4619]: 0ANAu3NG004619: from=root, size=2330, class=0, nrcpts=1, msgid=<202011231056.0ANAu3NG004619@ip-172-31-71-90.ec2.internal>, bodytype=8BITMIME, relay=root@localhost
Nov 23 10:56:03 ip-172-31-71-90 sm-mta[4620]: 0ANAu3Y3004620: from=<root@ip-172-31-71-90.ec2.internal>, size=2642, class=0, nrcpts=1, msgid=<202011231056.0ANAu3NG004619@ip-172-31-71-90.ec2.internal>, bodytype=7BIT, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 23 10:56:03 ip-172-31-71-90 sendmail[4619]: 0ANAu3NG004619: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32330, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0ANAu3Y3004620 Message accepted for delivery)
Nov 23 10:56:03 ip-172-31-71-90 sm-mta[4621]: 0ANAu3Y3004620: to=<root@ip-172-31-71-90.ec2.internal>, ctladdr=<root@ip-172-31-71-90.ec2.internal> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32897, dsn=2.0.0, stat=Sent
Nov 23 10:56:21 ip-172-31-71-90 sm-mta[4189]: 0ANAriBH004187: to=<XXXXXXXXXX@gmail.com>, ctladdr=<bitnami@ip-172-31-71-90.ec2.internal> (1000/1000), delay=00:02:37, xdelay=00:02:37, mailer=esmtp, pri=120391, relay=alt4.gmail-smtp-in.l.google.com. [172.217.218.26], dsn=4.0.0, stat=Deferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.

Please let me know what I could do to fix this.

Thanks

Hi @mohrjewelry

Well, this time I can see the error is no longer related to TLS verification, but to:

stat=Deferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.

That means that your instance can’t reach out to google mail servers. In order to test that, you can run the following command:

$ nc -vz alt4.gmail-smtp-in.l.google.com 25                                                                                                                                                                                                         

In my case, this is the output I get:

$ nc -vz alt4.gmail-smtp-in.l.google.com 25                                                                                                                                                                                                        
Connection to alt4.gmail-smtp-in.l.google.com port 25 [tcp/smtp] succeeded!

As you are running this on AWS, this is likely due to:

Important: Amazon Elastic Compute Cloud (Amazon EC2) restricts Amazon Virtual Private Cloud (Amazon VPC) egress traffic on port 25 for all EC2 instances by default. If your application requires traffic on SMTP port 25, you can request to remove this restriction.

Source: https://aws.amazon.com/premiumsupport/knowledge-center/smtp-connectivity-timeout-issues-ses/

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

1 Like

Hey @jcarmona,

That command times out on EC2, so you are probably correct for the limitation. Thank you for your inputs!

My pleasure @mohrjewelry!

Can I mark this thread now as resolved and close it? :slightly_smiling_face:

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.