Mailing List Archive

Add reference to header
Hi

I use a lot of Qmail Server and i have a small question:


Anyone have a solution for add a internal référence into the header of
the mail
and add this reference to all logs ?


Sample:

First server receive the mail of the internet and add
X-Company-Ref: De544d21asd212ddzdz2d12z12
at the header

The first server sent the mail to a second server and
the second server read the X-Company-Ref number and
add it to the logs (and csl mailstat). he don't change this number
and sent the mail to a three server and same, logs the reference.



It's possible ?

best regards
Jerome
Re: Add reference to header [ In reply to ]
On Sun, Sep 09, 2012 at 08:30:20PM +0200, Jerome SCHEVINGT wrote:
> Hi
>
> I use a lot of Qmail Server and i have a small question:
>
> Anyone have a solution for add a internal référence into the header of
> the mail
> and add this reference to all logs ?

Hi,

One possible solution would be to use Bruce Guenter's QMAILQUEUE patch,
which is in netqmail or available via the qmail.org site. I've never
used it... just responding since no one else has.

Then, you could insert a small program in the chain to write the desired
header before passing the mail to the queue.

Nicolai
Re: Add reference to header [ In reply to ]
Hi,

> > Hi
> >
> > I use a lot of Qmail Server and i have a small question:
> >
> > Anyone have a solution for add a internal référence into the header
> of
> > the mail
> > and add this reference to all logs ?
>
> Hi,
>
> One possible solution would be to use Bruce Guenter's QMAILQUEUE patch,
> which is in netqmail or available via the qmail.org site. I've never
> used it... just responding since no one else has.
>
> Then, you could insert a small program in the chain to write the desired
> header before passing the mail to the queue.
There is no need to write a separate program to insert something into the
mail header. Just use formail from the procmail package. It just needs a
wrapper to generate the the reference.

> Nicolai
Dieter
--
Dieter Wörz dihewo@gmx.de
Re: Add reference to header [ In reply to ]
Hi, sorry for the late reply, but I had a similar request some time ago
- a few years actually - and I needed a patch to add a header ID (ie.
X-MID:) so that I could track the sending of "batch" mailings. I run a
small email marking firm in the US (http://www.mailgrail.com) and use
qmail and this patch, along with about 2 or 3 dozen others, that I
believe EH wrote and was kind enough to post. It's a patch to
qmail-remote.c and simply writes the X_MID: <id> to the log files, just
enough data to track and group emails based on my client activity, and
using a number of other log parsing tools allows us to display
statistics to our customers.

I can't remember off the top of my head exactly how it all works, but it
may be of some use and I could send it along or post it somewhere for
you to grab if interested.

Kirk



On 9/11/2012 8:11 AM, "Dh Hörz" wrote:
> Hi,
>> > Hi
>> >
>> > I use a lot of Qmail Server and i have a small question:
>> >
>> > Anyone have a solution for add a internal référence into the header of
>> > the mail
>> > and add this reference to all logs ?
>>
>> Hi,
>>
>> One possible solution would be to use Bruce Guenter's QMAILQUEUE patch,
>> which is in netqmail or available via the qmail.org site. I've never
>> used it... just responding since no one else has.
>>
>> Then, you could insert a small program in the chain to write the desired
>> header before passing the mail to the queue.
> There is no need to write a separate program to insert something into
> the mail header. Just use formail from the procmail package. It just
> needs a wrapper to generate the the reference.
>> Nicolai
> Dieter
>
>
>
> --
> Dieter Wörz dihewo@gmx.de
>
Re: Add reference to header [ In reply to ]
Hi,

On 2012-10-06 03:10, Kirk Rogers wrote:
> Hi, sorry for the late reply, but I had a similar request some time ago
> - a few years actually - and I needed a patch to add a header ID (ie.
> X-MID:) so that I could track the sending of "batch" mailings. I run a
> small email marking firm in the US (http://www.mailgrail.com) and use
> qmail and this patch, along with about 2 or 3 dozen others, that I
> believe EH wrote and was kind enough to post. It's a patch to
> qmail-remote.c and simply writes the X_MID: <id> to the log files, just
> enough data to track and group emails based on my client activity, and
> using a number of other log parsing tools allows us to display
> statistics to our customers.
>
> I can't remember off the top of my head exactly how it all works, but it
> may be of some use and I could send it along or post it somewhere for
> you to grab if interested.
>

Unless I've misunderstood something both your needs can be achieved
without modifications.

Just use Bruce Guenters "mailfront" with qmail backend.

Mailfront has lots of other nice features that makes it worth using with
qmail.

http://untroubled.org/mailfront/mailfront.html

The HEADER_ADD variable should suit your needs:
http://untroubled.org/mailfront/plugin-add-received.html

I use the above for adding the spam score indication values and flags to
the SMTP header.
These header values are used by the dovecot sieve LDA (local delivery
agent) for message message sorting classification etc
The same header values and flags can be used by the clients such at
ThunderBird etc...


/Uffe


>
>
>
> On 9/11/2012 8:11 AM, "Dh Hörz" wrote:
>> Hi,
>>> > Hi
>>> >
>>> > I use a lot of Qmail Server and i have a small question:
>>> >
>>> > Anyone have a solution for add a internal référence into the header of
>>> > the mail
>>> > and add this reference to all logs ?
>>>
>>> Hi,
>>>
>>> One possible solution would be to use Bruce Guenter's QMAILQUEUE patch,
>>> which is in netqmail or available via the qmail.org site. I've never
>>> used it... just responding since no one else has.
>>>
>>> Then, you could insert a small program in the chain to write the desired
>>> header before passing the mail to the queue.
>> There is no need to write a separate program to insert something into
>> the mail header. Just use formail from the procmail package. It just
>> needs a wrapper to generate the the reference.
>>> Nicolai
>> Dieter
>>
>>
>>
>> --
>> Dieter
>> Wörz
>> dihewo@gmx.de
>>
>