 2008/05/12
|
Last update 2004/03/23
The Labs - Design & Functionality For The NetQMail - The Sendmail Replacement
- Introduction
- DOTQM
- QMLOCK
- Other QMail Tools
qmail is a sendmail replacement which is very stable and secure:
All projects we developed we use qmail solely, it takes 2-3hrs the
first time
to set it up, but it's worth once you did it, we recommend to read
the MAN pages carefully; since qmail is implemented in the
light of modularity and security, (e.g. qmail doesn't
accept group/world writable .qmail-files) so an aware system-admin
is required to install and use it.
Especially when you are web-hosting ISP, qmail makes
virtual hosting quite easy, and no longer editing cryptic sendmail
config files.
dotqm is a small perl-script which helps to maintain
dot-qmail files (.qmail-*). One central file (with possibility to include others)
you control all actions. Since qmail is ideal for virtual hosting, one
real account handles an entire domain then dotqm is very useful.
Download | | dotqm the perl-source$MyVersion: 0.001 - Wed Jan 26 10:40:46 MET 2000 - kiwi$
|
Usage | | Should a .dotqmrc exist then it will be automatically
used in case no arguments are given. -v is the verbose-switch.
The file should look like this:
|
# comment-line, it's ignored
|
|
email-address action 1
|
|
email-address2 action 2
|
|
etc.
|
The email-address can be a full-qualified, or just the login.
Within your /var/qmail/control/ you setup for an user his
virtual domain, so all email is forwarded to ~user, and
here dotqm is usable to maintain all local forwardings
for a particular user.
|
Example | |
dotqmrc:
|
# --- DOTQM Resource Sample File
|
|
|
|
#include <lists.qm>
|
|
|
|
john@example.com &john@heaven.com
|
|
text-forward@example.com |preline procmail -f
|
|
info@example.com |preline autoreply
|
lists.qm:
|
# --- My mailing-lists
|
|
|
|
friends-l |preline list-handler -f friends-l
|
|
buddies-l |preline list-handler -f buddies-l
|
|
lovers-l |preline list-handler -f lovers-l
|
|
enemies-l |preline list-handler -f enemies-l
|
which will create all .qmail-files.
In case you need a 'non-delivery' case, a default, then
use like this:
|
qmail-local Features | | Within the .qmail-files you can have different actions:
- Mail-forwarding: email-address
e.g. john@heaven.com or &john@heaven.com
- Mailbox: ./mbox-file
e.g. ./mbox
- Maildir: ./maildir/
e.g. ./Maildir/
- Program-feeding: |program
e.g. |autoreply -f myoption
- Program-feeding + preline: |preline program
e.g. |preline autoreply -f myoption
preline is a program part of the qmail distribution,
it provides UUCP conform header (From_ line).
More info you find at dot-qmail (5).
|
qmlock is a perl-program which is used with the dot-qmail-files
to ensure a certain program is not used simultanously but scheduled, usually
with mailing-list managers.
Usage: qmlock name command [args ...]
Use: .qmail-test:
|
| preline qmlock test list-handler -f test
|
It creates a file /tmp/qmlock-test for locking purposes, and
makes sure 'list-handler -f test' is called only once, and all other qmail-calls (via .qmail-test)
are delayed.
Switches: -v[erbose] (verbose) -r[etry] secs (define retry)-t[imeout] secs (define timeout when lock should be ignored)
If you know procmail, then you
obviously realize why qmlock is useful. procmail allows easy
locking, and dotqm & qmlock replace some of the procmail-functionality.
We ran procmail with qmail, but since procmail can't handle Bcc:
we dropped it (you have to work with Delivered-To: otherwise), and now handle all direct via qmail, with these two perl-scripts.
If you run 100+ mailing-lists and use qmlock be aware that in worst case x-times qmlock
is running, each qmlock uses 500K (perl), so 100 x 0.5M are 50MB.
We will provide qmlock as C-source with preline functionally soon.
| QMail4. Other QMail Tools
|

Last update 2004/03/23 
All Rights Reserved - (C) 1997 - 2008 by The Labs.Com |