On 11/09/2021 13:24, Kristian wrote:
On 11/09/2021 13.43, Nick Howitt wrote:
As part of a backup script for cyrus-imapd, I'd like to temporarily
stop postfix delivering mails to cyrus-imapd and to just queue them.
If it is
I believe you can do this with check_recipient_access, e.g.:
/etc/postfix/main.cf:
smtpd_recipient_restrictions =
[..]
check_recipient_access pcre:/etc/postfix/recipient_checks.pcre
[..]
/etc/postfix/recipient_checks.pcre:
/.*\@.*/ HOLD
This should accept all incoming mail, and hold it in the queue that you
can later release with postsuper.
You'll need to reload postfix to have it re-read the .pcre file. Other
lookup tables probably work too.
Hmm. I've tried:
smtpd_recipient_restrictions = check_recipient_access
pcre:/etc/postfix/recipient_checks.pcre, permit_mynetworks,
permit_sasl_authenticated, reject_non_fqdn_hostname,
reject_non_fqdn_sender, reject_non_fqdn_recipient,
reject_invalid_hostname, reject_unauth_pipelining,
reject_unknown_recipient_domain, reject_rbl_client zen.spamhaus.org,
check_policy_service unix:/var/spool/postfix/postgrey/socket
So putting your restriction at the beginning.
cat /etc/postfix/recipient_checks.pcre
/.*\@.*/ HOLD
I've tried restarting and reloading postfix, and mails still are being
delivered internally immediately.
Nick