Commit bbef731d authored by Dmitry Bogatov's avatar Dmitry Bogatov

Import Upstream version 0.51

parents
--- Setting up /etc/aliases
Create /etc/aliases if it does not already exist. You should include
forwarding instructions for mailer-daemon, postmaster, and root:
root: alias
postmaster: alias
mailer-daemon: alias
Note that qmail never delivers mail to root. The instructions shown here
will deliver messages to the mailbox of the ``alias'' user.
For further details on the format of /etc/aliases, and a list of
sendmail compatibility warnings, see the newaliases man page.
--- Compiling /etc/aliases
Once /etc/aliases is ready, run newaliases to compile /etc/aliases into
/etc/aliases.cdb:
# newaliases
Review /etc/aliases.cdb to make sure it has the instructions you want:
% printforward < /etc/aliases.cdb | more
For the format of printforward's output, see the setforward man page.
If you change /etc/aliases you will have to run newaliases again. You
may want to add a comment at the top of /etc/aliases as a reminder.
--- Compiling :include: files
If you have an :include: file, say /etc/staff-list, compile it into
/etc/staff-list.bin:
# newinclude /etc/staff-list
See the newinclude man page for a list of sendmail compatibility
warnings. Review /etc/staff-list.bin:
% printmaillist < /etc/staff-list.bin | more
For the format of printmaillist's output, see the setmaillist man page.
If you change /etc/staff-list you will have to run newinclude again. You
may want to add a comment at the top of /etc/staff-list as a reminder.
--- Configuring qmail to use /etc/aliases
To activate /etc/aliases, put this line into ~alias/.qmail-default:
| fastforward -d /etc/aliases.cdb
If qmail is already running, make sure to chmod +t ~alias before you
edit .qmail files in ~alias, and chmod -t ~alias after.
--- Testing aliases
To check the expansion of postmaster@your.host without sending any mail:
% env DEFAULT=postmaster HOST=your.host fastforward -nd /etc/aliases.cdb
Replace your.host with your fully qualified domain name. Make sure to
include the -nd.
Next, try sending a message to postmaster@your.host. Watch the qmail log
and the final mailbox to make sure the alias works the way you want.
You can check other aliases the same way.
--- Using /etc/aliases for virtual domains
To put all addresses at virt.dom under control of /etc/aliases, add
virt.dom:alias
to /var/qmail/control/virtualdomains, and give qmail-send a HUP signal.
Also add
virt.dom
to /var/qmail/control/rcpthosts so that qmail accepts mail for virt.dom
from remote hosts. Now you can handle virt.dom in /etc/aliases:
billing@virt.dom: joe, fred
(this line catches all other addresses)@virt.dom: joe
Note that postmaster@virt.dom will go to joe; the @virt.dom instruction
overrides the postmaster instruction. Note, however, that other .qmail
files in ~alias override ~alias/.qmail-default, so you can set up
~alias/.qmail-postmaster to handle postmaster@everything.
Beware that sendmail does not support domain-specific instructions in
/etc/aliases; they are a fastforward feature.
fastforward handles qmail forwarding according to a cdb database. It can
create forwarding databases from a sendmail-style /etc/aliases or from
user-oriented virtual-domain tables.
fastforward supports external mailing lists, stored in a binary format
for fast access. It has a tool to convert sendmail-style include files
into binary lists.
fastforward is more reliable than sendmail. sendmail can't deal with
long aliases, or deeply nested aliases, or deeply nested include files;
fastforward has no limits other than memory. sendmail can produce
corrupted alias files if the system crashes; fastforward is crashproof.
fastforward's database-building tools are much faster than sendmail's
newaliases. Even better, fastforward deliveries don't pause while the
database is being rebuilt.
fastforward does not support insecure sendmail-style program deliveries
from include files; you can use qmail's secure built-in mechanisms
instead. fastforward does support program deliveries from /etc/aliases.
19980519 version: fastforward 0.51, alpha.
19980519 code: added preline variant in fastforward; updated setforward,
printforward, newaliases accordingly.
19980519 doc: added virtual-domains section to ALIASES.
19980519 doc: used -d in ALIASES.
19980519 code: added fastforward -d.
19980519 doc: put version and home page into fastforward.1.
19980519 doc: simplified INSTALL.
19980519 doc: added ALIASES.
19980519 doc: expanded explanation in conf-qmail.
19980519 code: switched to new install.
19980420 portability problem: IRIX doesn't have vfork(). impact:
couldn't compile under IRIX. fix: include fork.h in
fastforward.c. tnx JB.
19980420 fastforward 0.50, alpha.
BLURB
README
TODO
THANKS
CHANGES
FILES
TARGETS
VERSION
SYSDEPS
Makefile
ALIASES
INSTALL
hier.c
fastforward.1
fastforward.c
printforward.1
printforward.c
setforward.1
setforward.c
printmaillist.1
printmaillist.c
setmaillist.1
setmaillist.c
newaliases.1
newaliases.c
newinclude.1
newinclude.c
auto-str.c
install.c
instcheck.c
conf-cc
conf-ld
find-systype.sh
make-compile.sh
make-load.sh
make-makelib.sh
trycpp.c
warn-auto.sh
alloc.h
alloc.c
alloc_re.c
case.h
case_lowerb.c
cdb.h
cdb_hash.c
cdb_seek.c
cdb_unpack.c
cdbmake.h
cdbmake_add.c
cdbmake_hash.c
cdbmake_pack.c
cdbmss.h
cdbmss.c
control.h
control.c
env.h
envread.c
error.h
error.c
error_str.c
fd.h
fd_copy.c
fd_move.c
fork.h1
fork.h2
tryvfork.c
fmt.h
fmt_ulong.c
scan.h
scan_ulong.c
getln.h
getln.c
getln2.c
sgetopt.h
sgetopt.c
subgetopt.h
subgetopt.c
open.h
open_read.c
open_trunc.c
conf-qmail
auto_qmail.h
qmail.h
qmail.c
seek.h
seek_set.c
sig.h
sig_catch.c
sig_pipe.c
trysgact.c
byte.h
byte_chr.c
byte_copy.c
byte_cr.c
byte_diff.c
str.h
str_chr.c
str_cpy.c
str_diff.c
str_diffn.c
str_len.c
str_rchr.c
gen_alloc.h
gen_allocdefs.h
stralloc.h
stralloc_eady.c
stralloc_pend.c
stralloc_copy.c
stralloc_opyb.c
stralloc_opys.c
stralloc_cat.c
stralloc_catb.c
stralloc_cats.c
stralloc_arts.c
strset.h
strset.c
substdio.h
substdio.c
substdi.c
substdo.c
substdio_copy.c
subfd.h
subfderr.c
subfdouts.c
subfdins.c
readwrite.h
exit.h
token822.h
token822.c
uint32.h1
uint32.h2
tryulong32.c
wait.h
wait_pid.c
trywaitp.c
strerr.h
strerr_sys.c
strerr_die.c
slurpclose.h
slurpclose.c
coe.h
coe.c
Like any other piece of software (and information generally),
fastforward comes with NO WARRANTY.
Things you have to decide before starting:
* Where qmail is installed, normally /var/qmail. (To change this
directory, edit conf-qmail now.)
How to install:
1. Create and install the programs and man pages:
# make setup check
2. To configure qmail to use /etc/aliases, see ALIASES.
That's it! To report success:
% ( echo 'First M. Last'; cat `cat SYSDEPS` ) | mail djb-qst@cr.yp.to
Replace First M. Last with your name.
# Don't edit Makefile! Use conf-* for configuration.
SHELL=/bin/sh
default: it
alloc.a: \
makelib alloc.o alloc_re.o
./makelib alloc.a alloc.o alloc_re.o
alloc.o: \
compile alloc.c alloc.h error.h
./compile alloc.c
alloc_re.o: \
compile alloc_re.c alloc.h byte.h
./compile alloc_re.c
auto-ccld.sh: \
conf-cc conf-ld warn-auto.sh
( cat warn-auto.sh; \
echo CC=\'`head -1 conf-cc`\'; \
echo LD=\'`head -1 conf-ld`\' \
) > auto-ccld.sh
auto-str: \
load auto-str.o substdio.a error.a str.a
./load auto-str substdio.a error.a str.a
auto-str.o: \
compile auto-str.c substdio.h readwrite.h exit.h
./compile auto-str.c
auto_qmail.c: \
auto-str conf-qmail
./auto-str auto_qmail `head -1 conf-qmail` > auto_qmail.c
auto_qmail.o: \
compile auto_qmail.c
./compile auto_qmail.c
byte_chr.o: \
compile byte_chr.c byte.h
./compile byte_chr.c
byte_copy.o: \
compile byte_copy.c byte.h
./compile byte_copy.c
byte_cr.o: \
compile byte_cr.c byte.h
./compile byte_cr.c
byte_diff.o: \
compile byte_diff.c byte.h
./compile byte_diff.c
case.a: \
makelib case_lowerb.o
./makelib case.a case_lowerb.o
case_lowerb.o: \
compile case_lowerb.c case.h
./compile case_lowerb.c
cdb.a: \
makelib cdb_hash.o cdb_unpack.o cdb_seek.o
./makelib cdb.a cdb_hash.o cdb_unpack.o cdb_seek.o
cdb_hash.o: \
compile cdb_hash.c cdb.h uint32.h
./compile cdb_hash.c
cdb_seek.o: \
compile cdb_seek.c cdb.h uint32.h
./compile cdb_seek.c
cdb_unpack.o: \
compile cdb_unpack.c cdb.h uint32.h
./compile cdb_unpack.c
cdbmake.a: \
makelib cdbmake_pack.o cdbmake_hash.o cdbmake_add.o
./makelib cdbmake.a cdbmake_pack.o cdbmake_hash.o \
cdbmake_add.o
cdbmake_add.o: \
compile cdbmake_add.c cdbmake.h uint32.h
./compile cdbmake_add.c
cdbmake_hash.o: \
compile cdbmake_hash.c cdbmake.h uint32.h
./compile cdbmake_hash.c
cdbmake_pack.o: \
compile cdbmake_pack.c cdbmake.h uint32.h
./compile cdbmake_pack.c
cdbmss.o: \
compile cdbmss.c readwrite.h seek.h alloc.h cdbmss.h cdbmake.h \
uint32.h substdio.h
./compile cdbmss.c
check: \
it instcheck
./instcheck
coe.o: \
compile coe.c coe.h
./compile coe.c
compile: \
make-compile warn-auto.sh systype
( cat warn-auto.sh; ./make-compile "`cat systype`" ) > \
compile
chmod 755 compile
control.o: \
compile control.c readwrite.h open.h getln.h stralloc.h gen_alloc.h \
substdio.h error.h control.h alloc.h scan.h
./compile control.c
env.a: \
makelib envread.o
./makelib env.a envread.o
envread.o: \
compile envread.c env.h str.h
./compile envread.c
error.a: \
makelib error.o error_str.o
./makelib error.a error.o error_str.o
error.o: \
compile error.c error.h
./compile error.c
error_str.o: \
compile error_str.c error.h
./compile error_str.c
fastforward: \
load fastforward.o slurpclose.o coe.o strset.o qmail.o auto_qmail.o \
getopt.a cdb.a env.a strerr.a substdio.a stralloc.a alloc.a error.a \
case.a str.a fs.a sig.a wait.a seek.a open.a fd.a
./load fastforward slurpclose.o coe.o strset.o qmail.o \
auto_qmail.o getopt.a cdb.a env.a strerr.a substdio.a \
stralloc.a alloc.a error.a case.a str.a fs.a sig.a wait.a \
seek.a open.a fd.a
fastforward.0: \
fastforward.1
nroff -man fastforward.1 > fastforward.0
fastforward.o: \
compile fastforward.c stralloc.h gen_alloc.h substdio.h subfd.h \
substdio.h strset.h uint32.h sgetopt.h subgetopt.h readwrite.h exit.h \
strerr.h env.h sig.h qmail.h substdio.h fmt.h case.h alloc.h coe.h \
seek.h wait.h fork.h
./compile fastforward.c
fd.a: \
makelib fd_copy.o fd_move.o
./makelib fd.a fd_copy.o fd_move.o
fd_copy.o: \
compile fd_copy.c fd.h
./compile fd_copy.c
fd_move.o: \
compile fd_move.c fd.h
./compile fd_move.c
find-systype: \
find-systype.sh auto-ccld.sh
cat auto-ccld.sh find-systype.sh > find-systype
chmod 755 find-systype
fmt_ulong.o: \
compile fmt_ulong.c fmt.h
./compile fmt_ulong.c
fork.h: \
compile load tryvfork.c fork.h1 fork.h2
( ( ./compile tryvfork.c && ./load tryvfork ) >/dev/null \
2>&1 \
&& cat fork.h2 || cat fork.h1 ) > fork.h
rm -f tryvfork.o tryvfork
fs.a: \
makelib fmt_ulong.o scan_ulong.o
./makelib fs.a fmt_ulong.o scan_ulong.o
getln.a: \
makelib getln.o getln2.o
./makelib getln.a getln.o getln2.o
getln.o: \
compile getln.c substdio.h byte.h stralloc.h gen_alloc.h getln.h
./compile getln.c
getln2.o: \
compile getln2.c substdio.h stralloc.h gen_alloc.h byte.h getln.h
./compile getln2.c
getopt.a: \
makelib subgetopt.o sgetopt.o
./makelib getopt.a subgetopt.o sgetopt.o
hassgact.h: \
trysgact.c compile load
( ( ./compile trysgact.c && ./load trysgact ) >/dev/null \
2>&1 \
&& echo \#define HASSIGACTION 1 || exit 0 ) > hassgact.h
rm -f trysgact.o trysgact
haswaitp.h: \
trywaitp.c compile load
( ( ./compile trywaitp.c && ./load trywaitp ) >/dev/null \
2>&1 \
&& echo \#define HASWAITPID 1 || exit 0 ) > haswaitp.h
rm -f trywaitp.o trywaitp
hier.o: \
compile hier.c auto_qmail.h
./compile hier.c
install: \
load install.o hier.o auto_qmail.o strerr.a substdio.a error.a open.a \
str.a
./load install hier.o auto_qmail.o strerr.a substdio.a \
error.a open.a str.a
install.o: \
compile install.c substdio.h strerr.h error.h open.h readwrite.h \
exit.h
./compile install.c
instcheck: \
load instcheck.o hier.o auto_qmail.o strerr.a substdio.a error.a \
str.a
./load instcheck hier.o auto_qmail.o strerr.a substdio.a \
error.a str.a
instcheck.o: \
compile instcheck.c strerr.h error.h readwrite.h exit.h
./compile instcheck.c
it: \
prog man
load: \
make-load warn-auto.sh systype
( cat warn-auto.sh; ./make-load "`cat systype`" ) > load
chmod 755 load
make-compile: \
make-compile.sh auto-ccld.sh
cat auto-ccld.sh make-compile.sh > make-compile
chmod 755 make-compile
make-load: \
make-load.sh auto-ccld.sh
cat auto-ccld.sh make-load.sh > make-load
chmod 755 make-load
make-makelib: \
make-makelib.sh auto-ccld.sh
cat auto-ccld.sh make-makelib.sh > make-makelib
chmod 755 make-makelib
makelib: \
make-makelib warn-auto.sh systype
( cat warn-auto.sh; ./make-makelib "`cat systype`" ) > \
makelib
chmod 755 makelib
man: \
fastforward.0 printforward.0 setforward.0 newaliases.0 \
printmaillist.0 setmaillist.0 newinclude.0
newaliases: \
load newaliases.o auto_qmail.o token822.o control.o cdbmss.o \
cdbmake.a strerr.a getln.a substdio.a stralloc.a alloc.a error.a \
str.a fs.a seek.a open.a case.a
./load newaliases auto_qmail.o token822.o control.o \
cdbmss.o cdbmake.a strerr.a getln.a substdio.a stralloc.a \
alloc.a error.a str.a fs.a seek.a open.a case.a
newaliases.0: \
newaliases.1
nroff -man newaliases.1 > newaliases.0
newaliases.o: \
compile newaliases.c substdio.h strerr.h stralloc.h gen_alloc.h \
getln.h open.h readwrite.h token822.h gen_alloc.h control.h \
auto_qmail.h case.h cdbmss.h cdbmake.h uint32.h substdio.h
./compile newaliases.c
newinclude: \
load newinclude.o auto_qmail.o token822.o control.o getln.a strerr.a \
stralloc.a env.a alloc.a substdio.a error.a str.a fs.a open.a wait.a \
fd.a
./load newinclude auto_qmail.o token822.o control.o \
getln.a strerr.a stralloc.a env.a alloc.a substdio.a \
error.a str.a fs.a open.a wait.a fd.a
newinclude.0: \
newinclude.1
nroff -man newinclude.1 > newinclude.0
newinclude.o: \
compile newinclude.c substdio.h strerr.h stralloc.h gen_alloc.h \
getln.h open.h readwrite.h token822.h gen_alloc.h control.h \
auto_qmail.h env.h
./compile newinclude.c
open.a: \
makelib open_read.o open_trunc.o
./makelib open.a open_read.o open_trunc.o
open_read.o: \
compile open_read.c open.h
./compile open_read.c
open_trunc.o: \
compile open_trunc.c open.h
./compile open_trunc.c
printforward: \
load printforward.o cdb.a strerr.a substdio.a stralloc.a alloc.a \
error.a str.a
./load printforward cdb.a strerr.a substdio.a stralloc.a \
alloc.a error.a str.a
printforward.0: \
printforward.1
nroff -man printforward.1 > printforward.0
printforward.o: \
compile printforward.c substdio.h subfd.h substdio.h strerr.h \
stralloc.h gen_alloc.h cdb.h uint32.h
./compile printforward.c
printmaillist: \
load printmaillist.o getln.a strerr.a substdio.a stralloc.a alloc.a \
error.a str.a
./load printmaillist getln.a strerr.a substdio.a \
stralloc.a alloc.a error.a str.a
printmaillist.0: \
printmaillist.1
nroff -man printmaillist.1 > printmaillist.0
printmaillist.o: \
compile printmaillist.c substdio.h subfd.h substdio.h strerr.h \
stralloc.h gen_alloc.h getln.h
./compile printmaillist.c
prog: \
fastforward printforward setforward newaliases printmaillist \
setmaillist newinclude
qmail.o: \
compile qmail.c substdio.h readwrite.h wait.h exit.h fork.h fd.h \
qmail.h substdio.h auto_qmail.h
./compile qmail.c
scan_ulong.o: \
compile scan_ulong.c scan.h
./compile scan_ulong.c
seek.a: \
makelib seek_set.o
./makelib seek.a seek_set.o
seek_set.o: \
compile seek_set.c seek.h
./compile seek_set.c
setforward: \
load setforward.o cdbmss.o cdbmake.a strerr.a substdio.a stralloc.a \
alloc.a error.a str.a seek.a open.a case.a
./load setforward cdbmss.o cdbmake.a strerr.a substdio.a \
stralloc.a alloc.a error.a str.a seek.a open.a case.a
setforward.0: \
setforward.1
nroff -man setforward.1 > setforward.0
setforward.o: \
compile setforward.c substdio.h subfd.h substdio.h strerr.h \
stralloc.h gen_alloc.h open.h case.h readwrite.h cdbmss.h cdbmake.h \
uint32.h substdio.h
./compile setforward.c
setmaillist: \
load setmaillist.o getln.a strerr.a substdio.a stralloc.a alloc.a \
error.a str.a open.a
./load setmaillist getln.a strerr.a substdio.a stralloc.a \
alloc.a error.a str.a open.a
setmaillist.0: \
setmaillist.1
nroff -man setmaillist.1 > setmaillist.0
setmaillist.o: \
compile setmaillist.c substdio.h subfd.h substdio.h strerr.h \
stralloc.h gen_alloc.h getln.h open.h readwrite.h
./compile setmaillist.c
setup: \
it install
./install
sgetopt.o: \
compile sgetopt.c substdio.h subfd.h substdio.h sgetopt.h subgetopt.h \
subgetopt.h
./compile sgetopt.c
sig.a: \
makelib sig_catch.o sig_pipe.o
./makelib sig.a sig_catch.o sig_pipe.o
sig_catch.o: \
compile sig_catch.c sig.h hassgact.h
./compile sig_catch.c
sig_pipe.o: \
compile sig_pipe.c sig.h
./compile sig_pipe.c
slurpclose.o: \
compile slurpclose.c stralloc.h gen_alloc.h readwrite.h slurpclose.h \
error.h
./compile slurpclose.c