[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vps-mail] spam and procmail tricks



> On Mon, Jan 30, 2006 at 06:13:07PM +0100, ADNET Ghislain wrote:
>   
>> Hi,
>>
>>   I have a little problem on a VPS.
>>
>>  I wanted to send all spam to a pop account but in the server's
>> procmailrc and not in one of the user's procmailrc.. I used:
>>
>> :0:
>> * ^X-Spam-Flag: YES
>> ! postmaster
>>
>> but it was looping on itself sending to postmaster the email then back
>> to postmaster in a loop.
>>     
>
> So you want to add some loop detection:
>   

in fact i would prefer to say, if the mail is for postmaster and
postmaster@whatever then skip all the procmail rules but a loop
prevention will do the very same :)
>     ## deliver seen messages immediately
>     :0
>     * H ?? ^X-Loop: postmaster
>     { SWITCHRC }
>
>   
it means if we find the loop header then we stop processing ? this is
not well documented in the man page
>     ## find spammy messgages we haven't seen yet
>     :0
>     *   H ?? ^X-Spam-Flag: YES
>     * ! H ?? ^X-Loop: postmaster
>     {
>       ## ... and tag them
>       :0 fw
>       | formail -I "X-Loop: postmaster"
>
>       ## now resend the message to postmaster (will get caught in the
>       ## recipe above)
>       :0
>       ! postmaster
>     }
>   

ok i understand this part ! :)
> I haven't tested this, but it should be pretty close.
>
> Scott
>   
Thanks scott i will try it asap.

Ghislain.


Main Index | Thread Index
Match: Format: Sort by:
Search: