Oefenweb / ansible-postfix

Ansible role to set up postfix in Debian-like systems
MIT License
174 stars 82 forks source link

postfix_smtpd_recipient_restrictions is mandatory to set #122

Closed igorshergin closed 7 months ago

igorshergin commented 2 years ago

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:

kso512 commented 2 years ago

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
tersmitten commented 7 months ago

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