Re: How to hold a specific recipient

2019-10-17 Thread Noel Jones

On 10/17/2019 5:19 AM, (lists) Denis BUCHER wrote:

I suppose that it would be more correct this way :

  * smtpd_recipient_restrictions = check_recipient_access
hash:/etc/postfix/recipient_access
  * smtpd_relay_restrictions = permit_mynetworks
permit_sasl_authenticated defer_unauth_destination

Is that right ?


Yes.  Also, once you're confirmed that postfix is working the way 
you intend, the defer_unauth_destination safety net should be 
changed to reject_unauth_destination.




  -- Noel Jones


Re: How to hold a specific recipient

2019-10-17 Thread (lists) Denis BUCHER

Le 17.10.2019 à 00:16, Noel Jones a écrit :

On 10/16/2019 4:48 PM, (lists) Denis BUCHER wrote:

Hello everyone,

I read a lot of emails on this ML and on the web without finding the 
solution, or I do something wrong.


I just want that all emails to a specific recipient are put on hold.

I thought this would work, but it doesn't :

  * main.cf :
  o smtpd_relay_restrictions = check_recipient_access
    hash:/etc/postfix/recipient_access permit_mynetworks
    permit_sasl_authenticated defer_unauth_destination
  * /etc/postfix/recipient_access :
  o em...@domain.ch    HOLD
  * postmap /etc/postfix/recipient_access

Thanks in advance a lot for any hint or help !

Denis



That's (mostly) correct, although it should really be in 
smtpd_recipient_restrictions.


Some random thoughts:

Mail must arrive via SMTP for the smtpd restrictions to work. Mail 
arriving via postdrop or the "sendmail command" do no use smtpd 
restrictions.


The smtp restrictions work on the envelope recipient address, which 
may not be the same as displayed in the To: header.  The envelope 
recipient is what postfix shows in the logs.


Mail that is rejected is not placed on hold.

non-ascii garbage in main.cf or the access map can cause unexpected 
behavior.


be sure to run "postmap hash:/etc/postfix/recipient_access" and 
"postfix reload" after editing main.cf.



For further assistance, show your "postconf -nf"  and log lines 
showing the mail you're trying to hold.



  -- Noel Jones


Yes, that's great : it works now!

But my curent (working) configuration includes maybe too much :

 * smtpd_recipient_restrictions = check_recipient_access
   hash:/etc/postfix/recipient_access
 * smtpd_relay_restrictions = check_recipient_access
   hash:/etc/postfix/recipient_access  permit_mynetworks
   permit_sasl_authenticated defer_unauth_destination

I suppose that it would be more correct this way :

 * smtpd_recipient_restrictions = check_recipient_access
   hash:/etc/postfix/recipient_access
 * smtpd_relay_restrictions = permit_mynetworks
   permit_sasl_authenticated defer_unauth_destination

Is that right ?

Thank you very much for your help :-)

Denis



Re: How to hold a specific recipient

2019-10-16 Thread Noel Jones

On 10/16/2019 4:48 PM, (lists) Denis BUCHER wrote:

Hello everyone,

I read a lot of emails on this ML and on the web without finding the 
solution, or I do something wrong.


I just want that all emails to a specific recipient are put on hold.

I thought this would work, but it doesn't :

  * main.cf :
  o smtpd_relay_restrictions = check_recipient_access
hash:/etc/postfix/recipient_access permit_mynetworks
permit_sasl_authenticated defer_unauth_destination
  * /etc/postfix/recipient_access :
  o em...@domain.ch    HOLD
  * postmap /etc/postfix/recipient_access

Thanks in advance a lot for any hint or help !

Denis




That's (mostly) correct, although it should really be in 
smtpd_recipient_restrictions.


Some random thoughts:

Mail must arrive via SMTP for the smtpd restrictions to work.  Mail 
arriving via postdrop or the "sendmail command" do no use smtpd 
restrictions.


The smtp restrictions work on the envelope recipient address, which 
may not be the same as displayed in the To: header.  The envelope 
recipient is what postfix shows in the logs.


Mail that is rejected is not placed on hold.

non-ascii garbage in main.cf or the access map can cause unexpected 
behavior.


be sure to run "postmap hash:/etc/postfix/recipient_access" and 
"postfix reload" after editing main.cf.




For further assistance, show your "postconf -nf"  and log lines 
showing the mail you're trying to hold.





  -- Noel Jones


How to hold a specific recipient

2019-10-16 Thread (lists) Denis BUCHER

Hello everyone,

I read a lot of emails on this ML and on the web without finding the 
solution, or I do something wrong.


I just want that all emails to a specific recipient are put on hold.

I thought this would work, but it doesn't :

 * main.cf :
 o smtpd_relay_restrictions = check_recipient_access
   hash:/etc/postfix/recipient_access permit_mynetworks
   permit_sasl_authenticated defer_unauth_destination
 * /etc/postfix/recipient_access :
 o em...@domain.ch    HOLD
 * postmap /etc/postfix/recipient_access

Thanks in advance a lot for any hint or help !

Denis