[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qmail
Subject:    Re: getting the email message in qmail-local
From:       Charles Cazabon <qmail () discworld ! dyndns ! org>
Date:       2005-04-30 16:20:22
Message-ID: 20050430162022.GA9869 () discworld ! dyndns ! org
[Download RAW message or body]

Iqbal Abdullah <iqbalabd@yahoo.com> wrote:
> 
> i'm trying to make a copy of the email just before it
> is written to disk in qmail-local.

Okay.

> i am using the
> maildir structure so AFAIU, this is done in
> qmail-local.c:maildir_child()

You shouldn't need to modify qmail-local at all; instead, just add extra
delivery instructions to the .qmail file in question.

> what i want to do is to get the whole email as a
> string before headers are written into it, and after
> doing some data checking, finally add additional
> headers into ssout (and the top of the email). after
> that, ssout can finally be flushed to disk. i think
> this is possible but i don't quite understand how
> substdio works. 
> 
> is there a good way to do this? 

Write a separate program that reads the message from stdin, scans it as
necessary, then writes out the (possibly modified) header and body.  Call that
from .qmail, where your program can even rewind stdin if necessary (because
it's a real file this way).

Charles
-- 
--------------------------------------------------------------------------
Charles Cazabon                               <qmail@discworld.dyndns.org>
Read http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html
My services include qmail consulting.  See http://pyropus.ca/ for details.
--------------------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic