Duplicate entries in etc/postfix/header_checks-solution

Bugs in eFa 4
Post Reply
henk
Posts: 517
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Duplicate entries in etc/postfix/header_checks-solution

Post 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
“We are stuck with technology when what we really want is just stuff that works.” -Douglas Adams
Post Reply