esmtp

I have always have setup the MTA on my local server to do local delivereies only (it only listens on 127.0.0.1)! I have never realy needed to send mail from it.

I was browseing debian packages when I found esmpt; a relay only MTA. I thought that it would be perfect for me. It is sendmail command line compatible and it would give me the ability of sending email from my server without the hassle of setting it up to recive email.

apt-get install esmtp-run installs a package that provides MTA. debconf sets it all up but you can edit your setting in /etc/esmtprc.

Lets take it for a test drive, shall we?

echo -e "To: zein@domain.com\nFrom: zein@otherdomain.com\nSubject:Test\n\nTesting... 123\n" | /usr/sbin/sendmail zein@domain.com -f zein@otherdomain.com

Perfect! notice that the -f must match the smtp user that you have configured esmtp with.

Leave a Reply