extended my procmail LOGFILE converter

I have dozens of IMAP folders, that my ~/.procmailrc at my Internet provider’s site routes incoming messages to. In order to see, what’s new, I find it more reasonable to look at my procmail LOGFILE. I rather (“constantly”) watch my procmail LOGFILE with “tail -f” though.

I really find it rather useful, to copy an entry from that log to my emacs diary once in a while. That’s why I have a converter from “procmail LOGFILE” to “emacs diary”. I pipe the “tail -f ~/procmail-from” into my procmail-from2diary.pl:

ssh … -n tail -f procmail-from | procmail-from2diary.pl

Once in a while I want to create an .procmailrc entry from a message, that I just received, resp. from the e-mail address therein. Now my procmail-from2diary.pl also creates a secondary file with “raw” .procmailrc entries. E-mail addresses are getting properly backslashed, before they get written to there, so I just need to select the right IMAP target folder within the respective .procmailrc rule. And, yes, rather often I replace part of the e-mail address with a wildcard.

Of course, “From:” and “Subject” need to get converted from the MIME-Header format to UTF-8 by a utility within my .procmailrc. Otherwise you can’t really read them.

I really don’t know, why I did not create that feature 15 years ago. Creating .procmailrc entries really is a PITA. But copy+pasting them with only little manual work is fun (I hope). You need holidays to recognise and implement this kind of optimisation of your daily work.

This site uses Akismet to reduce spam. Learn how your comment data is processed.