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