[Mimedefang] Recycling procmail recipes

Jan Pieter Cornet johnpc at xs4all.nl
Wed Oct 26 16:44:04 EDT 2005

On Wed, Oct 26, 2005 at 07:33:06AM -0700, Kenneth Porter wrote:
> <http://www.softwolves.pp.se/blog/2004-06-23,en>
> It struck me that it might be useful to use the filter with minor editing 
> directly in MD in some way. Is there a Perl module that can parse procmail 
> recipes, or has anyone come up with a clever way to convert a procmail 
> filter to an MD filter subroutine?

I don't believe that that is possible, for any general procmail
filter. However, this filter looks pretty straightforward and
shouldn't be too hard to convert manually. Which is what I'd do.

Or convert it to spamassassin rulesets: even easier.

> For this case I probably just want to reject the message.

I definately don't think that reflecting any incoming mailbombs
toward abuse departments is a sane thing to do :) (see also his
own followup). Rejecting seems like a good idea.

> --On Wednesday, October 26, 2005 7:33 AM -0700 Kenneth Porter 
> <shiva at sewingwitch.com> wrote:
> >Is there a Perl module that can parse procmail recipes
> For reference, I did find Mail::Procmail:
> <http://search.cpan.org/~jv/Mail-Procmail-1.08/lib/Mail/Procmail.pm>
> But it doesn't appear to have an option to use an existing procmailrc. It 
> also depends on Mail::Internet (part of MailTools), which on its CPAN page 
> deprecates itself in favor of Mail::Box because the latter "handles modern 
> messages much better".

Mail::Procmail is only for a procmail-alike filtering mechanism, and
doesn't try to mimick the .procmailrc syntax at all. I wouldn't worry
about Mail::Internet too much, though... Mail::Box is more modern, but
also... well... incredibly extended to handle all possible aspects of
email. Mail::Internet is still being bugfixed, it just doesn't get
any new features.

#!perl -wpl # mmfppfmpmmpp mmpffm <pmmppfmfpppppfmmmf at fpffmm4mmmpmfpmf.ppppmf>
$_[2]}->(map{/p|f/i+/f/i}split//,$&)+97):qw(m p f)[map{((ord$&)%32-1)/$_%3}(9,
3,1)]),5,1)='`'lt$&;$f.eig;                                # Jan-Pieter Cornet

More information about the MIMEDefang mailing list