fastforward-idx: qmail-local features and per-user alias files for fastforward
Posted June 15, 1999.
Fastforward-idx is patch to the qmail accessory program fastforward,
which is designed to replace .qmail files for per-user mail configuration
with one alias file triggered from .qmail-default. To replace the .qmail
files, all of the functionality of qmail-local has been added into
fastforward, such as "-default" wildcarding, maildir/mailfile delivery,
setting specific environment variables for subprograms, etc. Also,
the hardcoded reference in newaliases to /etc/aliases was removed,
so each user can have their own alias file.
Available for consulting work
I am currently available for consulting work. For consulting,
I am happy to telecommute or come to your site for a period of time.
For more information about my skills and experience,
view my statement of consulting capabilities
or contact me for more information.
Back to davideous.com home.
The author of qmail also created a package called
implements industrial-strength email forwarding storing the instructions in a
hashed file for quick access.
I run a virtual hosting server setup and wanted to give all of my users their
own fastforward alias file, with the fastforward program being run from
.qmail-default file. This required a minor patch to allow
newaliases to work on files other than
to which it was hardcoded.
However, there was still a problem: If I wanted to setup a listserv for one of
the users, fastforward didn't have the functionality to specify that, so I
had to place the instructions in
.qmail files. Likewise with
vacation programs or auto-responders, etc.
IMO, it is simply messy to have the configuration for the e-mail forwarding was in two
places like this. Not very nice for the automatic administration tools that will manage
the e-mail forwarding. Also for each list-serv four or five .qmail files were
created, cluttering up the user's home directory.
So, I patched fastforward to include all the functionality of
(the program that implements
.qmail files). With this patch, anything that
you could do with
.qmail files, you can now do with fastforward.
The following changes were made and features were added to fastforward:
I've done a descent job of documenting the feature additions and configuration
format changes in the
- Fastforward can now deliver to mbox files and mail directories.
Just use the
syntax as a target.
- Wildcard matching in the form
-default was added.
DEFAULT environment variable is properly set for
subprograms. See the
dot-qmail man page "Extension
- Enveloe sender address rewriting in the form
-owner-default is done. The
environment variable is properly set for subprograms. Also see
dot-qmail man page "Extension Addresses" section.
- The internal workings of fastforward's old form of sender address
rewriting in the form
owner- was improved slightly. It
now behaves more like
- Aliases match in the order
@domain instead of the previous
user@. I made
this change to think more along the lines of one domain, where
user@ is more specific (potential to match less) than
- Fastforward would run
preline to add delivery lines
to the mail header when running subprograms. This has been removed to
qmail-local compliance. However, if you still
preline, just use two vertical bars instead of
one to specify program delivery.
- When running delivery programs the return value of 99 is now honored.
It specifies that delivery should be stopped and marked as successful.
- Previously, fastforward ran delivery programs in the reverse order
from what was specified. This was simply a byproduct of the way the
commands were stored internally. With this patch, they execute in the
same order as specified.
- Previsouly, fastforward would recursively expanded aliases. This caused
way too many complications when things were extended, so that functionality
was simply removed.
newaliases man page.
As an example, we have a user named
foo which has
foo.com aliased to them using the
.qmail-default file we place:
And in the
| fastforward .domains.cdb
.domains file we have:
Then run "
# .domains - controls e-mail forwarding
# mbox delivery
# maildir delivery
"|echo $SENDER >>sales_prospects"
"|qmail-inject -f \"\" \"$SENDER\" < sales_response"
# a list of friends, with bounce messages handled
firstname.lastname@example.org : foo
Friend one <email@example.com>
Another Guy <firstname.lastname@example.org>
Friend Three <email@example.com>
# default goes to user
@foo.com : foo
newaliases .domains" to make the
hashed file and have fun forwarding e-mail. You can even place list-serves
.domains file if you want!
3. Distribution & Installation
Current version: 1.01, released June 15, 1999.
Here is the patch to fastforward version 0.51:
Also, here is test setup that I used to prove to myself that this
fastforward-idx really worked the same as
This is provided under GPL license.