I am new to this list having just about set up qmail on a home network
linux server for the first time. I spent hours over a number of days
pouring through the documentation and the qmail.org web site looking
for help - and whilst I think I now have a picture NOWHERE could I
find a summary of what all the control files did and in what order so
that I could actually get qmail do what I wanted it to. There were
plenty of simple guides if you wanted to set it up one particular way,
but none of them were quite how I wanted it.
Eventually, in order to understand I drew a flow chart, see below, to
try and help my understand the process. Somewhat nervously I post it
here (nervous because netiquette normally dictates that you lurk for
while - I just was so desparate for this info that I felt it was worth
the risk of making a complete plonker of myself) for two purposes.
1) To get verification that what I have summised is correct, AND
2) If we can get it correct to plead for someone to put it in a
prominent place (like off www.qmail.org ) so that newcomers who come
after me have a model to work with.
----------------------------------------------------------------------
'me' can be used as default for a number of files
do a 'man qmail-control' to get a list
user = login account on system
mail is being sent to [EMAIL PROTECTED] and can enter in two ways
qmail-inject qmail-smtpd
| (use smtpgreeting)
| |
"from"[EMAIL PROTECTED] is RELAYCLIENT defined?-Y-+
or [EMAIL PROTECTED] | |
| N |
| | |
| REJECT MAIL------N-is y.z in 'rcpthosts' |
| | |
| Y |
| | |
| V |
+--------------------------+------------------------------------+
|
set "deliverto" = [EMAIL PROTECTED]
|
+------------------------->|
| |
| V
| qmail-queue
| |
| |
| qmail-send
| |
| if "from" has no @ use 'envnoathost'
| |
| is y.z in 'locals'-Y-----------------+
| | |
| N set "account" = x
| | |
| is any of [EMAIL PROTECTED] in 'virtualdomains' |
| | | |
| N Y |
| | | |
| qmail-rspawn lookup "account" (see below) |
| | add -x to end of |
| qmail-remote "account" |
| | | |
| is y.z in 'smtproute' +--------------->|
| | | |
| N Y qmail-lspawn
| | | |
| lookup MX for y.z | |
| and send lookup route |
| and send is any of "account"
| +-----N-in 'users/assign'
| | |
| set "user" = Y
| part of "account" before '-' |
| | lookup "user"
| | |
| |<----------------+
| |
| is "user" qmailable (not root etc)
| | |
| N Y
| | |
| set "user" = alias |
| | |
| |<-----------------------+
| |
| qmail-local (run as "user")
| |
| is there an appropriate
| .qmail file (based on "account" without "user")
| |
|
| Y N
| | |
| | bounce<-----N-is "account" = "user"
| | |
| | Y
| | |
| empty file?-Y---------------------->|
| | |
| for each line in file write message to
| | | default Maildir/Mbox
| starts with & starts with .
| or letter or /
| | |
| set "deliverto" store in Maildir/Mbox
| line in file
| |
+----------+
NOTE: when looking up virtual domains then the Right Hand Side (after
the :)is prepended to the recipeint address. NOTE if this is blank
the line is treated as though it is not matched in 'virtualdomains' at
all as is passed on to qmail-rspawn even though it might also be
matched by another line
NOTE: 'users/assign' must have a . on the last line AND you must run
qmail-newu whenever it is changed for the change to be noticed (ie it
is not sufficient to restart qmail.
NOTE: you must restart qmail whenever one of 'control files' are
changed.
------------------------------------------------------------------
look forward to comments
(and I am not yet using qmail to send this!)
Alan
[EMAIL PROTECTED]
http://www.chandler.u-net.com