Page 1 of 1

Duplicate entries in etc/postfix/header_checks-solution

Posted: 23 Aug 2019 21:08
by henk
rpmbuild/SOURCES/eFa-4.0.0/updates/update-4.0.0.sh Line 389:

Code: Select all

if [[ -z $(grep '^Received: from localhost' /etc/postfix/header_checks) ]]; then
checks if it returns an empty string. If so, the following line needs to be added to the '/etc/postfix/header_checks' file

Code: Select all

"/^Received:\ from\ localhost\ \(localhost\ \[127.0.0.1\]\)/ IGNORE"
The text in the test is different than the text added to the header_checks file.

Possible solution: change line 389 to:

Code: Select all

if [[ -z $(grep '\^Received:\\ from\\ localhost' /etc/postfix/header_checks) ]]; then
Now it should be able to detect if the line is indeed present or not.

Temp Fix:

Code: Select all

/etc/postfix/header_checks
# HEADER_CHECKS(5)
/^Received:\ from\ sansspam.private.lan\ \(localhost\ \[127.0.0.1/ IGNORE
/^Received:\ from\ sansspam.private.lan\ \(localhost\ \[::1/ IGNORE
/^Received:\ from\ localhost\ \(localhost\ \[127.0.0.1\]\)/ IGNORE
/^Received:\ from\ localhost\ \(localhost\ \[127.0.0.1\]\)/ IGNORE
/^Received:\ from\ localhost\ \(localhost\ \[127.0.0.1\]\)/ IGNORE
/^Received:\ from\ localhost\ \(localhost\ \[127.0.0.1\]\)/ IGNORE

Remove the duplicate lines and run the following commands

Code: Select all

postmap /etc/postfix/header_checks
systemctl restart postfix
systemctl restart opendmarc.service