Le 14/08/2011 01:59, spamv...@googlemail.com a écrit :
> Hi..
> 
> Im running postfix with amavisd-new and everything works well but when
> i send a email the Header looks like:
> 
> Return-Path: <i...@example.org>
> Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34])
>         by mb8-4 (Cyrus v2.1.18-IPv6-Debian-2.1.18-1+sarge2) with
> LMTP; Sun, 14 Aug 2011 01:51:04 +0200
> X-Sieve: CMU Sieve 2.2
> Received: from [94.23.243.111] (helo=xx12345678.kimsufi.com)
>         by ms16-1.1blu.de with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
>         (Exim 4.69)
>         (envelope-from <i...@example.org>)
>         id 1QsNyq-0007o7-Fu
>         for it...@example1.org; Sun, 14 Aug 2011 01:51:04 +0200
> Received: from xx12345678.kimsufi.com (localhost [127.0.0.1])
>         by xx12345678.kimsufi.com (Postfix) with ESMTP id C7B6478C8A
>         for <it...@example1.org>; Sun, 14 Aug 2011 01:51:10 +0200 (CEST)
> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=example.org; h=
>         content-transfer-encoding:content-type:content-type:subject
>         :subject:mime-version:user-agent:from:from:date:date:message-id
>         :received; s=mail; t=1313279469; x=1315093869; bh=XHWzR0foaDil4f
>         Smh5z11RbvZRztFwNmsdD0Szz2oXg=; b=iNboU6b7MRfpRSWW9ku+fOGZhCBAvn
>         ZkSmhZi39BV0hifCEqAM6LohN7zAKGPchu7AXPqXaH6TKVQTaqtpDoCUv3QntlWT
>         ydGxzPeKbpTbAKvzJ/eoOl+DE1M9afjB1u5P2MYbb6gIUbRItXVa8QZzlAbDr6do
>         Ge3m5EdkeNxUU=
> X-Virus-Scanned: at xx12345678.kimsufi.com
> 
> Is there any knows Way to remove the
> Received: from xx12345678.kimsufi.com (localhost [127.0.0.1])
> Header ?



> 
> The Header is written after amavisd-new injects the signed mail back
> into postfix, so the header_checks does not match anymore

this is because you disabled header checks after the filter. you can use
different cleanup services instead (of disabling header checks).

127.0.0.1:10025 ....      smtpd
  -o cleanup_service_name=lastclean
  ...


lastclean ... cleanp
  -o header_checks=pcre:/etc/postfix/afterfilterhdr.pcre


and for the last cleanup, use header checks:

/^Received: from (\S+\.kimsufi\.com) \(localhost \[127\.0\.0\.1\]\)/
        IGNORE

Reply via email to