procmail
[Top] [All Lists]

Re: Procmail Filtering...

1997-04-10 21:58:00
On Thu, 10 Apr 1997 22:11:39 -0400 (EDT) bias(_at_)pobox(_dot_)com (Liston Bias)
wrote:

1)  I would like to automatically detect all message which have any
type attachment.  I can wait to read these when I return.

For MIME attachments, I guess you could look for the
Content-Type: MULTIPART...header, which identifies a multipart
message (which *may* be a message with an attachment):

:0
* ^Content-Type: multipart
$DEFAULT

The above recipe would shunt any multipart messages to your default
mailbox.

2)  I would like to filter out all messages which are over a certain
length... Say 10K...  I can read this when I return.

This one is easy...take a look at the procmailrc(1) man page:

     <    Check if the total length of the mail is  shorter  than
          the specified (in decimal) number of bytes.

     >    Analogous to '<'.

So, for example:

:0
* < 10000
! user(_at_)host

Would forward to user(_at_)host all mail less than 10K (about) in size.

I think you'd be better off just using the size limitation, and not
worry about message attachments.

-- Lars

---
Lars Kellogg-Stedman * lars(_at_)bu(_dot_)edu * (617)353-8277
Boston University Office of Information Technology

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