procmail
[Top] [All Lists]

Re: size+recipient to external

2001-03-03 21:18:50
Andrei_Loukinykh(_at_)users(_dot_)evp(_dot_)sf(_dot_)ukrtel(_dot_)net writes:
I just wonder  - is it possible with procmail to 
process all incoming mail on its 2 parameters - size and recipient
name(mailbox name)?

I need to get these 2 parameters and pipe them to the external program
(and continue procmail work , of course).

The LOGNAME environment variable contains the username of the recipient
being processed.  The size can be most easily be obtained by using a
weighted size comparison:

        :0
        * 1^1 > 1
        { }
        SIZE = $=

That puts the size of the message (header and body) into the SIZE variable.
If you want just the body size, use this:

        :0
        * B ?? 1^1 > 1
        { }
        SIZE = $=

(Note, the B flag on the recipe will _not_ work here: it does not affect
size comparisons.)

Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Re: size+recipient to external, Philip Guenther <=