1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
|
WARNING - WARNING - WARNING - WARNING - WARNING - WARNING
qmail does not support dot-locking internally.
You are in danger of losing mail if you re-configure
qmail without understanding the implications of this.
WARNING - WARNING - WARNING - WARNING - WARNING - WARNING
On Debian the standard location for a users mailbox is
/var/spool/mail/<username>
and when programs write to that file they are expected to lock the
file to prevent another process from accessing it at the same time, and
thus corrupting your mail file.
For reasons explained in /usr/doc/qmail/INSTALL.mbox, qmail does not do this.
The default setup uses /usr/sbin/qmail-procmail to perform the final
delivery of mail with appropriate dot-locking to prevent loss of mail.
This is just a script that invokes procmail.
You should not really need to invoke this as a user, but if you can
think of a reason to do so, a line like this in your .qmail file will
result in normal delivery via procmail:
|/usr/sbin/qmail-procmail
If you were to instead put something like:
/var/spool/mail/phil
in your .qmail file, it would deliver mail to that file, but would
lock it using flock's rather than dot-lock's. Unless you know
different, that would probably mean that every other program on the
system would consider the file to be unlocked, and would leave you
open to mail loss.
Personally, I'd recommend moving to Maildir/ format if you can. Read
the files in /usr/doc/qmail to find out more.
---
How the Debian setup differs from standard qmail setups:
The default setup sets aliasempty (i.e. the default delivery method)
to be /usr/sbin/qmail-procmail, which is a wrapper around procmail.
This results in delivery into /var/spool/mail.
To change this to one of the more standard qmail setups edit
/etc/init.d/qmail
The binaries normaly found in /var/qmail/bin have been split between
/usr/bin and /usr/sbin.
The configuration files have been moved to /etc/qmail and the queue
has been moved to /var/spool/qmail.
Symbolic links have been placed in /var/qmail to make it look like a
normal qmail setup.
Debian is still using /etc/init.d/qmail as the place to configure the
startup, rather than playing with files in /var/qmail/rc
---
tcpserver and /etc/tcp.smtp
The default /etc/tcp.smtp file contains a single line:
127.0.0.1:allow,RELAYCLIENT=""
which permits clients on the local machine to use this as a mail relay. For
more information, look at question 5.5 of the FAQ (/usr/doc/qmail/FAQ.gz)
---
Postmaster mail:
You will want to create a ~alias/.qmail-postmaster file, probably containing
your e-mail address with an ampersand (&) in front of it, i.e:
&myself@mydomain.com
This will make postmaster mail go to you. I've also created a default
/var/qmail/users/assign file with contents that will ensure that other
non-user mail (root, mailer-daemon etc.) goes to the postmaster.
These files should really be setup automatically in the postinst.
---
Other stuff:
/usr/lib/qmail/eliminate-dups has been provided, to allow you to discard
incoming duplicate mails
---------------------------
/etc/inetd.conf & /etc/hosts.allow qmail-smtpd setup:
[This approach has been dropped, in favour of tcpserver (see above)]
Here's the old info, just in case you want to do it that way:
the line in /etc/inetd.conf expects there to be special line(s) in
/etc/hosts.allow:
smtp: .MYDOMAIN.COM: setenv RELAYCLIENT:twist { { /usr/bin/tcp-env /usr/sbin/qmail-smtpd 1>&3;} 2>&1|splogger qmail;} 3>&1
smtp: ALL: twist { { /usr/bin/tcp-env /usr/sbin/qmail-smtpd 1>&3;} 2>&1|splogger qmail;} 3>&1
this example allows hosts from MYDOMAIN.COM to relay mail to anywhere,
and allows others to send mail to hosts listed in rcpthosts as usual.
The `twist' stuff is to allow the log messages to go (via splogger) to
syslog, rather than mucking up the SMTP connection.
Phil Hands <phil@hands.com>
|