1Like any other piece of software (and information generally), qmail
2comes with NO WARRANTY.
3
4Configuration: The qmail home directory is /var/qmail. (This must be a
5local directory, not shared among machines. Under Linux, make sure that
6all mail-handling filesystems are mounted with synchronous metadata.)
7The user-ext delimiter is -. The silent concurrency limit is 120. The
8queue subdirectory split is 23.
9
10To install:
11 # make setup
12
13To set up qmail to receive and deliver mail, follow the instructions in
14/var/qmail/doc/fastforward/ALIASES, and then start at step 9 of
15/var/qmail/doc/INSTALL.
16
17Compilation environment: Oops, the package creator forgot to edit this!
18He's supposed to list his OS version, compiler version, hardware, and
19name.
20
1netqmail 1.06
220071130
3James Craig Burley claims copyright on the qmail-isoc patch. For
4more details, see COPYRIGHT.
5
6Apart from James' copyrights, no other copyright is claimed by the
7distributors of netqmail for changes from qmail 1.03 to netqmail 1.05.
8Daniel J. Bernstein has abandoned copyright for qmail 1.03.
9D. J. Bernstein did not participate in, nor has he been asked to
10approve of this distribution.
11
12With this distribution, we thank Daniel Bernstein for his dedication
13of qmail to the public domain. We have taken advantage of this event
14to remove the need to apply a patch. We will distribute a Netqmail 1.07
15shortly which includes enhancements.
16
17Netqmail 1.06 is produced by this motley krewe:
18
19Russ Nelson <nelson@qmail.org>
20Charles Cazabon <charlesc-software-netqmail@pyropus.ca>
21Dave Sill <de5@sws5.ornl.gov>
22Peter Samuel <Peter.Samuel@gormand.com.au>
23Henning Brauer <henning@bsws.de>
24Andrew Richards <ar-nq@acrconsulting.co.uk>
25Richard Lyons <rick-netqmail@frob.com.au>
26John Levine <netqmail@johnlevine.com>
27Scott Gifford <sgifford@suspectclass.com>
28Kyle Wheeler <kyle-netqmail@memoryhole.net>
29Wayne Marshall
30
31qmail is a secure, reliable, efficient, simple message transfer agent.
32It is meant as a replacement for the entire sendmail-binmail system on
33typical Internet-connected UNIX hosts. See BLURB, BLURB2, BLURB3, and
34BLURB4 for more detailed advertisements.
35
36INSTALL says how to set up and test qmail. If you're upgrading from a
37previous version, read UPGRADE instead.
38
39See PIC.* for some ``end-to-end'' pictures of mail flowing through the
40qmail system.
41
42See http://pobox.com/~djb/qmail.html for other qmail-related software
43and a pointer to the qmail mailing list.
44
45Other documentation: http://pobox.com/~djb/proto.html shows solutions to
46several Internet mail problems; many of these solutions are implemented
47in qmail. CHANGES and THANKS show how qmail has changed since it was
48first released. SECURITY, INTERNALS, THOUGHTS, and TODO record many of
49the qmail design decisions.
50
51The rest of this file is a list of systypes where various versions of
52qmail have been reported to work. 0.96 was the final gamma version; 1.00
53had exactly the same code as 0.96. To see your systype, make systype;
54cat systype.
55
561.00: a.ux-3.0-svr2-:-:-:mc68030-:- (tnx RF)
571.01: aix-3-2-:-:-:000000406300-:- (tnx DG)
581.01: aix-3-2-:-:-:000011216700-:- (tnx JLB)
591.01: aix-4-1-:-:-:000041574c00-:- (tnx M2H)
601.01: aix-4-1-:-:-:000088581000-:- (tnx HJB)
611.01: aix-4-1-:-:-:002b51134c00-:- (tnx MP)
621.00: aix-4-1-:-:-:00910033a000-:- (tnx KJJ)
631.01: aix-4-2-:-:-:000055247900-:- (tnx JLB)
641.01: aix-4-2-:-:-:000062295800-:- (tnx TD)
651.01: aix-4-2-:-:-:000136094c00-:- (tnx T2U)
661.00: aix-4-2-:-:-:000205254600-:- (tnx MGM)
671.01: aix-4-2-:-:-:005255bc4c00-:- (tnx DS)
681.01: aix-4-2-:-:-:006030944c00-:-
691.01: bsd.386-1.1-0-:i386-:-:i386-:- (tnx T2M)
701.01: bsd.os-2.0-:i386-:-:pentium-:- (tnx MSS)
711.01: bsd.os-2.0.1-:i386-:-:i486-:- (tnx KR)
720.96: bsd.os-2.1-:i386-:-:-:- (tnx DAR)
731.00: bsd.os-2.1-:i386-:-:i486-:- (tnx RJC)
740.96: bsd.os-2.1-:i386-:-:pentium-:- (tnx UO)
751.01: bsd.os-3.0-:i386-:-:-:- (tnx VU)
761.01: bsd.os-3.0-:i386-:-:pentium-:- (tnx RJO)
771.01: bsd.os-3.1-:i386-:-:pentium-:- (tnx ABC)
781.01: bsd.os-3.1-:i386-:-:pentium.ii-:- (tnx UO)
790.96: dgux-5.4r2.01-generic-:-:-:aviion-:- (tnx HWM)
801.01: freebsd-2.1.0-release-:i386-:-:i486-dx-:- (tnx VV)
811.01: freebsd-2.1.0-release-:i386-:-:i486.dx2-:- (tnx JLB)
821.00: freebsd-2.1.0-release-:i386-:-:i486dx-:- (tnx chrisj=???)
831.01: freebsd-2.1.0-release-:i386-:-:pentium.735\90.or.815\100-:- (tnx MBS)
841.01: freebsd-2.1.5-release-:i386-:-:i486-dx-:- (tnx B1F)
850.96: freebsd-2.1.5-release-:i386-:-:i486dx-:- (tnx FN)
861.01: freebsd-2.1.5-release-:i386-:-:unknown.-:- (tnx BMF)
871.00: freebsd-2.1.6-release-:i386-:-:-:- (tnx TM)
880.96: freebsd-2.1.6-release-:i386-:-:Pentium-Pro.150-:- (tnx CH)
891.01: freebsd-2.1.6-release-:i386-:-:cy486dlc-:- (tnx M3H)
900.96: freebsd-2.1.6.1-release-:i386-:-:pentium.735\90.or.815\100-:- (tnx MF)
911.01: freebsd-2.1.7-release-:i386-:-:i486-dx-:- (tnx AAF)
921.00: freebsd-2.1.7-release-:i386-:-:pentium.735\90.or.815\100-:- (tnx JBB)
931.01: freebsd-2.1.7-release-:i386-:-:pentium.815\100-:- (tnx B1F)
941.01: freebsd-2.2-970422-releng-:i386-:-:-:- (tnx TM)
951.00: freebsd-2.2-release-:i386-:-:-:- (tnx MT)
961.01: freebsd-2.2-stable-:i386-:-:cyrix.5x86-:- (tnx A2B)
971.01: freebsd-2.2-stable-:i386-:-:pentium-:- (tnx gary@systemics=???)
981.01: freebsd-2.2.1-release-:i386-:-:-:- (tnx M2R)
991.01: freebsd-2.2.1-release-:i386-:-:i486-dx-:- (tnx PGR)
1001.00: freebsd-2.2.1-release-:i386-:-:i486.dx2-:- (tnx BR)
1011.01: freebsd-2.2.1-release-:i386-:-:pentium-:- (tnx REB)
1021.01: freebsd-2.2.1-release-:i386-:-:pentium.pro-:- (tnx JS)
1031.01: freebsd-2.2.2-release-:i386-:-:amd.am5x86.write-through-:- (tnx AGB)
1041.01: freebsd-2.2.2-release-:i386-:-:i486-dx-:- (tnx A2L)
1051.01: freebsd-2.2.2-release-:i386-:-:i486.dx2-:- (tnx D3S)
1061.01: freebsd-2.2.2-release-:i386-:-:pentium-:- (tnx B2F)
1071.01: freebsd-2.2.2-release-:i386-:-:pentium.pro-:- (tnx M2G)
1081.01: freebsd-2.2.5-release-:i386-:-:i486-dx-:- (tnx R2N)
1091.01: freebsd-2.2.5-release-:i386-:-:i486.dx2-:- (tnx AY)
1101.01: freebsd-2.2.5-release-:i386-:-:pentium.pro-:- (tnx AI)
1111.01: freebsd-2.2.5-stable-:i386-:-:i486.dx2-:- (tnx JK)
1121.01: freebsd-2.2.5-stable-:i386-:-:pentium-:- (tnx root@defiant=???)
1131.01: freebsd-2.2.6-release-:i386-:-:-:- (tnx TM)
1141.01: freebsd-2.2.6-release-:i386-:-:amd.am5x86.write-through-:- (tnx root@skully=???)
1151.00: freebsd-3.0-970209-snap-:i386-:-:-:- (tnx YF)
1161.01: freebsd-3.0-970428-snap-:i386-:-:pentium-:- (tnx M3S)
1171.01: freebsd-3.0-970807-snap-:i386-:-:amd.k6-:- (tnx KMD)
1181.01: freebsd-3.0-980309-snap-:i386-:-:pentium-:- (tnx MM)
1191.01: freebsd-3.0-current-:i386-:-:pentium-:- (tnx KB)
1201.01: hp-ux-a.09.05-a-:-:-:9000.712-:- (tnx SV)
1211.01: hp-ux-a.09.07-a-:-:-:9000.712-:- (tnx LB)
1221.00: hp-ux-b.09.00-a-:-:-:9000.360-:- (tnx VV)
1231.01: hp-ux-b.10.20-a-:-:-:9000.755-:- (tnx BCK)
1241.01: irix-5.3-11091812-:-:-:ip22-:- (tnx JL)
1251.01: irix-6.2-03131015-:-:-:ip22-:- (tnx DS)
1261.01: irix64-6.2-03131016-:-:-:ip19-:- (tnx AH)
1271.01: irix64-6.2-06101031-:-:-:ip28-:- (tnx DB)
1281.01: linux-1.2.13-:i386-:-:i486-:- (tnx RF)
1291.01: linux-1.2.13-:i386-:-:pentium-:- (tnx MEE)
1301.01: linux-1.99.4-:i386-:-:pentium-:- (tnx C2H)
1311.01: linux-2.0.0-:i386-:-:i486-:- (tnx kragen@gentle=???)
1321.01: linux-2.0.0-:i386-:-:pentium-:- (tnx MJD)
1331.01: linux-2.0.6-:i386-:-:pentium-:-
1341.00: linux-2.0.6-:i386-:-:ppro-:- (tnx MR)
1351.01: linux-2.0.7-:i386-:-:i486-:- (tnx TLM)
1361.01: linux-2.0.9-:i386-:-:i486-:- (tnx VBM)
1370.96: linux-2.0.13-:i386-:-:pentium-:- (tnx BW)
1381.01: linux-2.0.15-:i386-:-:i486-:- (tnx JCD)
1391.01: linux-2.0.18-:i386-:-:i486-:- (tnx tk@avalon=???)
1401.01: linux-2.0.18-:i386-:-:pentium-:- (tnx root@webtvchat=???)
1411.00: linux-2.0.22-:i386-:-:pentium-:- (tnx MDI)
1421.00: linux-2.0.23-:i386-:-:i486-:- (tnx B2L)
1431.01: linux-2.0.24-:i386-:-:i486-:- (tnx GLM)
1441.00: linux-2.0.24-:i386-:-:pentium-:- (tnx VV)
1450.96: linux-2.0.25-:i386-:-:i486-:- (tnx BDB)
1461.01: linux-2.0.25-:i386-:-:pentium-:- (tnx KA)
1470.93: linux-2.0.26-:i386-:-:i486-:- (tnx blynch@texas=???)
1481.01: linux-2.0.26-:i386-:-:pentium-:- (tnx robbie@opus=???)
1491.00: linux-2.0.27-:-:-:sparc-:- (tnx SVD)
1501.00: linux-2.0.27-:i386-:-:i386-:- (tnx ECG)
1511.01: linux-2.0.27-:i386-:-:i486-:- (tnx BN)
1521.01: linux-2.0.27-:i386-:-:pentium-:- (tnx EK)
1531.01: linux-2.0.27-:i386-:-:ppro-:- (tnx L3L)
1541.01: linux-2.0.28-:i386-:-:i486-:- (tnx AAF)
1551.00: linux-2.0.28-:i386-:-:pentium-:- (tnx root@duggy=???)
1561.01: linux-2.0.28-:i386-:-:ppro-:- (tnx S3T)
1571.01: linux-2.0.28-osfmach3-:-:-:ppc-:- (tnx CG)
1581.01: linux-2.0.29-:alpha-:-:alpha-:- (tnx MB)
1591.01: linux-2.0.29-:i386-:-:i386-:- (tnx AJK)
1601.01: linux-2.0.29-:i386-:-:i486-:- (tnx FPL)
1611.01: linux-2.0.29-:i386-:-:pentium-:- (tnx FW)
1621.00: linux-2.0.29-:i386-:-:ppro-:- (tnx MMM)
1631.01: linux-2.0.30-:-:-:sparc-:- (tnx J2P)
1641.01: linux-2.0.30-:alpha-:-:alpha-:- (tnx WS)
1651.01: linux-2.0.30-:i386-:-:i386-:- (tnx OK)
1661.00: linux-2.0.30-:i386-:-:i486-:- (tnx KUT)
1671.01: linux-2.0.30-:i386-:-:i486-:- (tnx PK)
1681.01: linux-2.0.30-:i386-:-:pentium-:- (tnx AV)
1691.00: linux-2.0.30-:i386-:-:ppro-:- (tnx root@gate=???)
1701.01: linux-2.0.30-osfmach3-:-:-:ppc-:- (tnx PTW)
1711.01: linux-2.0.30u11-:i386-:-:pentium-:- (tnx JTB)
1721.01: linux-2.0.31-:i386-:-:i486-:- (tnx SAE)
1731.01: linux-2.0.31-:i386-:-:pentium-:- (tnx B3W)
1741.01: linux-2.0.31-:i386-:-:ppro-:- (tnx JAK)
1751.01: linux-2.0.32-:-:-:ie86-:- (tnx root@vmlinuz=???)
1761.01: linux-2.0.32-:alpha-:-:alpha-:- (tnx NR)
1771.01: linux-2.0.32-:i386-:-:i486-:- (tnx SC)
1781.01: linux-2.0.32-:i386-:-:pentium-:- (tnx HT)
1791.01: linux-2.0.32-:i386-:-:ppro-:- (tnx RK)
1801.01: linux-2.0.33-:i386-:-:i486-:- (tnx RAB)
1811.01: linux-2.0.33-:i386-:-:pentium-:- (tnx AF)
1821.01: linux-2.0.33-:i386-:-:ppro-:- (tnx B2W)
1831.01: linux-2.1.9-:i386-:-:i486-:- (tnx SJB)
1841.01: linux-2.1.10-:i386-:-:i486-:- (tnx JB)
1850.96: linux-2.1.13-:i386-:-:i486-:- (tnx ML)
1860.96: linux-2.1.14-:i386-:-:pentium-:- (tnx SCW)
1870.96: linux-2.1.23-:i386-:-:pentium-:- (tnx JF)
1881.01: linux-2.1.24-:-:-:ppc-:- (tnx meta=???)
1890.96: linux-2.1.25-:i386-:-:i486-:- (tnx JBF)
1900.96: linux-2.1.25-:i386-:-:pentium-:- (tnx UO)
1911.00: linux-2.1.26-:i386-:-:i486-:- (tnx DK)
1921.00: linux-2.1.27-:i386-:-:pentium-:- (tnx JF)
1931.01: linux-2.1.28-:i386-:-:i486-:- (tnx HDG)
1941.00: linux-2.1.28-:i386-:-:pentium-:- (tnx RGS)
1951.00: linux-2.1.29-:i386-:-:i486-:- (tnx SJW)
1961.01: linux-2.1.35-:i386-:-:pentium-:- (tnx JF)
1971.01: linux-2.1.36-:i386-:-:i486-:- (tnx ML)
1981.01: linux-2.1.42-:i386-:-:i486-:- (tnx wtanaka=???)
1991.01: linux-2.1.46-:i386-:-:pentium-:- (tnx VR)
2001.01: linux-2.1.51-:i386-:-:pentium-:- (tnx KO)
2011.01: linux-2.1.61-:i386-:-:i486-:- (tnx RO)
2021.01: linux-2.1.65-:i386-:-:i486-:- (tnx F2T)
2031.01: linux-2.1.71-:i386-:-:ppro-:- (tnx MJG)
2041.01: linux-2.1.78-:i386-:-:pentium-:- (tnx AS)
2051.01: linux-2.1.82-:i386-:-:pentium-:- (tnx AY)
2061.01: linux-2.1.85-:i386-:-:pentium-:- (tnx PJH)
2071.00: machten-4-0.4-:-:-:powerpc-:- (tnx RAM)
2081.01: netbsd-1.1-:i386-:-:pentium.(genuineintel.586-class.cpu)-:- (tnx GL)
2091.01: netbsd-1.2-:hp300-:-:-:- (tnx ML)
2101.01: netbsd-1.2-:i386-:-:i486dx.(genuineintel.486-class.cpu)-:- (tnx T2K)
2110.96: netbsd-1.2-:i386-:-:pentium.(genuineintel.586-class.cpu)-:- (tnx GH)
2121.01: netbsd-1.2.1-:mac68k-:-:apple.macintosh.se/30..(68030)-:- (tnx HM)
2131.01: netbsd-1.2.1-:sparc-:-:fmi,mb86904.@.110.mhz,.on-chip.fpu-:- (tnx ZU)
2140.96: netbsd-1.2c-:pmax-:-:-:- (tnx JLW)
2151.01: netbsd-1.3-:hp300-:-:hp.9000/433.(33mhz.mc68040.cpu+mmu+fpu,.4k.on-chip.physical.i/d.caches)-:- (tnx TB)
2161.01: netbsd-1.3.1-:sun3-:-:sun.3/60-:- (tnx MBS)
2171.01: netbsd-1.3_alpha-:i386-:-:intel.pentium.(p54c).(586-class)-:- (tnx GL)
2181.01: nextstep-3.1-:mc680x0-:-:68040-:- (tnx JRY)
2191.01: nextstep-3.3-:hppa-:-:7100lc-:-
2201.01: nextstep-3.3-:i386-:-:pentium-:- (tnx HM)
2211.01: nextstep-3.3-:mc680x0-:-:68040-:- (tnx WEB)
2221.01: nextstep-4.1-:mc680x0-:-:68040-:- (tnx FN)
2231.00: openbsd-2.0-hoth#0-:openbsd.i386-:-:i386-:- (tnx MBS)
2241.00: openbsd-2.0-mr_potatoe_head#2-:openbsd.i386-:-:i386-:- (tnx JJMK)
2250.96: openbsd-2.0-puma#1-:openbsd.m68k-:-:mac68k-:- (tnx AKB)
2261.01: openbsd-2.1-asgard#1-:openbsd.i386-:-:i386-:- (tnx ETT)
2271.01: openbsd-2.1-generic#71-:openbsd.sparc-:-:sparc-:- (tnx MMM2)
2281.01: openbsd-2.1-katana#2-:openbsd.i386-:-:i386-:- (tnx CHR)
2291.01: openbsd-2.1-puma#0-:openbsd.m68k-:-:mac68k-:- (tnx AKB)
2301.01: openbsd-2.2-ele#2-:openbsd.i386-:-:i386-:- (tnx RC)
2311.01: openbsd-2.2-generic#424-:openbsd.i386-:-:i386-:- (tnx ETT)
2321.01: osf1-v2.0-240-:-:-:alpha-:- (tnx JF)
2331.00: osf1-v3.2-148-:-:-:alpha-:- (tnx DL)
2341.01: osf1-v3.2-148-:-:-:alpha-:- (tnx RSK)
2351.01: osf1-v3.2-41-:-:-:alpha-:- (tnx MSD)
2361.01: osf1-v3.2-mp-4.2-:-:-:alpha-:- (tnx MSD)
2371.01: osf1-v4.0-386-:-:-:alpha-:- (tnx TEE)
2381.01: osf1-v4.0-464-:-:-:alpha-:- (tnx AWB)
2391.01: osf1-v4.0-564-:-:-:alpha-:- (tnx A2P)
2401.01: osf1-v4.0-564.32-:-:-:alpha-:- (tnx TLF)
2411.01: osf1-v4.0-878-:-:-:alpha-:- (tnx BJM)
2421.01: sco_sv-3.2-2-:-:-:i386-:- (tnx PW)
2431.01: sinix-l-5.41-d0005-:-:-:mx300i-:- (tnx IH)
2441.01: sunos-4.1.1-1-:mc68020-:sun3-:sun3-:sun3- (tnx JWB)
2451.01: sunos-4.1.1-1-:mc68020-:sun3-:sun3x-:sun3x- (tnx TT)
2461.01: sunos-4.1.3-jl-2-:sparc-:sun4-:sun4c-:sun4c- (tnx T2K)
2471.01: sunos-4.1.3_u1-1-:sparc-:sun4-:sun4c-:sun4c- (tnx MBS)
2481.01: sunos-4.1.3_u1-1-:sparc-:sun4-:sun4m-:sun4m- (tnx RSK)
2491.01: sunos-4.1.3_u1-10-:sparc-:sun4-:sun4m-:sun4m- (tnx aoki=???)
2501.00: sunos-4.1.3_u1-4-:unknown-:sun4-:sun4m-:sun4m- (tnx J2B)
2511.01: sunos-4.1.3_u1-6-:sparc-:sun4-:sun4m-:sun4m- (tnx RD)
2521.01: sunos-4.1.4-1-:unknown-:sun4-:sun4m-:sun4m- (tnx M3S)
2531.01: sunos-4.1.4-2-:sparc-:sun4-:sun4m-:sun4m-
2541.01: sunos-5.3-generic-:sparc-:sun4-:sun4m-:sun4m- (tnx JDJ)
2551.01: sunos-5.4-generic-:sparc-:sun4-:sun4m-:sun4m- (tnx jimo=???)
2560.96: sunos-5.4-generic_101945-10-:sparc-:sun4-:sun4m-:sun4m- (tnx W2K)
2571.00: sunos-5.4-generic_101945-34-:sparc-:sun4-:sun4m-:sun4m- (tnx ACB)
2580.96: sunos-5.4-generic_101946-35-:i386-:i86pc-:i86pc-:i86pc- (tnx CK)
2591.01: sunos-5.5-generic-:i386-:i86pc-:i86pc-:i86pc- (tnx seong=???)
2601.01: sunos-5.5-generic-:sparc-:sun4-:sun4c-:sun4c- (tnx SPM)
2611.01: sunos-5.5-generic-:sparc-:sun4-:sun4m-:sun4m- (tnx RDM)
2621.01: sunos-5.5-generic-:sparc-:sun4-:sun4u-:sun4u- (tnx YC)
2631.01: sunos-5.5-generic_103093-02-:sparc-:sun4-:sun4m-:sun4m- (tnx RF)
2640.96: sunos-5.5-generic_103093-03-:sparc-:sun4-:sun4m-:sun4m- (tnx RDM)
2651.01: sunos-5.5-generic_103093-06-:sparc-:sun4-:sun4m-:sun4m- (tnx ERH)
2661.01: sunos-5.5-generic_103093-10-:sparc-:sun4-:sun4d-:sun4d- (tnx KT)
2671.01: sunos-5.5-generic_103094-05-:i386-:i86pc-:i86pc-:i86pc- (tnx M2G)
2681.01: sunos-5.5.1-generic-:i386-:i86pc-:i86pc-:i86pc- (tnx cro=???)
2691.01: sunos-5.5.1-generic-:sparc-:sun4-:sun4c-:sun4c- (tnx CG)
2701.01: sunos-5.5.1-generic-:sparc-:sun4-:sun4m-:sun4m- (tnx MBS)
2711.01: sunos-5.5.1-generic-:sparc-:sun4-:sun4u-:sun4u-
2720.96: sunos-5.5.1-generic_103640-02-:sparc-:sun4-:sun4m-:sun4m- (tnx SGC)
2731.00: sunos-5.5.1-generic_103640-03-:sparc-:sun4-:sun4u-:sun4u- (tnx EG)
2741.00: sunos-5.5.1-generic_103640-05-:sparc-:sun4-:sun4m-:sun4m- (tnx L2L)
2751.01: sunos-5.5.1-generic_103640-05-:sparc-:sun4-:sun4u-:sun4u- (tnx KY)
2761.01: sunos-5.5.1-generic_103640-06-:sparc-:sun4-:sun4u-:sun4u- (tnx RA)
2771.01: sunos-5.5.1-generic_103640-08-:sparc-:sun4-:sun4c-:sun4c- (tnx RA)
2781.01: sunos-5.5.1-generic_103640-08-:sparc-:sun4-:sun4d-:sun4d- (tnx MS)
2791.01: sunos-5.5.1-generic_103640-08-:sparc-:sun4-:sun4m-:sun4m- (tnx S2P)
2801.01: sunos-5.5.1-generic_103640-08-:sparc-:sun4-:sun4u-:sun4u- (tnx CM)
2811.01: sunos-5.5.1-generic_103640-12-:sparc-:sun4-:sun4m-:sun4m- (tnx IK)
2821.01: sunos-5.5.1-generic_103640-18-:sparc-:sun4-:sun4u-:sun4u- (tnx PMH)
2831.01: sunos-5.5.1-generic_103641-08-:i386-:i86pc-:i86pc-:i86pc- (tnx TL)
2841.01: sunos-5.5.1-generic_103641-12-:i386-:i86pc-:i86pc-:i86pc- (tnx JS)
2851.01: sunos-5.5.1-generic_105428-01-:sparc-:sun4-:sun4u-:sun4u- (tnx BCM)
2860.96: sunos-5.5.1-generic_patch-:i386-:i86pc-:i86pc-:i86pc- (tnx D2K)
2871.01: sunos-5.6-generic-:sparc-:sun4-:sun4c-:sun4c- (tnx DS)
2881.01: sunos-5.6-generic-:sparc-:sun4-:sun4m-:sun4m- (tnx BDM)
2891.01: sunos-5.6-generic-:sparc-:sun4-:sun4u-:sun4u- (tnx RPS)
2901.01: sunos-5.6-generic_105182-01-:i386-:i86pc-:i86pc-:i86pc- (tnx JFK)
2911.01: sunos-5.6-generic_105182-04-:i386-:i86pc-:i86pc-:i86pc- (tnx YC)
2920.96: ultrix-4.3-1-:pmax-:-:risc-:- (tnx YF)
2931.01: ultrix-4.4-0-:-:-:risc-:- (tnx RSK)
2941.01: unix_sv-4.2mp-2.1.2-:i386-:-:i386-:- (tnx J2W)
295
296
1All about the new "FUNKY" queries
2=================================
3 Starting with version 1.1.2 of these patches, you can now choose to
4use "FUNKY" queries on the virtual and alias tables. To decide to use
5these new queries, you must uncomment -DFUNKY_ALIAS_QUERIES and/or
6-DFUNKY_VIRTUAL_QUERIES in the Makefile. The old-style behaviour will
7be the default.
8 In a nutshell, FUNKY queries let you have SQL wildcards in certain
9fields, enabling you, for example, to catch all postmaster addresses
10at virtual domains you host by mapping postmaster@% to alias-postmaster.
11
12IMPORTANT
13=========
14 Because of the nature of these new queries, using wildcards and so
15on, the possibility exists for you to deliver mail to THE WRONG
16PEOPLE if you don't think carefully about the setup you're going to
17use. Read on to get the details and decide if you want to use this
18new functionality.
19
20The old virtual queries
21=======================
22 Given an address of the form vu@vh, where vu is the virtual username
23and vh is the virtual host, the following query is generated in order
24to find the local user we should deliver to:
25
26 select username, ext from virtual where
27 (virtual_username='vu' or virtual_username='') and
28 virtual_host='vh' order by virtual_username desc limit 1
29
30 By select rows where the virtual username is blank OR where it
31matches exactly we can have wildcard matches. By ordering by the
32username in descending order we ensure that the exact match comes out
33before the wildcard, which is important because the limit 1 ensures
34that we (correctly) only get one row back.
35
36 Hence, given a table of the form:
37
38 +---------------+-----+------------------+--------------+
39 | username | ext | virtual_username | virtual_host |
40 +---------------+-----+------------------+--------------+
41 | user_one | | one | domain.tld |
42 | user_two | | two | domain.tld |
43 | user_three | | | domain.tld |
44 +---------------+-----+------------------+--------------+
45
46we can see at a glance that mail for one@domain.tld goes to user_one,
47mail for two@domain.tld goes to user_two and mail for xxx@domain.tld,
48where xxx is anything you like (DJB would say xxx is a member of the
49complement of the set { "one", "two" } in the set of valid "username
50parts" of mail addresses :-), goes to user_three.
51 Easy.
52
53The new queries
54===============
55 Here's the query that gets sent to the database if you #define
56FUNKY_VIRTUAL_QUERIES:
57
58 select username, ext, virtual_host rlike '[%_]' as wild_h,
59 virtual_username rlike '[%_]' as wild_u from virtual where
60 'vu' like virtual_username and 'vh' like virtual_host
61 order by wild_u, wild_h limit 1
62
63 See, they ain't called FUNKY for nothing! Let's have a close look.
64
65 Selecting username and ext is simple enough but what's this
66"virtual_host rlike '[%_]' as wild_h" stuff? Well it simply matches
67rows in the virtual table where the value contains a wildcard
68character (% or _) and assigns the value 0 (false) or 1 (true) to
69the field of wild_h. Similarly for virtual_username. This is
70useful because we then order by the values of wild_u and wild_h,
71effectively forcing rows without wildcards to the front. In other
72words we trust entries more the fewer wildcards they contain.
73 Here comes the example. I've tacked on the values of wild_u and
74wild_h as they would appear in the result set.
75
76 +---------------+-----+------------------+--------------+--------+--------+
77 | username | ext | virtual_username | virtual_host | wild_u | wild_h |
78 +---------------+-----+------------------+--------------+--------+--------+
79 | user_one | | one | domain.tld | 0 | 0 |
80 | user_two | | % | domain.tld | 1 | 0 |
81 | user_three | | abuse | % | 0 | 1 |
82 | user_four | | % | % | 1 | 1 |
83 +---------------+-----+------------------+--------------+--------+--------+
84
85 In this example, mail for one@domain.tld gets delivered to user_one as
86before. As it happens, mail for two@domain.tld still gets delivered to
87user_two but three@domain.tld now also goes to user_two because
88virtual_username contains the SQL % wildcard. Mail for abuse@example.org,
89assuming you also host example.org, goes to user_three, as does mail for
90abuse@evil.org (same disclaimer) and abuse@anything. user_four picks up
91anything not mentioned previously.
92
93 I know what you're thinking. You've spotted a little omission on my
94part, haven't you? What happens to mail for abuse@domain.tld? According
95to the the table above it could potentially be delivered to user_two,
96user_three or even user_four.
97 In fact, the query outlined a few paragraphs up specifies that the
98mail should go to user_three because the matching rows of the table
99appear in the following order after sorting:
100
101 +---------------+-----+------------------+--------------+--------+--------+
102 | username | ext | virtual_username | virtual_host | wild_u | wild_h |
103 +---------------+-----+------------------+--------------+--------+--------+
104 | user_three | | abuse | % | 0 | 1 |
105 | user_two | | % | domain.tld | 1 | 0 |
106 | user_four | | % | % | 1 | 1 |
107 +---------------+-----+------------------+--------------+--------+--------+
108
109 Recall we order by wild_u, wild_h...
110
111 There is a way to override this. If you #define HOST_HAS_PRECEDENCE,
112the query will be rewritten to order by wild_h, wild_u, giving the table
113the following appearance:
114
115 +---------------+-----+------------------+--------------+--------+--------+
116 | username | ext | virtual_username | virtual_host | wild_u | wild_h |
117 +---------------+-----+------------------+--------------+--------+--------+
118 | user_two | | % | domain.tld | 1 | 0 |
119 | user_three | | abuse | % | 0 | 1 |
120 | user_four | | % | % | 1 | 1 |
121 +---------------+-----+------------------+--------------+--------+--------+
122
123 This is why I said you could deliver mail to the wrong people. You need
124to think about how you want wildcarded delivery to work. What's more
125important for YOUR site? That you, the administrator, catch abuse, postmaster,
126mailer-daemon etc etc messages for ANY domain you host? Or that your users
127catch ANY address at their domains?
128 You can't have it both ways, unless you add explicit entries for all your
129domains (eg abuse@domain.tld goes to user_five).
130
131New alias table queries
132=======================
133 These new queries are a bit more experimental because there's a lot
134more potential for confusion.
135 The alias table query, given a username 'u' and alias 'a', has been
136changed from
137
138 select alias_username, alias_host from alias where
139 username='u' and alias='a'
140to
141 select alias_username, alias_host, username rlike '[%_]' as wild_u,
142 alias rlike '[%_]' as wild_a from alias where
143 'u' like username and 'a' like alias order by wild_u, wild_a
144
145 What this means is that you can have wildcards in the username or
146alias fields of the alias table, IF YOU WANT. Remember that SQL "like"
147behaves exactly like "=" if there are no wildcards floating around.
148 This lets you have entries in the alias table viz:
149
150 +----------+-----------+----------------+--------------------+
151 | username | alias | alias_username | alias_host |
152 +----------+-----------+----------------+--------------------+
153 | user\_% | % | forward_one | somewhere.else.com |
154 | user_two | % | forward_two | somewhere.else.com |
155 +----------+-----------+----------------+--------------------+
156
157 Here we forward all user_xxx's mail to forward_one@somewhere.else.com
158and user_two's mail to forward_two@somewhere.else.com AS WELL.
159 As with the virtual table, you can force non-default behaviour by
160uncommenting -DALIAS_HAS_PRECEDENCE. You would only need to do this
161if you also uncommented -DOIL_AND_WATER, which won't let you mix rows
162which have wildcarded entries and rows which do not. In other words,
163all entries for which a user (or alias) is explicitly matched are
164processed and all others are discarded. In the example above, this
165would mean that the user_two would not have a copy of his mail
166forwarded to forward_one@somewhere.else.com because the matching
167stops after the forward_two@somewhere.else.com is found.
168 Confused? You can always turn off FUNKY_ALIAS_QUERIES...
169
170 Seriously though, I would recommend setting both -DOIL_AND_WATER and
171-DALIAS_HAS_PRECEDENCE. In fact, they may well end up being the default
172by the time you read this. Default, that is, in that they will be
173uncommented in the makefile, while still being non-default in the sense
174that you still need to uncomment FUNKY_ALIAS_QUEREIS. Oh, you know what
175I mean. Anyway, check out the next example, which should make things a
176little clearer.
177
178 +----------+-----------+----------------+--------------------+
179 | username | alias | alias_username | alias_host |
180 +----------+-----------+----------------+--------------------+
181 | user_two | % | forward_two | somewhere.else.com |
182 | user_two | one | user_one | |
183 +----------+-----------+----------------+--------------------+
184
185 With -DALIAS_HAS_PRECEDENCE and -DOIL_AND_WATER set, mail for
186user_two-one will go to user_one whereas mail for user_two-anything
187will go to forward_two@somewhere.else.com. With either
188-DOIL_AND_WATER or -DALIAS_HAS_PRECEDENCE set, mail for user_two-one
189will go to both user_one and to forward_two@somewhere.else.com. Note,
190however, that the REASON that the mail is sent to both addresses will
191be different depending on the #defines you set. If you set only
192-DOIL_AND_WATER, both rules are followed because the matching is
193done on username. If you set only -DALIAS_HAS_PRECEDENCE, both rules
194are followed (the second before the first, for all it matters)
195because both alias fields match the 'one' extension.
196
197 Got all that? Good. Now to confuse you again. Say my table
198looks like this:
199
200 +----------+-----------+----------------+--------------------+
201 | username | alias | alias_username | alias_host |
202 +----------+-----------+----------------+--------------------+
203 | % | one | user_three | |
204 | user_two | % | forward_two | somewhere.else.com |
205 | user_two | one | user_one | |
206 +----------+-----------+----------------+--------------------+
207
208 What happens for mail to user_two-one now? What should happen?
209The answer to these questions will help you decide whether or
210not you want to run FUNKY alias queries.
211
212 Drop me a line with your comments on these new queries. I'd
213especially like some feedback on the alias stuff.
214