.procmailrc has quietly sort of turned into a swamp
As part of trying to not read some mailing lists for a while, I was recently going through my
Doing this was eye-opening. It's not that my
.procmailrc was messy
as such, because I don't have rules that are sophisticated enough
to get messy (just a bunch of 'if mail is like <X>, put it into
file Y' filtering rules). Instead, mostly what it had was a whole
lot of old, obsolete rules that haven't been relevant for years.
Looking back, it's easy to see how these have quietly accreted over
time. Like many configuration files, I almost never look at my
.procmailrc globally, scanning through the whole thing. Instead,
when I have a new filtering rule I want to add, I jump to what seems
to be the right place (often the bottom) and edit the new rule in.
If I notice in passing what might be an obsolete filtering rule for
a type of email that I don't get any more, usually I ignore it,
because investigating is more work and wasn't part of my goal when
I did '
(The other thing that a strictly local view of changes has done to
.procmailrc is create a somewhat awkward structure for the
sequence of rules. This resulted in some semi-duplication of rules
and one bit of recent miss-classification, when I got the ordering
of two rules wrong because I didn't even realize there was an
As a result of stubbing my toe on this, I now
have two issues (or problems) I'm considering. The first is what
to do about those obsolete rules. Some of them are completely dead
and can just be deleted, but others are for things that just might
come back to life, even if it hasn't happened for years. There is
a part of me that wants to preserve those rules somewhere, just in
case I want them again some day. This is probably foolish. Perhaps
what I should do is save a backup copy somewhere (or just check my
.procmailrc into RCS first).
The second is how much of a revision to do. Having now actively
looked at the various things I'm doing and want to do in my
.procmailrc, there's a temptation to completely restructure it
by splitting my rules into multiple files and then including them
in the right spots. This would make where to put new rules clearer
to future me, make the overall structure much clearer, and make it
simpler to do global things like temporarily divert almost all the
mailing lists I get off to files (all those rules would be in one
file, so I'd either include it or not include it in my
On the other hand, grand reforms are arguably second system enthusiasm
showing. It might be that I'd spend a bunch of time fiddling around
with my mail filtering and wind up with a much more complicated,
harder to follow setup that basically did the same thing.
(Over-engineering in a fit of enthusiasm is a real hazard.)
PS: applications to other configuration files you might have lying around are left as an exercise for the reader, but I'm certainly suspecting that this is not the only file I have (or that we have) that exhibits this 'maintained locally but not globally' slow, quiet drift into a swamp.
Comments on this page:Written on 09 June 2017.