On 1/26/2010 12:33 PM, Justin Piszcz wrote:
Hi,

How do I remove the: Received: from localhost line at the top of the e-mail
message?

Return-Path: <from-a-mailing-l...@host.org>
X-Original-To: myusern...@mydomain.com
Delivered-To: myusern...@mydomain.com
Received: from localhost (localhost.localdomain [127.0.0.1])
by lucidpixels.com (Postfix) with ESMTP id D9354321609
for <myusern...@mydomain.com>; Tue, 26 Jan 2010 13:26:23 -0500 (EST)
X-Virus-Scanned: Debian amavisd-new at lucidpixels.com
X-Spam-Flag: NO

I have already read the documentation for amavisd-new and postfix.

I have this in my 50-user and this removes the amavisd-new header:
# Do not show local amavisd-new header.
$insert_received_line = 0;

I have this in my header_checks.pcre:
/^Received: from localhost/ IGNORE

This needs to be more specific so you don't remove headers added by other servers. Maybe:
/^Received: from localhost.*by lucidpixels\.com /  IGNORE


Since I am running postfix+amavisd-new, I have the following options
enabled in my master.cf:

127.0.0.1:smtp inet n - - - - smtpd -o
receive_override_options=no_header_body_checks -o
strict_rfc821_envelopes=no

If you need special header_checks for your amavisd reinjection port, you should define a separate cleanup service with the custom header_checks. and of course remove the no_header_body_checks. See FILTER_README.


local.lan.address:smtp inet n - - - - smtpd -o
receive_override_options=no_header_body_checks -o
strict_rfc821_envelopes=no

OK, no header/body checks for the local network.


internet.ip.address:smtp inet n - - - - smtpd -o stress=yes -o
content_filter=amavisfeed:[127.0.0.1]:10024 -o
receive_override_options=no_address_mappings

Why would you force stress=yes? Shouldn't ever need to do that, except maybe briefly for testing.


If I remove the -o receive_override_options=no_header_body_checks, I
presume
the header will be removed but what other problems would that cause? Or,
is there a better way to IGNORE that header?

Justin.



Assuming your IGNORE rule is specific enough to not remove unintended headers, removing "no_header_body_checks" on the amavisd reinjection port won't break anything.

  -- Noel Jones

Reply via email to