Sharing my setup of text-based mail client for “efficient” emailing.
It consists of following 3 pieces
fetchmail – fetches incoming messages from SMTP/POP server
procmail – filters messages
msmtp – sends messages
mutt – mail client to view messages
set logfile /tmp/fetchmail.log
poll mail.server.com protocol IMAP timeout 60
fetchall ssl nokeep norewrite sslcertck sslcertpath /etc/ssl/certs
mda "/usr/local/bin/procmail -f %F -d %T";
#Set on when debugging
#The directory where your mail folders will be stored.
# The log of procmail actions
# any email sent to [email protected] will be stored in ~/mail/.hiren/ dir.
# similarly, you can have multiple rule...
# Catch-all rule for all unmatched email
For some weird reason procmail wanted me to name the dirs under ~/mail/ starting with a dot i.e. “.”
You can have your mail stored in mbox or maildir format. I like mailbox format as its more flexible. I am not going into details about that.
Please ask “the Internet” for the difference and detailed understanding.
I am using msmtp for sending emails.
account default : yourmail
mutt related settings:
mutt is a very very powerful and customizable tool. I am listing only a few very basic setup settings for muttrc below:
# The capcability settings
# Mailbox definitions
~/.mutt/settings is another very important file for basic settings:
set sort_aux=last-date-received # showing threads with youngest message last
set sort_browser="reverse-date" # showing mbox list default to newest first
set reverse_alias # If there is an alias ... show that.
set quote_regexp="^([ \t]*[|>:%}#])+" # This is default.
set editor = "vim -u ~/.mutt/vimrc"
set abort_nosubject=yes # cancel messages w/o subject: line
alternative_order text/plain text/enriched text/html
set hidden_host # mutt will skip the host name part of $hostname
set bounce_delivered # Postfix users may wish to unset this variable.
set abort_nosubject=no # don't abort compos. when no subj. is set
set quit=yes # just quit please, kthx
set delete=yes # delete messages marked for deletion w/o confirmation
set mark_old=no # don't change status of new messages to old
set move=no # don't move read messages
# IMAP settings
# folder format
set folder_format="%2C %t %N %d %f"
~/.mutt/mailbox-local lists your dirs/folders setup for message filtering:
=.random # note: the last line does not end with backslash
Disclaimer: I’ve just shown basic settings here. Let me know if you are looking for any specific info.