7

I'm looking for a very simple, lightweight SMTP server to run on an Ubuntu 9.04 VPS.

The only functionality I need is to support the PHP mail command;

<?php
mail('[email protected]', 'My Subject', 'My message');
?>

That's all it needs to do. I do not need logging, POP3, IMAP or anything else for inbound mail - just simple plain text SMTP. The emails will not have file attachments.

Any suggestions gratefully received.

0

7 Answers 7

7

I suggest you just use Postfix.

It's not minimal as you might want but:

  • It gets security updates in Ubuntu;
  • It's the default mail server, so you'll have all the distribution-specific troubleshooting guides you might need;
  • It sends mail trough secure connections.

The functions you don't need won't affect the ones you need anyway, and it's not like one megabyte of disk space is a problem - at least in a context where it's okay to install a behemoth sugh as Ubuntu.

1
  • Agreed on Postfix, especially on Ubuntu as you can chose to configure it for SMTP delivery only.
    – pauska
    Aug 7, 2011 at 12:38
5

I use sSMTP to relay mail through a Google Apps e-mail account on a Gentoo-based Linode VPS running Apache with mod_php. Since it's an outbound only sendmail replacement that only relays to other servers for them to actually deliver the mail, this sounds like the ideal request.

1
  • +1 sSMTP is great for these kind of situations.
    – user62491
    Aug 7, 2011 at 19:05
4

I recommend msmtp, which is not a running service or full-fledged mail transport agent like postfix or exim, but rather a single executable that does outbound mail only. It is very easy to setup.

The one thing you lose over using a real SMTP service is that msmtp will not keep trying to deliver mail when the receiving server cannot be reached. It is for one-off outbound messages.

2

Try configuring PHP to connect directly to your mail relay. For your use I don't believe you need a mail server. You will need to install the php-mail package and configure it to use SMTP.

Make sure the domain you are sending mail from has an MX record. If the domain has an SPF record, make sure your mail relay is allowed to send mail on its behalf.

Any of the light weight relay only servers like eSMTP, mSMTP or sSMTP should be sufficient for your needs.

1

I had this same question. I answered it here. https://serverfault.com/a/184161/36671

0

Ubuntu "fully supports" two mail transfer agents:

  1. Postfix
  2. exim4

Both are a bit more capable than what you need.

0

I would recommend exim4. It's configuration is probably the easiest from the classic trio of sendmail, postfix and exim. Also leaves small footprint. We use it on our webservers for exactly the same purpose

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .