On 8/31/2009 12:58 PM, none none wrote:
I've created this simple_filter:
http://www.postfix.org/FILTER_README.html#simple_filter

This is email, being sent via sendmail command, after it has been filtered:
----------------------------------------------------------------------------
Received: from [192.168.0.3] (unknown [192.168.0.3])
         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
         (No client certificate requested)
         by khole.example1.com (Postfix) with ESMTPSA id 5EDEC11425
         for<j...@example2.com>; Sun, 23 Aug 2009 18:15:02 +0200 (CEST)
Message-ID:<4a9aa581.3050...@starforce.biz>
Date: Sun, 23 Aug 2009 18:14:57 +0200
From: Root<r...@example1.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: j...@example2.com
Subject: Is it in?
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I think it should not be.

Should not be what?   It's unclear what you refer to here.


Filter is using this command:
/usr/local/sbin/sendmail -G -i -f r...@example1.com j...@example2.com
<msg-headers+body-from-above>

The sendmail commend is a pipe. Don't put headers+body on the command line.


I have 2 problems

Above command, if used as a root user results in MODIFIED headers+body
msg-headers+body MUST be exactly same, after it pass through filter
and STAY that way, until it leaves my server.
As first 2 lines below shows, another Received: header, has been
added, as soon as it passes through sendmail
----------------------------------------------------------------------------
Received: by khole.example1.com (Postfix, from userid 1003)
        id 1CCB111428; Mon, 23 Aug 2009 19:32:15 +0200 (CEST)

Yes, postfix adds a Received: header when a mail is received. There is no option to turn this off. You may be able to later remove the header with an appropriate header_checks entry, but be careful when removing headers.


Second problem:
If msg-headers+body from begening of this post, is being sent as:
/usr/local/sbin/sendmail -G -i -f r...@example1.com j...@example2.com
<msg-headers+body>

The sendmail command is a pipe.


If you describe what original problem you're trying to solve maybe you can get some better pointers.


  -- Noel Jones

Reply via email to