On Tue, 15 Jul 2003, Tom Collins wrote:

> Based on my understanding, vdelivermail has a somewhat deceptive name.

Odd you just brought that up.  I never touched maildrop before and I was
putting together a rule for per-user spam filtering (which is now easy to
turn on and off due to your recent changes to qmailadamin, thanks!) and
maybe because it was late at night, the "vdelivermail" line didn't catch
my eye.  I was going with the assumption it was a generic delivery agent,
which I later saw it wasn't.  I set up a wicked loop, but svscan here is
started with sane limits, so after it iterated the loop 10 times or so it

> Many people (myself included) thought it would just accept the mail and
> do whatever you requested as the last parameter (bounce-no-mailbox,
> deleted, directory for delivery, etc.).

Heh heh.

> In reality, vdelivermail uses environment variables set by qmail-local
> to try to find the appropriate user and deliver the mail to them.  It
> only delivers to the last parameter if it can't find a match.

This brings up another question.  Right now my maildrop has an ugly hack
to determine the directory.  Is there a list anywhere of the environment
variables that vdelivermail passes to the next program in line?

I'm doing this:

VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]

That seems so bogus and unnecessary; I'm invoking yet another program
making for a total of 6 program startups just to deliver a single piece of
mail (original qmail delivery, vdelivermail, preline, maildrop, spamc,
vuserinfo).  Correct?  I need to draw up a map for myself similar to the
"Qmail Big Picture" to make sure I'm getting all this right.

Is that homedir value not known by vdelivermail?  It seems like it should
be there...

> Instead of using vdelivermail, you may need to use maildrop (Jeff
> Hedlund can provide details on that one) to process the email and drop
> it in the user's Maildir.

This works well (once you get the homedir location).

> It might be helpful to add another program (vstoremail?) to the
> vpopmail distribution that would accept a message in STDIN and save it
> to the Maildir specified as the first parameter.  Then it would be
> possible to have entries in your .qmail file like
> |/usr/local/bin/spamc | /home/vpopmail/bin/vstoremail
> /home/vpopmail/domains/example.com/fred/Maildir/

I think that might be unnecessary.  Maildrop (or procmail) should suffice
for the final delivery...

> vstoremail would take care of file locking/naming/etc. and exit with
> the proper error code.

Maildrop should do this too...  What do you think?  I propose tweaking
vdelivermail a bit would be a better use of your time (and I'd love to see
you clean up that code like you have qmailadmin, that's a stunning
CHANGELOG you've got going).



> --
> Tom Collins
> http://sniffter.com/ - info on the Sniffter hand-held Network Tester

Reply via email to