on 4/5/05 6:28 AM, Kyle Wheeler <[EMAIL PROTECTED]> wrote:

> On Tuesday, April  5 at 01:24 AM, quoth Kurt Bigler:
>> 
>> I have been able to prototype my filtering functionality in a .qmail-user
>> file in one of my domain directories as follows:
>> 
>> | myfilter | /var/vpopmail/bin/vdelivermail '' bounce-no-mailbox
>> 
>> I have been testing this for several days and this approach is working fine.
> 
> Yes, however, this approach will not work as the QmailAdmin
> spam-command. It will create a loop (i.e. vdelivermail sends it to your
> filter, which pipes it to vdelivermail, which sends it to...).

Right, that's why I can't use this .qmail-user approach in the user/.qmail
file.

> What you *want* is this:
> 
> | preline yourfilter | maildir $vpophome/$domain/$user/Maildir/
> 
> (maildir is from the safecat package)
>
> However, vpopmail steadfastly refuses to set up the environment for it's
> .qmail processing in a convenient way (or even a qmail-compatible way),
> so what you can do is approximate it like this (all on one line):
> 
> | preline yourfilter | maildir /path/to/vpopdomains/`echo $USER | tr A-Z
> a-z`/`echo $EXT | tr A-Z a-z`/Maildir/

Thanks, that's great.

>> My assumption is that what I am calling simple_vpopmail_final_delivery
>> is in fact the last stage of what vdelivermail does, and if so I'm
>> wondering if there is any architectural reason why this piece of
>> functionality could not be made available as a separate command,
>> perhaps even as vdelivermail with another command-line option to
>> suppress prelinining and other functionality associated with the
>> user/.qmail file.
> 
> It would HAVE to ignore the .qmail file,

Yes, that's exactly what I was suggesting.

> otherwise you passing mail to
> it from within the .qmail file would create a loop. That, or to prevent
> people from destroying their own mail servers, it would have to have
> it's own loop detection.

To be clear what I was saying, it appears vdelivermail has several stages of
processing.  It looks like vdelivermail gets you into the user directory,
applies the .qmail file stuff, and then does the simple delivery I was
referring to.  I was suggesting that this last phase of what vdelivermail
does could be isolated into a separate command, or else the earlier
vdelivermail phases could be suppressed via a command-line option.  There is
already an option to suppress prelining, I think (which you don't want to do
twice, either).

>> In the mean time, what is the best (simplest, most reliable) way to
>> achieve
>> this simplistic delivery functionality?
> 
> I think "maildir" (or "safecat") is what you want to use. If you think
> the environment manipulation is a bit much, I agree, but them's the
> breaks, at the moment.

Ok, but that's not too bad.  It just bugs me to have to install yet another
package, just to do what vpopmail already knows how to do.

But thanks, that's what I needed to know!

But I have a question to the vpopmail developers:

If I were to implement this, as a option to vdelivermail, say:

    -d      Deliver only.  Do not preline and skip all .qmail processing

would you find this to be something worth integrating?  I'm not sure that
I'd have time now, but it seems worth asking the question.

-Kurt

Reply via email to