On Tuesday, April 5 at 01:24 AM, quoth Kurt Bigler: > > NOTE: This command must deliver the mail) > > Particularly the last line is of interest.
Indeed. > All I need is to satisfy that requirement that the command must > deliver the mail. I want it delivered exactly as vdelivermail would > have delivered it, but I want to pipe it through my filter on the way > out. > > 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...). > However, it is a hack (and doesn't play well with qmailadmin), and what I > really want to do is to be able to use something like this in the > user/.qmail file instead: > > | preline myfilter | simple_vpopmail_final_delivery 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/ > 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, 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. > 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. ~Kyle -- Science is like sex: Sometimes something useful comes out, but that is not the reason we are doing it. -- Richard P. Feynman
Description: Digital signature