On Sat, May 21, 2011 at 10:59 PM, Jeroen Geilman <[email protected]> wrote:

> On 05/22/2011 03:46 AM, Diego Woitasen wrote:
>
>> Hi,
>>  I'm writing a report system and I want to identify the messages moving
>> through my mail servers. I need this because I must save some headers and
>> the first lines of the message in a database with the information from the
>> log files.
>>
>>  I think that the best way to relate the messages with the log lines is
>> using the message-id but it has a problem. I can't trust in messages that
>> arrive from the world. So what a want to do is to replace the message-id
>> when every message arrives to our MXs and copy the original message-id to a
>> second header. Message-id sometimes are useful to debug issues and I don't
>> want to loose that information.
>>
>> Suggestions about how to do this?
>>
>
> Read http://www.postfix.org/header_checks.5.html on how to manipulate
> headers.
>
> The more complex case of dual actions you want may be better solved using
> milters, though:
>
> http://www.postfix.org/MILTER_README.html
>
> Can you explain why you need log information ?
>
> If you don't, simply piping all mail through an external processor will be
> the simplest way to extract information from it.
>
> This can be achieved in various ways, using recipient_bcc_maps or an smtp
> proxy.
>
>
>> Regards,
>>  Diego
>>
>> --
>> Diego Woitasen
>>
>
>
> --
> J.
>
>
Thanks... Milter looks like the best option.

I need to log all the information because I'm writing an audit system for a
bank. The need all the information. The wanted to store every mail but
that's obviusly impossible. The best thing that we can  do is to store some
headers and may be the first lines with the information provided in the log
files.

Regards,
 Diego

-- 
Diego Woitasen

Reply via email to