Logging your incoming email
Introduction
We all have to throw away incoming incoming email. It comes pouring in like water into a leaky boat. We must constantly bail just to keep afloat. But then it is inevitable that we throw away emails that we should have kept. This can have serious consequences if it causes the loss of an important contact or reply. This just happened to me. I knew I had to reply to someone about a certain matter, but had lost the person's email message. On another recent occasion, I got a petulant note asking why I had not responded to their previous email. I had no memory of this previous email and had no such email in my saved files. But perhaps I had mistakenly thrown it out.
Such things happen to me a few times a year.
I can almost always rescue myself from these situations because I have set up a system to log my incoming mail, recording the sender, date and subject line. Perhaps you would like to set up a similar log. This page tells how I did it at the U of C.
You may have another mail service that includes this feature. If so, never mind.
Procmail
Here is what I did in brief.
- I set up my Email account on the U of C email to forward a copy of my incoming mail to a unix machine where I have an account.
- I set up this unix email to use the procmail mail handling system
- I told procmail to log all the incoming emails and then throw them away.
- When I need to consult the log, I log into this unix machine via a text terminal connection.
this has worked reliably for me for many years.
To set up procmail, make a .forward file that says
"|exec /usr/bin/procmail"
Many unix systems have procmail installed. You can check whether it does by typing "man procmail". If yours doesn't, you have to install it.
Create a file named .procmailrc containing
#Set on when debugging
VERBOSE=off
#Replace `mail' with your mail directory (Pine uses mail, Elm uses Mail)
MAILDIR=$HOME/mail
#Directory for storing procmail log and rc files
PMDIR=$HOME/.procmail
LOGFILE=$PMDIR/log
INCLUDERC = $PMDIR/logonly
This refers to a script called "logonly" in the .procmail folder. This logonly script says
:0 # remove mail; we only want to log it.
/dev/null
Log files then come into a directory called .procmail
Log entries look like this:
From qsesame@7223.net Tue May 19 19:39:55 2009
Subject: [*****SPAM*****] Perhaps you could be my new friend.
Folder: /dev/null 3518