Mail-QmailRemoteXS
view release on metacpan or search on metacpan
qmailrem/FAQ view on Meta::CPAN
then qmail will no longer consider www to be a user; see qmail-getpw.0.
For more precise control over address assignments, see qmail-users.0.
5. Setting up servers
5.1. How do I run qmail-smtpd under tcpserver? inetd is barfing at high
loads, cutting off service for ten-minute stretches. I'd also like
better connection logging.
Answer: First, install the tcpserver program, part of the ucspi-tcp
package (http://pobox.com/~djb/ucspi-tcp.html). Second, remove the smtp
line from /etc/inetd.conf, and put the line
tcpserver -u 7770 -g 2108 0 smtp /var/qmail/bin/qmail-smtpd &
into your system startup files. Replace 7770 with your qmaild uid, and
replace 2108 with your nofiles gid. Don't forget the &. The change will
take effect at your next reboot.
By default, tcpserver allows at most 40 simultaneous qmail-smtpd
processes. To raise this limit to 400, use tcpserver -c 400. To keep
track of who's connecting and for how long, run (on two lines)
tcpserver -v -u 7770 -g 2108 0 smtp /var/qmail/bin/qmail-smtpd \
2>&1 | /var/qmail/bin/splogger smtpd 3 &
5.2. How do I set up qmail-qmtpd?
Answer: Two steps. First, put a
qmtp 209/tcp
line into /etc/services. Second, put (all on one line)
qmtp stream tcp nowait qmaild
/var/qmail/bin/tcp-env tcp-env /var/qmail/bin/qmail-qmtpd
into /etc/inetd.conf, and give inetd a HUP.
If you have tcpserver installed, skip the inetd step, and set up
tcpserver -u 7770 -g 2108 0 qmtp /var/qmail/bin/qmail-qmtpd &
replacing 7770 and 2108 with the qmaild uid and nofiles gid. See
question 5.1 for more details on tcpserver.
5.3. How do I set up qmail-pop3d? My old POP server works with mbox
delivery; I'd like to switch to maildir delivery.
Answer: Four steps. First, install the checkpassword program
(http://pobox.com/~djb/checkpwd.html). Second, make sure you have a
pop3 110/tcp
line in /etc/services. Third, put (all on one line, including
qmail-popup twice)
pop3 stream tcp nowait root
/var/qmail/bin/qmail-popup qmail-popup
YOURHOST /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir
into /etc/inetd.conf, and give inetd a HUP; replace YOURHOST with your
host's fully qualified domain name. Fourth, set up Maildir delivery for
any user who wants to read mail via POP.
If you have tcpserver installed, skip the inetd step, and set up (on two
lines)
tcpserver 0 pop3 /var/qmail/bin/qmail-popup YOURHOST \
/bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir &
replacing YOURHOST with your host's fully qualified domain name. See
question 5.1 for more details on tcpserver.
Security note: pop3d should be used only within a secure network;
otherwise an eavesdropper can steal passwords.
5.4. How do I allow selected clients to use this host as a relay? I see
that qmail-smtpd rejects messages to any host not listed in
control/rcpthosts.
Answer: Three steps. First, install tcp-wrappers, available separately,
including hosts_options. Second, change your qmail-smtpd line in
inetd.conf to
smtp stream tcp nowait qmaild /usr/local/bin/tcpd
/var/qmail/bin/tcp-env /var/qmail/bin/qmail-smtpd
(all on one line) and give inetd a HUP. Third, in tcpd's hosts.allow,
make a line setting the environment variable RELAYCLIENT to the empty
string for the selected clients:
tcp-env: 1.2.3.4, 1.2.3.5: setenv = RELAYCLIENT
Here 1.2.3.4 and 1.2.3.5 are the clients' IP addresses. qmail-smtpd
ignores control/rcpthosts when RELAYCLIENT is set. (It also appends
RELAYCLIENT to each envelope recipient address. See question 5.5 for an
application.)
Alternative procedure, if you are using tcpserver 0.80 or above: Create
/etc/tcp.smtp containing
1.2.3.6:allow,RELAYCLIENT=""
127.:allow,RELAYCLIENT=""
to allow clients with IP addresses 1.2.3.6 and 127.*. Run
tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
Finally, insert
-x /etc/tcp.smtp.cdb
after tcpserver in your qmail-smtpd invocation.
5.5. How do I fix up messages from broken SMTP clients?
Answer: Three steps. First, put
| bouncesaying 'Permission denied' [ "@$HOST" != "@fixme" ]
| qmail-inject -f "$SENDER" -- "$DEFAULT"
into ~alias/.qmail-fixup-default. Second, put
fixme:fixup
into /var/qmail/control/virtualdomains, and give qmail-send a HUP.
( run in 1.169 second using v1.01-cache-2.11-cpan-364913b4093 )