On our Postfix server we previously removed the Date
header from incoming emails and had Postfix automatically add it again to prevent spoofing the date and to work around mail servers with off clocks. However, this breaks DKIM signatures which include the Date
header. Is there a way with Postfix to keep the DKIM signature intact while recording the receive timestamp in a mail header (and optimally having it shown in MUA UIs)?
Previous and abolished solution:
/etc/postfix/main.cf
:
header_checks = pcre:/etc/postfix/maps/header_checks.pcre
always_add_missing_headers = yes
/etc/postfix/maps/header_checks.pcre
:
/^\s*Date:/ IGNORE
Received
header on received messages.