Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-13 Thread /dev/rob0
On Sat, Nov 13, 2010 at 10:20:02PM +0800, Mingliang Zu wrote: > > Another thing the OP has missed is what Noel has demonstrated > > above, that the default smtpd_delay_reject means > > smtpd_sender_restrictions won't be evaluated until the RCPT TO: > > command. > > Bingo! I added smtpd_delay_re

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-13 Thread Mingliang Zu
> > Another thing the OP has missed is what Noel has demonstrated above, > that the default smtpd_delay_reject means smtpd_sender_restrictions > won't be evaluated until the RCPT TO: command. > Bingo! I added smtpd_delay_reject=no to force the error reporting right after MAIL FROM command, which s

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread Jeroen Geilman
On 11/12/2010 06:58 PM, /dev/rob0 wrote: On Fri, Nov 12, 2010 at 10:15:03AM -0600, Noel Jones wrote: On 11/12/2010 6:47 AM, Mingliang Zu wrote: smtpd_sender_restrictions = reject_non_fqdn_sender Good, that setting does what you have asked. Testing that here gives: ... MAIL F

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread /dev/rob0
On Fri, Nov 12, 2010 at 10:15:03AM -0600, Noel Jones wrote: > On 11/12/2010 6:47 AM, Mingliang Zu wrote: >> smtpd_sender_restrictions = reject_non_fqdn_sender > > Good, that setting does what you have asked. Testing that here gives: > ... > MAIL FROM: > 250 2.1.0 Ok > RCPT TO: > 504 5.5.2 : Sender

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread mouss
Le 12/11/2010 12:40, Mingliang Zu a écrit : 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

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread Noel Jones
On 11/12/2010 6:47 AM, Mingliang Zu wrote: Mingliang Zu should show us the output of "postconf -n" rather than snips from main.cf . -- Noel Jones Sorry. Here is my entire conf: [r...@rhel5 postfix]# postconf -n ... non_fqdn_reject_code = 501 The default reje

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread Jeroen Geilman
On 11/12/2010 01:42 PM, Noel Jones wrote: On 11/12/2010 6:20 AM, Jeroen Geilman wrote: On 11/12/2010 01:17 PM, Mingliang Zu wrote: sigh. did you change the order of the restrictions ? Yes. reject_non_fqdn_sender is now the only restriction. And these configurations are at the last lines of mai

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread lst_hoe02
Zitat von Jeroen Geilman : On 11/12/2010 01:00 PM, lst_ho...@kwsoft.de wrote: Zitat von Mingliang Zu : 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 lu

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread Mingliang Zu
> > > Mingliang Zu should show us the output of "postconf -n" rather than snips > from main.cf. > > > -- Noel Jones > Sorry. Here is my entire conf: [r...@rhel5 postfix]# postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_at_myorigin = no append_dot_mydomain = no

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread Noel Jones
On 11/12/2010 6:20 AM, Jeroen Geilman wrote: On 11/12/2010 01:17 PM, Mingliang Zu wrote: sigh. did you change the order of the restrictions ? Yes. reject_non_fqdn_sender is now the only restriction. And these configurations are at the last lines of main.conf. Is this OK? [r...@rhel5 postfix]#

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread Mingliang Zu
> > >> No, this is not okay. You do not show what OTHER restrictions are in > effect. > > For this to work, that restriction must be matched BEFORE you allow > mynetworks. anywhere. > > > -- > J. > I'll have a check Thanks, Mingliang

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread Jeroen Geilman
On 11/12/2010 01:17 PM, Mingliang Zu wrote: sigh. did you change the order of the restrictions ? Yes. reject_non_fqdn_sender is now the only restriction. And these configurations are at the last lines of main.conf. Is this OK? [r...@rhel5 postfix]# tail main.cf # readme_directory: The loc

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread Mingliang Zu
> > sigh. did you change the order of the restrictions ? Yes. reject_non_fqdn_sender is now the only restriction. And these configurations are at the last lines of main.conf. Is this OK? [r...@rhel5 postfix]# tail main.cf # readme_directory: The location of the Postfix README files. # readme_dire

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread Jeroen Geilman
On 11/12/2010 01:07 PM, Mingliang Zu wrote: Thanks for the quick reply Jeroen, But it looks reject_non_fqdn_sender doesn't help: [r...@rhel5 postfix]# grep fqdn main.cf smtpd_sender_restrictions = reject_non_fqdn_sender sigh. did you change the order of the restrictions ? no

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread Mingliang Zu
Thanks for the quick reply Jeroen, But it looks reject_non_fqdn_sender doesn't help: [r...@rhel5 postfix]# grep fqdn main.cf smtpd_sender_restrictions = reject_non_fqdn_sender non_fqdn_reject_code = 501 [r...@rhel5 postfix]# postfix reload postfix/postfix-script: refreshing the Postfix mail system

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread Jeroen Geilman
On 11/12/2010 01:00 PM, lst_ho...@kwsoft.de wrote: Zitat von Mingliang Zu : 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

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread lst_hoe02
Zitat von Mingliang Zu : 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_envelo

Re: Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread Jeroen Geilman
On 11/12/2010 12:40 PM, Mingliang Zu wrote: 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 '@'. Add reject_non_fqdn_sender to your restriction list. "Reject a sender" is not the same as a syntax error; however

Reject "MAIL FROM" command if the sender address doesn't contain @

2010-11-12 Thread Mingliang Zu
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 unf