Categories
Computers

EEE and esmtp

When I installed Debian on my EEE, naturally Exim4 came along for the ride.  Even then, I felt it was overkill, but lacking the knowledge I couldn’t find a suitable replacement.  So I stuck with it and set it up to send mail to my local intranet mail server.  This configuration was OK, but it was never really satisfying.  Why did I need a full-fledged mail server on a resource limited laptop?

I’m happy to report that I’ve finally resolved the situation with esmtp.  I found it after noticing that some local mail related to the EEE was not getting routed properly.  In searching around, I stumbled across some posts related to msmtp and mutt.  So I pushed this rout and eventually turned up 3 alternatives- msmtp, esmtp and ssmtp. �I decided on esmtp because it is much smaller than msmtp, but had some extra features over ssmtp.

I use aptitude for my package management needs, so that was how I removed exim and it’s related packages and installed esmtp.

After installing it, I setup a local .esmtprc file (as opposed to a system wide one in /etc).  The contents of the file are as follows:

identity=user@localdomain
hostname=mailserver:25
starttls=enabled
username=user
password=pass

In this case, user@localdomain was my username on the EEE with local domain name for the computer.  The “mailserver” is the name of my mailserver, but this could also be the mailserver for your ISP.  In my case, I had to add this name to my /etc/hosts file.  The user name corresponds to the username for logging into the mailserver, as does the password.  I also setup a file for root as well to handle system messages being sent to root.  Of course, this might be better handled with a system esmtprc file.

And that was it.  I was able to use Mutt to send emails- it took me longer to uninstall Exim than it did make esmtp work.  Perhaps I’ll try ssmtp at some point just for sake of comparison.

One potential gotcha would be if your system does not keep track of the sendmail link.  In my case, the Debian package management system pointed sendmail at esmtp, so all I did was check that the link had been done.  Alternatively, you could set the sendmail variable in your muttrc file, if you’re running with mutt that is.

Leave a Reply

Your email address will not be published. Required fields are marked *