[kwlug-disc] Mutt + Procmail (+ fetchmail)

Chris Frey cdfrey at foursquare.net
Sun Dec 14 23:01:48 EST 2008


Hi Kyle,

I use mutt + procmail for my email, very similar to your setup.  I also
ssh into my ISP to process my email.  I'm a bit surprised that you consider
this too slow on a slow connection.  You must have a really slow connection
if text is an issue. :-)

Anyway, I've setup procmail to filter mail into /home/cdfrey/Mail, using
one mbox file per filter.  Filters are usually setup according to mailing
lists, or people, or projects.  I use it to do all my spam filtering too,
which is basically a whitelist system.

I use a C++ program I wrote myself which I use to generate command line
reports on what is new.  This program is written to cache as much information
as possible, since the server I use for email is often overloaded CPU-wise,
and I don't want to wait.

My general method for reading mail involves:

# ./newmail -n

 Total     New  Mbox                                                          
------  ------  ----------------------------------------------                
   585     562 *asterisk-dev (54)
  2051    1979 *asterisk-users (97)
  1243      84 *barry (8)
   339     177 *bochs-dev (1)
  3029    1702 *boost (41)
  2390       3 *cdfrey (3)
   116     116 *cdfrey-misc (76)
  4722    4686 *coreboot (78)
  1620      87 *cryptography (3)
   132       1 *debian (1)
  1062     928 *full-disclosure (13)
    28      19 *gentoo-announce (2)
  1128     281 *git (164)
   288     146 *gnupg-users (9)
  5032    4891 *gnuradio-discuss (6)
   834       5 *kwlug (3)
  5261    5261 *linux-kernel (555)
   712     362 *linux-thinkpad (20)
  5305    5112 *linux-usb-devel (33)
     2       2 *open-graphics (1)
   780      98 *plusplus (2)
  5111     360 *qemu-devel (248)
    40      18 *slashdot (3)

This shows me how many messages are in each mbox, how many are unread,
and how many are new since the last time I ran newmail.

Then I read the mailbox with:

# mutt -f Mail/kwlug

Tab completion saves me typing most of this, so I don't mind the command line.

I don't like using the 'c' command, since it doesn't seem to let me
control the new message markers to my liking.  I make heavy use of mutt's
'$' command, the 'x' command, and even the 'w' command, to keep the
read pointers where I want them.  This probably reflects a deficiency
in my method of email processing, but it is what works so far. :-)

This setup leaves me at the command line most of the time, using newmail
to see what's new, and mutt only as a mail reader one mbox at a time.
I also have helper scripts, for example, that will cycle through all
mboxes with new mail, etc.

I don't make use of IMAP or POP at all.  If my connection was exceedingly
slow so as to make a remote command line unusable, then I'd probably want
to download my mail to a local machine as well.  So far, connection speed
has not been a problem, even when I used to be on dialup.

Since all my mail is stored on a remote server, I also do periodic backups,
using a simple ssh+tar download.  I also have other programs I've written
that calculate SHA1 sums on each message in an mbox file, so I can verify
my mail has not been altered, at least for important mailboxes.

If this setup sounds useful to you, let me know and I can send you the
source code to newmail, mboxsum, and a supporting script or two.

I'm sure my system could be improved, so I'm interested in hearing what you
end up with.

- Chris





More information about the kwlug-disc mailing list