Julius Thijssen wrote:
OK, I'm using SMTP with TLS, and I'd like to eliminate part of the
header it generates;

Received: from system (ip-address [1.2.3.4])
        (using TLSv1 with cipher RC4-MD5 (128/128 bits))
        (No client certificate requested)
        by mail.some.serverdomain (Postfix) with ESMTPSA id 75F61CA22F
        for <jul...@gmail.com>; Mon, 18 May 2009 14:35:22 +0200 (CEST)

should become

Received: from system (ip-address [1.2.3.4])
        (using TLSv1 with cipher RC4-MD5 (128/128 bits))
        by mail.some.serverdomain (Postfix) with ESMTPSA id 75F61CA22F
        for <jul...@gmail.com>; Mon, 18 May 2009 14:35:22 +0200 (CEST)

I'm already using
smtpd_sasl_athenticated_header = no
but I was wondering how to best remove the client certificate mention.

I'm already using maps/header_checks for some other header-removal stuff,
but this is a hard one. Anyone who has already done this using REPLACE
or something?

Thanks,

Julius


Easy way:
smtpd_tls_received_header = no
Postfix will still indicate TLS was used by presence of the ESMTPS (for TLS only) or ESMTPSA (for TLS+SASL) tag.


Hard way:
Use the REPLACE action in a header_checks rule. Make sure your rule only matches headers added by your server. Something like (untested, season to taste):

IF /^Received: .*by mail.my.domain/
IF /no client certificate/
/(.*)\(No client certificate requested\)(.*)/
  REPLACE $1 $2
ENDIF
ENDIF

  -- Noel Jones

Reply via email to