Very simple SMTP server for Ubuntu wanted
Solution 1:
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.
Solution 2:
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.
Solution 3:
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.
Solution 4:
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.