tailmail

I frequently want to keep email about a pariticular project or topic in the same Unix directory as the project. Netscape and other mail programs allow one to make folders, but they are separated from the projects, leading to very scattreed lives. The two tools described on this page make it easy to collect one's emails about a project by taking the last email from the end of one's mail box and storing it into a Log file.


tailmail is a csh script that will extract the last email from your mail box (default ~/mbox).

tama is a csh script that uses tailmail to extract the last email(s) and attach them to the end of a Log file in the current directory.


puma is a csh script that will extract the any particular email from your mail box (default ~/mbox).

talo is a csh script that uses puma to extract the last email(s) switch their order and attach them to the end of a Log file in the current directory. This is necessary because the (ancient) elm program I use puts received mail into the end of the mbox AFTER I respond to the email.


Note Tailmail uses the (unfortunately) standard definition of an email start as "From " at the start of a line. This will fail sometimes, but there is no better standard. To handle this, tailmail will output something that LOOKS like an email to warn the user. (Some time I'll figure out how to make it put this error message to standard error. According to the UNIX C SHELL field Guide, p. 138 there is no way to do this and they provide a program echo2. Alternative: print command under ksh has -u2; see man print)




Schneider Lab

origin: 2002 February 15
updated: 2002 February 17