Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions target/postfix/main.cf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ smtpd_helo_required = yes
smtpd_delay_reject = yes
smtpd_helo_restrictions = permit_mynetworks, reject_invalid_helo_hostname, permit
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, check_policy_service unix:private/policyd-spf, reject_unauth_pipelining, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, reject_unknown_recipient_domain
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, reject_unknown_recipient_domain
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_unauth_pipelining
smtpd_sender_restrictions = $dms_smtpd_sender_restrictions
disable_vrfy_command = yes
Expand Down Expand Up @@ -96,9 +96,6 @@ milter_default_action = accept
smtpd_milters =
non_smtpd_milters =

# SPF policy settings
policyd-spf_time_limit = 3600

# Header checks for content inspection on receiving
header_checks = pcre:/etc/postfix/maps/header_checks.pcre

Expand Down
8 changes: 7 additions & 1 deletion target/scripts/startup/setup.d/dmarc_dkim_spf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,14 @@ function _setup_policyd_spf
policyd-spf unix - n n - 0 spawn
user=policyd-spf argv=/usr/bin/policyd-spf
EOF

sedfile -i -E \
's|^(smtpd_recipient_restrictions.*reject_unauth_destination)(.*)|\1, check_policy_service unix:private/policyd-spf\2|' \
/etc/postfix/main.cf
# SPF policy settings
postconf 'policyd-spf_time_limit = 3600'
EOF
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOF was advised to be dropped for this suggestion.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have read this more carefully, sorry 😨

Fixed in f62855f in PR #3261

else
_log 'debug' 'Disabling policyd-spf'
sedfile -i -E 's|check_policy_service unix:private/policyd-spf, ||g' /etc/postfix/main.cf
fi
}