1

Topic: Client IP address, user-agent header removal and dkim fail

============ Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Linux/BSD distribution name and version:  Debian 7
- Related log if you're reporting an issue:
====

DKIM check is failing after modifying the source header to remove client user agent, IP address, and some other identifying data using postfix headers_check. It fails with this message:

Authentication-Results: mail1.domain.com (amavisd-new);
    dkim=fail (2048-bit key) reason="fail (message has been altered)"
        header.d=domain.com

The following steps were used to modify header message:
created smtp_header_checks.pcre in /etc/postfix/ with content:

/^\s*(Received: from)[^\n]*(.*)/ REPLACE $1 [127.0.0.1] (localhost [127.0.0.1])$2
/^\s*User-Agent/        IGNORE
/^\s*X-Enigmail/        IGNORE
/^\s*X-Mailer/          IGNORE
/^\s*X-Originating-IP/  IGNORE

appended to main.cf in /etc/postfix/:

smtp_header_checks = pcre:/etc/postfix/smtp_header_checks.pcre

Amavis setting  '$signed_header_fields{'to'} = 0' in/etc/amavis/conf.d/50-user does not seem to have any effect with dkim check fail. Is there a better approach to the same goal or a correction to the steps above?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Client IP address, user-agent header removal and dkim fail

Does it work if you remove header check rule for 'Received:' header?