[oclug] Procmail Recipes

Gorm Jensen gjensen at magma.ca
Fri Mar 29 13:16:27 EST 2002


I am trying to filter incoming email using procmail recipes.  So far,
these work:
:0:
*^Received: .*co.kr
IN-spam
:0:
*^Content-Type: .*[Kk][Ss]_[Cc]_5601-1987
IN-spam
These don't work:

SHELL=/bin/sh
# 211.200.0.0 => 211.255.25.255
BLOCKIP='211\.2[0-5][0-9]\.[0-9]\{1,3\}\.[0-9]\{1,3\}'
:0
*$^Received:.*${BLOCKIP}
{
    EXITCODE=77
    :0:
    *^*
    IN-spam
}
# 210.216.0.0 => 210.223.255.255
BLOCKIP='210\.22[0-3]\.[0-9]\{1,3\}\.[0-9]\{1,3\}'
:0:
*^Received:.*${BLOCKIP}
IN-spam

:0:
*^Received:.*210\.22[0-3]\.[0-9]\{1,3\}\.[0-9]\{1,3\}
IN-spam

The filter expressions work via grep on the mbox, but it appears that
anything involving an ip address is inoperative via procmail.  What's
wrong????





More information about the OCLUG mailing list