I have procmail and spamassassin (under Fedora Core 4) diverting much of my spam into a folder where I can look at it later. What I'd like to have is a cron job that, every night, will create a "mail"-type listing of all the message summaries in that folder. What I want is the kind of summary you get when you first start "mail" -- message number, sender address, message date, message size, and message subject.
Is there a way to do this? The following comes pretty close:
Code:
echo 'q' | mail -f spam.folder > spam.output
but it only prints the information for the first 20 messages in the folder (you're supposed to interactively do a "z+" to see the next 20) and it's only displaying the first 20 characters of the message subjects (why it's doing this, I have no idea).
I suppose I could grep through the folder for "Subject:" lines or somesuch, but the output from mail is close enough that I'd like to use it if I can. Any thoughts?