EZMLM (better with the -IDX patch) is a full-featured mailing list manager, designed to work with the excellent qmail mail transfer agents (MTAs). I have used qmail for years, and one of the best benefits of it is it doesn't add new features willy-nilly. If you want to install-and-forget, qmail is the way to go. But only if it has the features you want.
I found one feature it didn't: The ability to interrupt a message mid-transfer based on the match of one in a series of regular expressions in the header or in the body. However, Postfix does. The problem is that EZMLM is designed to work exclusively, and very tightly, with qmail.
Cursory googling (first page of hits on "ezmlm postfix") was unhelpful. I found the following:
Rather than attempt to patch EZMLM to work with Postfix, I decided to attempt to have two MTAs on one machine, with Postfix being the primary, and feeding qmail mailing list stuff. qmail is setup to relay all messages through Postfix.
Clearly, this solution is not going to be sufficient where speed is a primary concern. But for my needs, it's way more than enough. In the event a reader is attempting a similar feat, but requires greater speed than this solution provides, there is one obvious speedup: replace the lame perl script below with something written in C. But it would be better all around just to hack ezmlm to use whatever native MTA is present, possibly by using a generic exec to "/usr/sbin/sendmail -t".
The following steps need to be executed once, during installation.
recipient_delimiter = -
# echo "dmumford.com" > /var/qmail/control/defaultdomain # echo "dmumford.com" > /var/qmail/control/locals # echo "gomer-qmail.dmumford.com" >> /var/qmail/control/locals # echo "gomer-qmail.dmumford.com" > /var/qmail/control/me # echo "dmumford.com" > /var/qmail/control/plusdomain # echo "dmumford.com" > /var/qmail/control/rcpthosts # echo "gomer-qmail.dmumford.com" >> /var/qmail/control/rcpthosts # echo ":gomer.dmumford.com" > /var/qmail/control/smtproutes
#!/usr/bin/perl open(QM, "|/var/qmail/bin/qmail-inject") || die ("Can't open /var/qmail/bin/qmail-inject: $!\n"); $in_header = 1; while (<>) { if ($in_header == 1) { if ($_ !~ /^delivered-to:/i) { print(QM $_); } if ($_ =~ /^(\r\n|\n)$/) { $in_header = 0; } } else { print(QM $_); } } close(QM);
LISTNAME@dmumford.com LISTNAMEand run "postmap /etc/postfix/virtual"
LISTNAME: |/usr/local/sbin/listhack.pland run the newaliases command. Then for good measure, run "postix reload".
# cd ~lists # ezmlm-make -B -D -E -f -g -H -I -l -M -n -o -p -Q -R -s -u \ `pwd`/LISTNAME /var/qmail/alias/.qmail-LISTNAME LISTNAME \ dmumford.com
# chown -R alias ~lists
# cd ~lists/LISTNAME # chown -R root:nofiles . # for file in `find .`; do [ -x $file ] && chmod 750 $file || chmod 640 $file done # chown -R alias Log archive bounce subscribers lock lockbounce mod # chmod 1750 . # chown alias .
This solution appears to work well for me for low-volume mailing lists. Local deliveries, including 100-message archive retrievals, are very nearly instantaneous on the 133MHz box that the server runs on. If you attempt this using these instruction, I would very much like to hear about it. Especially if you succeed.