I am trying to add those headers to email sent via the postfix server:
Precedence: bulk
Auto-Submitted: auto-generated
These are the configuration files and only header_checks adds the correct header.
/etc/postfix/main.cf
#add header
header_checks = regexp:/etc/postfix/header_auto_submitted
# ALSO WORKS:
#header_checks=regexp:/etc/postfix/header_precedence_bulk
# DOES WORK:
#smtp_header_checks = regexp:/etc/postfix/header_warn
# DOES NOT WORK FOR SOME REASON:
smtp_header_checks = pcre:/etc/postfix/header_precedence_bulk.pcre
#smtp_header_checks=regexp:/etc/postfix/header_precedence_bulk
This does add the Precedence: bulk header:
header_checks=regexp:/etc/postfix/header_precedence_bulk
This also does not work: /etc/postfix/master.cf
10025 inet n - n - - smtpd -o smtp_header_checks = pcre:/etc/postfix/header_precedence_bulk.pcre
Here are the files containing the regexp:
/etc/postfix/header_auto_submitted
/^MIME-Version:/i PREPEND Auto-Submitted: auto-generated
/etc/postfix/header_warn
/^subject:/ WARN
/etc/postfix/header_precedence_bulk.pcre and
/etc/postfix/header_precedence_bulk
/^MIME-Version:/i PREPEND Precedence: bulk
So the header_precedence_bulk file is correct.
Also the smtp_header_checks = regexp:/etc/postfix/header_warn works. So the smtp_header_checks is not blocked anywhere.
How can we make smtp_header_checks prepend both headers on the Postfix server?