procmail
[Top] [All Lists]

Re: filter on attachments

2005-02-14 12:53:28
On Mon, Feb 07, 2005 at 10:42:35PM -0800, Professional Software
Engineering wrote:

At 22:45 2005-02-07 -0500, Technical Support wrote:
I want to set up my procmail so that all mail that comes into
my address FOO(_at_)BAR(_dot_)COM that has any attachment what-so-ever is
automatically forwarded to a new account NEW(_at_)BAR(_dot_)COM(_dot_)

In the .procmailrc for the account foo(_at_)example(_dot_)com (the poor sod 
who
owns bar.com must get a LOT of spam...):


:0
* 9876543210^0 ^Content-Type:[  ]*multipart/mixed
* 9876543210^0 B ?? ^Content-Type:[     ]*application
!new(_at_)example(_dot_)com

I'm not entirely persuaded that everything I'd call "any attachment
what-so-ever [sic]" has a "^Content-Type:[$whitespace]*application" line
in the body if it didn't already have a multipart/mixed Content-Type
field in the header, actually.  That is, ISTM there could be attachment
types that don't say "multipart/mixed" in the header and also don't
say "application" in the body.  I'm on vacation, though, and can't
take time to experiment to substantiate or disprove this.  So I'll
just throw it out there for feedback.

multipart/alternative).  If you wanted to increase the scope, eliminate the 
"/mixed" from the end of the condition line.  The second, matching a 

Yes, that'd be the first thing I'd do if my goal were to grab "any"
attachment.

-- 
dman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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