ansible-postfix icon indicating copy to clipboard operation
ansible-postfix copied to clipboard

postfix_smtpd_recipient_restrictions is mandatory to set

Open igorshergin opened this issue 3 years ago • 1 comments

Not sure which version of Postfix started that, but I get non-working postfix with fatal error while trying your playbook examples:

Feb 3 13:07:13 git postfix/smtpd[75989]: fatal: in parameter smtpd_relay_restrictions or smtpd_recipient_restrictions, specify at least one working instance of: reject_unauth_destination, defer_unauth_destination, reject, defer, defer_if_permit or check_relay_domains

So it seems postfix_smtpd_recipient_restrictions: - check_relay_domains is mandatory for the simplest relay configuration.

igorshergin avatar Feb 03 '22 14:02 igorshergin

Encountered this error in Ubuntu 22.04 beta, using the "For Gmail support" configuration.

Adding this raw option declaration worked on the Ubuntu system showing the error, as well as the Debian 10 and 11 systems under the same configuration, meaning it is backward compatible:

postfix_raw_options:
  - "smtpd_relay_restrictions = reject_unauth_destination"

More context from the Ubuntu system that was affected:

$ apt-cache show postfix
Package: postfix
Architecture: amd64
Version: 3.6.4-1ubuntu1

kso512 avatar Apr 18 '22 22:04 kso512

smtpd_relay_restrictions is supported, so probably no need to use postfix_raw_options anymore

tersmitten avatar Mar 20 '24 16:03 tersmitten