Zitat von Jeroen Geilman <jer...@adaptr.nl>:

On 11/12/2010 01:00 PM, lst_ho...@kwsoft.de wrote:
Zitat von Mingliang Zu <mingliang...@gmail.com>:

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...

Don't test from localhost because it is included in permit_mynetworks most of the time. Further on you should use recipient verification

No. Why ?

so *every* MAIL FROM not valid is rejected,

Address verification is not a silver bullet. Don't make blanket statements like he SHOULD use it.

Sorry, confused with RCPT TO ...
That's why the statement with permit_mynetworks and recipient verification as opposed to sender verification which is by no means a silver bullet.

Regards

Andreas

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to