smtpd_relay_restrictions in Postfix 2.11.3 on openSUSE 13.2 causes mail to local domain to be rejected

2015-03-09 Thread Earl Killian
My question is how to figure out why smtpd_relay_restrictions is being used for local recipients. (In the following, I've renamed the local domain name (which is listed in mydestination) to example.com to prevent email harvesting.) I upgraded a system from openSUSE 13.1 to 13.2 and got Postfix

Re: smtpd_relay_restrictions in Postfix 2.11.3 on openSUSE 13.2 causes mail to local domain to be rejected

2015-03-09 Thread Noel Jones
On 3/9/2015 10:46 AM, Earl Killian wrote: On 2015/3/9 08:12, Noel Jones wrote: You have misunderstood the purpose of smtpd_relay_restrictions. Your mail is rejected by the final reject you placed. *ALL* mail is evaluated by smtpd_relay_restrictions, and unless you have very unusual relay

Re: smtpd_relay_restrictions in Postfix 2.11.3 on openSUSE 13.2 causes mail to local domain to be rejected

2015-03-09 Thread Noel Jones
On 3/9/2015 6:14 AM, Earl Killian wrote: My question is how to figure out why smtpd_relay_restrictions is being used for local recipients. (In the following, I've renamed the local domain name (which is listed in mydestination) to example.com to prevent email harvesting.) I upgraded a

Re: smtpd_relay_restrictions in Postfix 2.11.3 on openSUSE 13.2 causes mail to local domain to be rejected

2015-03-09 Thread Earl Killian
On 2015/3/9 08:12, Noel Jones wrote: You have misunderstood the purpose of smtpd_relay_restrictions. Your mail is rejected by the final reject you placed. *ALL* mail is evaluated by smtpd_relay_restrictions, and unless you have very unusual relay requirements, you should either set it empty, or

Re: smtpd_relay_restrictions in Postfix 2.11.3 on openSUSE 13.2 causes mail to local domain to be rejected

2015-03-09 Thread Sebastian Nielsen
I would instead suggest setting the relay access to: check_sender_access hash:/etc/postfix/relay_auth, reject_unauth_destination where /etc/postfix/relay_auth is: YOUR_DOMAIN permit_mynetworks, reject [EXTERNAL_IP_OF_SMTP_SERVER] permit_mynetworks, reject This protects agains most malicious

Re: smtpd_relay_restrictions in Postfix 2.11.3 on openSUSE 13.2 causes mail to local domain to be rejected

2015-03-09 Thread Sebastian Nielsen
I have noticed some automated open relay testing services do fail a domain if it rejects a relay too early (eg in MAIL FROM). And you are a bit wrong with IP adress lookup. Yes, check_sender_access do not itself lookup IPs. But the rules I listed, will effectively expand to the rule:

Re: smtpd_relay_restrictions in Postfix 2.11.3 on openSUSE 13.2 causes mail to local domain to be rejected

2015-03-09 Thread Viktor Dukhovni
On Mon, Mar 09, 2015 at 05:56:20PM +0100, Sebastian Nielsen wrote: I would instead suggest setting the relay access to: check_sender_access hash:/etc/postfix/relay_auth, reject_unauth_destination where /etc/postfix/relay_auth is: YOUR_DOMAIN permit_mynetworks, reject

Re: smtpd_relay_restrictions in Postfix 2.11.3 on openSUSE 13.2 causes mail to local domain to be rejected

2015-03-09 Thread Noel Jones
Viktor and I are in agreement here. The smtpd_relay_restrictions should be kept as simple as possible to prevent accidents. It's too easy to make a mistake in a check_*_access table and inadvertently create an open relay. That's why smtpd_relay_restrictions was invented. It's fine to have a

Re: smtpd_relay_restrictions in Postfix 2.11.3 on openSUSE 13.2 causes mail to local domain to be rejected

2015-03-09 Thread Viktor Dukhovni
On Mon, Mar 09, 2015 at 07:50:13PM +0100, Sebastian Nielsen wrote: You propably didnt understand what I mean with open relay testing services failing a domain that rejects a relay too early: Imagine you did do as you told with putting the table in smtpd_sender_restrictions, and

Re: smtpd_relay_restrictions in Postfix 2.11.3 on openSUSE 13.2 causes mail to local domain to be rejected

2015-03-09 Thread Viktor Dukhovni
On Mon, Mar 09, 2015 at 06:53:21PM +0100, Sebastian Nielsen wrote: I have noticed some automated open relay testing services do fail a domain if it rejects a relay too early (eg in MAIL FROM). Obviously, Postfix cannot and does not reject relay attempts at MAIL FROM. At that point the

Re: smtpd_relay_restrictions in Postfix 2.11.3 on openSUSE 13.2 causes mail to local domain to be rejected

2015-03-09 Thread Sebastian Nielsen
You propably didnt understand what I mean with open relay testing services failing a domain that rejects a relay too early: Imagine you did do as you told with putting the table in smtpd_sender_restrictions, and smtpd_delay_reject = no. Imagine now a relay testing tool tests the server, and