I've been playing around with my mail filtering some more a lot recently. This is based on Simon's Mail::Audit module. Mail filtering in Perl is a risky business. One typo and your mail is assigned to oblivion. So Iââ¬â¢ve been mailing learning to program very defensively. For example, the whole of my code is placed in a string eval so if it fails to compile some reason (like, I'm coding lamely again) then the code can at least panic and dump the mail in my inbox rather than bouncing the mail back as undeliverable to the sender.
So, delivering mail with Perl may be really crazy, but you can do really cool things with it. For example, whenever I register for a site I give them a reply address that is unique to them at 2shortplanks.com so when they start spamming me I can filter this off with a rule. Of course, you can do this with any mail filtering, but Iââ¬â¢m feeling lazy (like all good Perl programmers); I have an address I can forward a mail to which will then add the address that the forwarded mail was sent to to my kill list. And an address that will cause the address sent from to be killed. And an address that will cause all mail from or to people to forever more be moved into another mail folder. So now I donââ¬â¢t ever edit my mail filter again. Yey. But waitââ¬Â¦it gets better.
I have a rule set up that allows me to use the ââ¬Ëone-day-onlyââ¬â¢ mail at 2shortplanks. These are of the format thingDDMMYY@twoshortplanks.com, and it only lets though mail for that one day. This is great for site registration and stuff where you just want a username and password, but you donââ¬â¢t want them spamming you for the rest of eternity. Isnââ¬â¢t Perl cool.
Oh, and as I was mucking about in Perl I implemented a quick hack to create a XML RSS document containing the name of the last person to post to the London Perl Mongers mailing list (try doing that in procmail) so that dipsy (the #London.pm infobot) can tell you this information.
Gah. All coded out now. See the filter for yourself at http://2shortplanks.com/temp/mailfilter.txt
What have us Perl lot been up to that doesn't involve coding? Well, we went and saw the camel at London Zoo yesterday. At least I assume we saw the camel that the London Perl Mongers sponsoredââ¬Â¦there were three and my ability to identify camels from one another is similar to my ability to program Python! In fact, we saw lots of other Perl and Open Source creatures. The llamas, the monkeys, owls, and the obligatory penguins. Oh, then we went to the pub.