Call me old-skool, but I like Pine. A lot of people like their fancy Thunderbird or Evolution, or even (shudder) Outlook, but I’m a confirmed Pine user. I like the speed, and I’m a CLI nerd, too. I know from #lopsa that a lot of other LOPSAns are Pine users as well. Mutt is also moderately popular, but I could never make the switch; my brain was already mapped to Pine key bindings.
As much as I like Pine, though, there were a few features I found lacking. The biggest one was a “Trash” folder. I’m delete-happy, and frequently find myself digging through the trash to get something out, be it a whole email or just an address. Pine is very Un*xy in its implementation: something deleted is deleted, sayonara, ciao, toodle-oo, [BALEETED|http://www.hrwiki.org/index.php/50_emails]! So I wrote a filter rule that would file deleted messages into a “Trash” folder for me. Rather than take you through the step-by-step to create this filter through Pine, I’ll just give you the entry in my .pinerc:
patterns-filters2=LIT:pattern=”/NICK=trash-dont-expunge/SIZE=(0,1048576)/FLDTYPE=EMAIL/FOLDER=INBOX/STATD=YES”
action=”/FILTER=1/FOLDER={imap.NebrWesleyan.edu}Trash/NOKILL=1/STATD=CLR”
That’ll need to be one line in .pinerc. ‘patterns-filters2′ is where any of your custom filters go; you just describe each one with this big long ugly string. In this case, I’ve created a filter called “trash-dont-expunge”; when anything in my Inbox smaller than 1 Mb is marked as deleted (“STATD=YES”), I move it into a Trash folder instead of deleting it and clear the deleted flag. Hey presto, it’s a Trash folder in Pine! And, in my case, my Trash folder is on our IMAP host, so I can access it anywhere.
Now that Pine I’d brought Pine into the 19th century, I decided to add a few features that aren’t in any other mail clients (AFAIK). Namely, I wanted it to automatically purge any sent items that were either old or large. (We have very small mail quotas, so space is always at a premium.) I set up these filters:
patterns-filters2=…,
LIT:pattern=”/NICK=Delete old sent/AGE=(90,INF)/FLDTYPE=SPEC/FOLDER={imap.NebrWesleyan.edu}Sent” action=”/FILTER=1″,
LIT:pattern=”/NICK=Delete large sent/SIZE=(102400,INF)/FLDTYPE=SPEC/FOLDER={imap.NebrWesleyan.edu}Sent” action=”/FILTER=1″
Note that patterns-filters2 is just a comma-delimited list of filters. Here, “Delete old sent” takes anything older than 90 days in the “Sent” folder on our IMAP host and deletes it. This keeps the number of sent items down to a manageable level. (As of today, 19 June 2006, I have 689 sent messages, going back to 22 March.)
The second filter finds anything in the “Sent” folder over 100 Kb and deletes it. Chances are, any attachments I uploaded were already on my machine; I don’t need to save another copy of them. Looking through my messages, there’s usually a *big* gap between the messages under 70 Kb, with maybe a single Word (or OpenDocument) attachment and the messages over 200 Kb with screenshots, large PDFs, etc. 100 Kb seemed like a good threshold for me.
Like my Trash, I use my “Sent” folder a lot, to remember what I said, to remember what other people said, to find addresses, etc. My “Sent” folder even works like a second Trash folder since I know that, if I responded to something and then deleted it, it’s in my Sent. (We automatically expunge the Trash folder every 2-3 weeks, so that’s a good thing!)
I also applied my “Delete large sent” filter to my Junk Mail folder (which is automatically filtered out by Sophos PureMessage); I don’t need to keep giant spam mails around hogging my precious space.
Most of these filters require Pine >= 4.6 to work.
Anyone else have some fun Pine filters? Post ’em below!