Le 31/08/2010 00:40, Stan Hoeppner a écrit :
Patrick Lists put forth on 8/30/2010 4:34 PM:
Hi,
I got a lot of spam lately from dynamic hosts so gradually I have been
adding rules to block them with the help of the rules from
http://gabacho.reto.jp/en/anti-spam/anti-spam-system.html
Unfortunately this type keeps slipping through:
Received: from 200-161-108-143.dsl.telesp.net.br
My regex foo is pretty non-existant. Does anyone know what regexp line
would block such a hostname?
/^[12]?[0-9]{1,2}(-[12]?[0-9]{1,2}){3}\.(customer|dsl|dial-up)\.telesp\.net\.br$/
REJECT Generic - Please relay via ISP (telesp.net.br)
well, in this particular case, there's no point to be specific. a hash like
.dsl.telesp.net.br REJECT ....
is more than enough.
anyway, pcre is nice:
/^(\d+\W){3}\d+\.foo\.example$/ REJECT blah blah
That's all one line, TB wrapped it. You may as well just use this.
Over 1600 regex patterns matching generic dynamics and statics. Rejects
all generic dynamics, tags generic statics. Provided with no
warranties, use at your own risk, etc. Has worked well here.
http://www.hardwarefreak.com/fqrdns.regexp
Use in main.cf as:
check_client_access regexp:/etc/postfix/fqrdns.regexp
Try pcre and you'll love it:)