Hi,

I'm using postfix 2.3. My intention is to reject "MAIL FROM" command (give a
501 syntax error) if the sender doesn't contains '@'. I have worked on it
for two days but without any luck.

The following lines are added to main.cf. I was expecting
"strict_rfc821_envelope" to do the trick, but unfortunately, it doesn't.

smtpd_sender_restrictions =
    permit_mynetworks,
    reject_non_fqdn_sender,
    reject_unknown_sender_domain,
    permit
strict_rfc821_envelopes = yes
append_dot_mydomain = no
append_at_myorigin = no


See my test with these configurations:
[r...@rhel5 postfix]# telnet localhost smtp
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 formail.localdomain ESMTP Postfix
HELO LOCALHOST
250 formail.localdomain
MAIL FROM:<ABC>
250 2.1.0 Ok                       <=========== Still Ok


What other configurations can I add to make it not Ok?

Thanks in advance,
Mingliang

Reply via email to