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: [email protected] <mailto:[email protected]> are rejected, but with this one

postmap -q "From: u&[email protected]" regexp:/etc/postfix/regexp_table returns REJECT "4 - Your Email address is not compliant with RFC, Go Away"

postmap -q "From: [email protected]" 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 [email protected] <mailto:[email protected]>", 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