setting up sendmail in EC2

Somehow I noticed that our Drupal wasn’t sending email notifications as it was supposed to. We just migrated a CMS to one of our EC2 instances. I figured that Drupal was using sendmail, as I couldn’t find any SMTP configuration in the administration section.

First of all, I checked if sendmail was running:

ps -aux | grep sendmail

That showed me that it wasn’t running.

Then I started it as root:

/usr/sbin/sendmail -bd -q20m

Then I added our domain name to the list of local host names at /etc/mail/local-host-names

Also, I configured submit.cf to use our domain: aycron.com – You can find submit.cf at /etc/mail/submit.cf and modify it to look like this:

# my official domain name
# … define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
Dj$w.aycron.com

Finally, I tested that sendmail was working:

[etagwerker@dev-001 ~]$ /usr/sbin/sendmail -F”Ernesto Tagwerker” etagwerker@aycron.com
Hello, this is a test. 1. 2. 3. Testing.
Bye.
.

This totally worked!

This entry was posted in developer tools, linux/unix world, programming and tagged , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>