On 02/14/2011 01:37 AM, Franck MAHE wrote:

OK, so this configuration seems to work fine.

/^From:.*<.*(\[|\]|\(|\)|\`|\;|\,|\^|\#|\:|\||\\|\@|<|>|\/|\!|\ |\$|"|"|\%|\&|').*@.*>/ REJECT "3 - Your Email address is not compliant with RFC, Go Away"

if !/^From:.*<.*@.*>/

/^From:.*([|]|\(|\)|`|;|,|^|#|:|\||\\|@|<|>|\/|!|$|"|%|&|').*@/ REJECT "4 - Your Email address is not compliant with RFC, Go Away"

Endif

In fact, for the regexp REJECT 4, if I leave \s, then all header From: u...@domain.tld <mailto:u...@domain.tld> are rejected, but with this one

postmap -q "From: u&s...@domain.tld" regexp:/etc/postfix/regexp_table returns REJECT "4 - Your Email address is not compliant with RFC, Go Away"

postmap -q "From: u...@domain.tld" regexp:/etc/postfix/regexp_table returns ACCEPT

I don't really need the same thing for the domain part as I reject all the mail with an invalid domain name.

Any idea for the REJECT 4 to reject the header "From: us e...@domain.tld <mailto:e...@domain.tld>", ie with a space in the first part.



The example I showed you, while being much more readable, already included the space.


--
J.

Reply via email to