Setting up Email with Mutt on Ubuntu
I have been using the Mutt email client for a short while now. By no means an expert, but have found a few little gems.
Firstly, I am using external POP and SMTP for sending and collecting email, with no local email server.
I use the following basic mutt settings in ~/.muttrc
set mbox_type=Maildir
set folder=”~/email/mailbox”
set mask=”!^\\.[^.]”
set mbox=”~/email/mailbox/kept
set record=”+.Sent”
set postponed=”+.Drafts”
set spoolfile=”~/email/mailbox/in-default
set realname=”me”
set from=”me@domain.tld”
set use_from=yes
As you can see, the mailbox are all in a folder in my home directory, no use of spool etc as I am not running an email server.
For sending email I use esmtp with this option in .muttrc
set sendmail=”/usr/bin/esmtp -v -X /tmp/esmtp.log”
set envelope_from=yes
For receiving email, I use getmail via cron every 15 mins.
The cron is :
crontab -l
# m h dom mon dow command
*/15 * * * * getmail –getmaildir /home/me/email/getmail/ –rcfile getmail.me.rc
The retriever in the getmail config is SimplePOP3SSLRetriever, and the destination is to procmail, which then does filtering based on rules and filters i set up and drops the email into the various maildir folders in ~/email/mailbox/