procmail
[Top] [All Lists]

Re: /dev/null a specific attachment using procmail

1999-06-04 01:59:48
On Thu, 3 Jun 1999 20:29:17 -0700 (PDT),
"Colin J. Raven" <cjraven(_at_)quik(_dot_)com> wrote:
I just finished reading searched results on procmail.org concerning the
exclusion of attachments using procmail. The few hits seem to indicate
that it's either;
a) highly impractical to use procmail to perform this function or
b) procmail should/could be sued to exclude email over a defined size.
My question is this; What about the _specific_ exclusion of one _named_
attachment only? 

Bingo. What makes general MIME handling somewhat impractical is that
the spec defines many paths to the same destination, and dealing with
them all is pretty hairy. Also the multi-line headers are hard to
parse correctly with only regular expressions -- you really need
something with loop constructs and a memory. (Some of this can be had
with recursive INCLUDERC=s but that's pretty arcane.)

Now, in +particular+ cases, you can probably find a regular expression
which matches the attachment you want to get rid of, and write a
simple script (sed, awk, Perl, or whatever tickles your fancy) to zap
that, once you have detected it with procmail.

In fact, searching for happy99 in the Rosat archive (not really part
of procmail.org, it's just an external link from the cover page)
should get you what you are looking for.

If all you're looking for is a quick answer to your question, check
out <ftp://ftp.rubyriver.com/pub/jhardin/antispam/procmail-security.html>

The existing staff now know to delete mail with ol h99 attached, but we're
adding so many people that I'd like to put a .procmailrc in each user's
shell and catch h99 before they even get their email.

Sounds more like the job for a global /etc/procmailrc file.

Specific pointers include John Hardin's security filters (URL above)
and Jari Aalto's Procmail MIME module. (The latter is actually an
attempt at doing MIME handling with Procmail. I haven't tried it, but
it might work.)

Find links to them at <http://www.iki.fi/era/procmail/links.html>

Oh, and the address for the searchable archive of this list is
<http://www.rosat.mpe-garching.mpg.de/mailing-lists/procmail/>

Hope this helps,

/* era */

-- 
.obBotBait: It shouldn't even matter whether     <http://www.iki.fi/era/>
I am a resident of the state of Washington. <http://members.xoom.com/procmail/>
 * Sign the European spam petition! <http://www.politik-digital.de/spam/en/> *

<Prev in Thread] Current Thread [Next in Thread>