2

I have an EC2 instance running the standard LAMP stack (Linux, Apache, MySQL, PHP). I am using PHP to send out a few e-mails a day (4 or 5 at the most). This is working without a hitch.

Every once in a while, I will need to debug or test some of the e-mails that are sent. To do this, I will run a particular e-mail sending script 10-20 times in succession. I noticed that some of those e-mails are never received by the listed e-mail addresses. This is sporadic and happens when the script has not been changed. I am assuming this is because EC2's built-in SMTP server is throttling my e-mails.

How do I view the logs for the SMTP server on EC2?

Lloyd Banks
  • 35,740
  • 58
  • 156
  • 248

1 Answers1

1

If your application is using your localhost as SMTP server, your logs should be in /var/log/maillog.

Note: There is a limitation from AWS for emails sent from EC2 instances:

AWS EC2 email sending limit when using third party smtp server

Amazon EC2 mail limit reached while using external smtp server to send emails

Community
  • 1
  • 1
Céline Aussourd
  • 10,214
  • 4
  • 32
  • 36