Tetsu Ushijima
qmail-conf

Environment variables

After creating a service directory D with any of the qmail-*-conf programs, you can change the behavior of the service by changing the files in D/env and D/log/env. Part of the start-up scripts in D (D/run and D/log/run) is run with environment modified according to these directories. These directories are read by envdir.

Exception: a service directory D created by qmail-delivery-conf does not have D/env.

For example, you can let tcpserver accept at most 100 simultaneous SMTP connections by:

echo 100 > /service/smtpd/env/CONCURRENCY
svc -t /service/smtpd

and can revert to the default concurrency limit by:

cp /dev/null /service/smtpd/env/CONCURRENCY
svc -t /service/smtpd

Environment variables specified by D/env/*

BACKLOG
Allowed backlog. If it is set, D/run runs tcpserver with -b$BACKLOG. Otherwise the -b option is not used.
CONCURRENCY
Concurrency limit. If it is set, D/run runs tcpserver with -c$CONCURRENCY. Otherwise the -c option is not used.
DATALIMIT
Soft limit for data segments. If it is set, D/run runs softlimit with -d$DATALIMIT. Otherwise the -d option is not used. This limit has an effect on tcpserver and its child processes.
IP
IP address on which the service is provided. If it is set, D/run runs tcpserver with $IP as the first non-option argument. Otherwise D/run uses 0 for that argument.
LOCALNAME
Local host name. If it is set, D/run runs tcpserver with -l$LOCALNAME. Otherwise the -l option is not used.
MAILDIRNAME
(POP3 only.) Name of the maildir directory. If it is set, D/run runs qmail-pop3d with $MAILDIRNAME as the argument. Otherwise D/run uses Maildir for that argument.
POPUPHOST
(POP3 only.) Host name in the POP3 greeting. If it is set, D/run runs qmail-popup with $POPUPHOST as the first argument. Otherwise D/run uses the first line of /var/qmail/control/me for that argument.
PORT
Service port. If it is set, D/run runs tcpserver with $PORT as the second non-option argument. Otherwise D/run uses the standard port number (25 for SMTP, 110 for POP3, 209 for QMTP, and 628 for QMQP) for that argument.
REMOTEINFO
Method for obtaining the remote information. If it is set to r, D/run runs tcpserver without -R and -t. If it is set and starts with a digit, D/run runs tcpserver with -t$REMOTEINFO and the -R option is not used. Otherwise D/run script runs tcpserver with -R and the -t option is not used.
REMOTENAME
Method for obtaining the remote host name. If it is set to h, D/run runs tcpserver without -H and -p. If it is set to p, D/run runs tcpserver with -p and the -H option is not used. Otherwise the D/run runs tcpserver with -H and the -p option is not used.

Environment variables specified by D/log/env/*

MAXFILESIZE
Maximum file size. If it is set, D/log/run runs multilog with s$MAXFILESIZE. Otherwise the s action is not specified.
MAXLOGFILES
Maximum number of log files. If it is set, D/log/run runs multilog with n$MAXLOGFILES. Otherwise the n action is not specified.
PROCESSOR
Log file processor. If it is set, the D/log/run runs multilog with !$PROCESSOR. Otherwise the ! action is not specified.