Postfix MTA can filter headers using header_check (built-in content inspection) directive. Open main.cf file, enter:
# vi /etc/postfix/main.cf
Now, turn on local recipient checking in the SMTP server, specify the header_checks parameter specifies an optional table with patterns:
header_checks = regexp:/etc/postfix/header_checksSave and close the file. Create /etc/postfix/header_checks file, enter:
# vi /etc/postfix/header_checks
Ignore 127.0.0.1, 10.24.55.1 and 192.168.0.[0-9] IP address (regex) from the headers :
/^Received:.*\[127\.0\.0\.1/ IGNORE
/^Received:.*\[10\.24\.55\.1/ IGNORE
/^Received:.*\[192\.168\.0\.[0-9]/ IGNORE
# postmap /etc/postfix/header_check
# service postfix reload
OR
# service postfix restart
See header_check(5) man page for further details.
No comments:
Post a Comment