I use fastforward (http://cr.yp.to/fastforward.html) for this purpose.  I
run a cron job (writtin in Perl) that grabs the aliases & forwarding
addresses from a database and opens a pipe to the 'setforward' command to
create the CDB forwarding database.  fastforward is written by D.J.
Bernstein (the guy who wrote qmail), so it's very fast/efficient/reliable
(as all of D.J's software seems to be!)  My .qmail-default file looks like
this:

| /var/qmail/bin/fastforward -p /location/of/forward.cdb
| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox

Here's the important part:  the -p switch to fastforward tells it to only
forward the message if it finds a matching alias, otherwise it returns the
appropriate error code and qmail will go on to the next line in the -default
file, and attempt to deliver using vdelivermail.

I hope that makes sense or is somehow helpful to you.  You could probably do
something similar with your own program--by returning the proper error code
you can change the way qmail handles the rest of the lines in the -default
file.

-Kevin

-----Original Message-----
From: Anthony R. J. Ball [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 06, 2000 9:52 AM
To: [EMAIL PROTECTED]
Subject: A question of defaulting



  Ok, so everything seems good. However. Before I 
installed vpopmail I had a little C prog that went
into my -default files for my domains and if it found
an entry in the database that matched, returned the
proper alias to forward to. I would like to do that
here as well, but I am not sure how to go about it.

It could go before the vdelivermail but I would
prefer it to run after, I think. Is there some
way to do this?

-- 
 ___  __  __    __  _  _  ____    _  _  ____  ____ 
/ __)(  )(  )  /__\( \/ )( ___)  ( \( )( ___)(_  _)
\__ \ )(__)(  /(__)\\  /  )__)    )  (  )__)   )(  
(___/(______)(__)(__)\/  (____)()(_)\_)(____) (__) 
Air conditioned environment - Do not open Windows. 

Reply via email to