Sendmail now enabled on all servers

Before today theĀ sendmail command-line tool was disabled on our servers so all apps and scripts had to connect to our SMTP servers to send an email.
As of today sendmail is enabled on all servers which means that any app or script that uses sendmail to send emails will just work without any modification:

[testweb100@web100 ~]$ sendmail support@webfaction.com
Subject: Help me

Just testing sendmail<ctrl-D>
[testweb100@web100 ~]$
<email was sent>

This also means that the native PHP function mail() now works without any extra code:

[testweb100@web100 ~]$ cat testsendmail.php
<?php
$message = "Just testing sendmail\n";
mail('support@webfaction.com', 'Help me', $message);
?>
[testweb100@web100 ~]$ php testsendmail.php
[testweb100@web100 ~]$
<email was sent>

Another place where it can be useful is if you want to receive error emails about failing cronjobs: just add “MAILTO=youremailaddress@yourdomain.com” at the top of your crontab and you’ll start receiving error notifications.

Under the hood the sendmail binary is actually a patched version of msmtp (a sendmail-compatible mail tool) which connects to our SMTP servers to send the email.

This entry was posted in Email. Bookmark the permalink.

11 Responses to Sendmail now enabled on all servers

  1. Marius says:

    Rejoice! :)

  2. Oleh says:

    Wow! Many thanks.

  3. Alexb says:

    Excellent news !!!!

  4. Ben Nash says:

    Nice, very nice. Are there any plans to re-configure the auto-install for Drupal? As it stands now, the SMTP module is pre-installed to patch the missing sendmail. This ? is for D6 and the now new Drupal 7. thanks much

  5. remi says:

    Ben: The new Drupal-7 one-click installer uses sendmail by default to send emails. No extra config needed :)

  6. Lyndsy Simon says:

    Very nice! I think that’s the only item I had on my list of “things that I have to configure differently for Webfaction from my dev environment”. Kudos!

  7. Pingback: A Look at Our PHP Setup | WebFaction Blog

Leave a Reply

Your email address will not be published. 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>