[Techtalk] stripping attachments with postfix
Kai MacTane
kmactane at GothPunk.com
Sat Jul 24 00:21:13 EST 2004
At 7/23/04 11:03 PM , Carla Schroder wrote:
>OK, we all know
>
>/filename=\"?(.*)\.(bat|chm|cmd|com|do|exe|hta|jse|rm|scr|pif|vbe|vbs|vxd|
>xl)\"?$/
>
>for rejecting messages with certain attachments. How would you write this to
>reject all types of attachments? Blow away everything with one big wildcard?
Okay, I don't know Postfix for squat. But in regex terms, I suspect:
/filename=\"/
might do what you're looking for. That way, it'll even nail attachments
that don't have periods in them anywhere. (Like those annoying ones from
mailers that bundle up the entire contents of the email as an attachment
whose name matches the Subject: header... like 'Re: stripping attachments
with postfix' or whatever.)
--Kai MacTane
----------------------------------------------------------------------
"These eyes see more than window dressings
and stoic virtue of mannequins:
Somewhere beyond the world of single dimension,
Beyond the façade of the sensual,
Where nothing cuts you deeper than your own blade."
--The Last Dance,
"Fairytale (the Storm)"
More information about the Techtalk
mailing list