I'm using postfix (2.7.0 on Ubuntu Linux 10.04.3) as mail relay and antispam 
filter. It's set up and works perfectly except one small bug.
I use smtpd_client_restrictions to filter SMTP clents as following:

     smtpd_client_restrictions =
       permit_mynetworks,
       reject_unknown_client_hostname,
       check_client_access regexp:/etc/postfix/client_access

And /etc/postfix/client_access with number of regex rules like:
     /google\.com/   OK
     /mail\.ru/ OK
     ......
     /schweiz029\.startdedicated\.com/       REJECT
     /rusguru/       REJECT
     /mail\.agere\.pt/       REJECT
     /relay\.tmsoft\-ltd\.com/       REJECT


This setup works like designed, filtering all clients successfully except ONE 
(/rusguru/ expression): 

Mar 27 06:12:15 mailrelay postfix/smtpd[14368]: connect from 
mail.rusguru.ru[195.3.141.61]
Mar 27 06:12:18 mailrelay postfix/smtpd[14368]: 0A03961A61: 
client=mail.rusguru.ru[195.3.141.61]
Mar 27 06:12:18 mailrelay postfix/cleanup[14482]: 0A03961A61: 
message-id=<084C071CD1FD4B01A5E885AAD6A6C083@wks01>
Mar 27 06:12:19 mailrelay spamd[5700]: spamd: connection from localhost 
[127.0.0.1] at port 33079
Mar 27 06:12:19 mailrelay spamd[5700]: spamd: processing message 
<084C071CD1FD4B01A5E885AAD6A6C083@wks01> for spamd:1001
Mar 27 06:12:24 mailrelay spamd[5700]: spamd: identified spam (7.7/5.0) for 
spamd:1001 in 5.6 seconds, 27372 bytes.
Mar 27 06:12:24 mailrelay spamd[5700]: spamd: result: Y 7 - 
FUZZY_XPILL,HTML_MESSAGE,RU_CERTIFICATE_KOI8,RU_CLASSES_1_KOI8,RU_SPAM_KOI8,RU_SUSPECTED_SPAM_KOI8,RU_WEBSITE_KOI8,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY
 
scantime=5.6,size=27372,user=spamd,uid=1001,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=33079,mid=<084C071CD1FD4B01A5E885AAD6A6C083@wks01>,autolearn=disabled,shortcircuit=no
Mar 27 06:12:24 mailrelay postfix/cleanup[14482]: 0A03961A61: 
milter-header-hold: header X-Spam-Status: Yes, score=7.7 required=5.0 
tests=FUZZY_XPILL from mail.rusguru.ru[195.3.141.61]; from=<fo...@rusguru.ru> 
to=<name@domain> proto=SMTP helo=<mail.rusguru.ru>: 
Mar 27 06:12:24 mailrelay postfix/smtpd[14368]: disconnect from 
mail.rusguru.ru[195.3.141.61]


As everyone can see postfix does not proper match regex expression. I've tried 
first full domain regex like /rusguru\.ru/, shorted to /rusguru/ only - no 
success. I believe, there is something to do with "ru" part repetition and, 
almost obvious, it is BUG in regex engine of postfix. I have no other 
explanations. Had no issues with other regex expressions. I do know it is not 
the latest version of postfix but before compiling latest one I want to be sure 
such bug is not present.
I don't know other way to reach postfix developers (no info on official web 
site) so post this in hope they visit this place or someone informs them.

Reply via email to