# Common Configuration file for all qmail daemons
# $Id: conf-common,v 1.13 2005/01/30 21:10:59 glen Exp $

# Qmail User IDS to run daemons as
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
QMAILLUID=`id -u qmaill`

# Qmail Control Dir (this is actually set in /etc/profile.d/qmail.sh)
QMAIL_CONTROLDIR=${QMAIL_CONTROLDIR:-/etc/qmail/control}

# Host and port to listen on
# We listen on the IPv4 local ip by default
TCPSERVER_HOST=0.0.0.0
TCPSERVER_PORT=${SERVICE}

# you do not need to specify -x, -c, -u or -g in this variable as those are
# added later
TCPSERVER_OPTS="-p -v"

# This tells tcpserver where to file the rules cdb file
TCPSERVER_RULESCDB=/etc/tcprules.d/tcp.qmail-${SERVICE}.cdb
# look without qmail prefix
[ ! -f "${TCPSERVER_RULESCDB}" ] && TCPSERVER_RULESCDB=/etc/tcprules.d/tcp.${SERVICE}.cdb

# we limit data and stack segments to 8mbytes, you may need to raise this if
# you are using a filter in QMAILQUEUE
SOFTLIMIT_OPTS="-m 8000000"

# We don't have anything to set QMAILQUEUE to at the moment, so we leave it
# alone Generally it is best to add this in your appropriate (usually SMTP) cdb
# files /etc/tcp.*.cdb OR /etc/tcprules.d/tcp.qmail-*.cdb instead of on a
# global basis, as otherwise outgoing mail will be checked (because qmail-queue
# is used for most parts of qmail) You can also enable this per-server by just
# placing it into the other configuration files by placing the line there
# instead. Please note that the export part is important.
#export QMAILQUEUE=""

# tcpserver maximum concurrency, defaults to 40 in tcpserver
# this controls the maximum number of incoming connections that it will accept
[ -e ${QMAIL_CONTROLDIR}/concurrencyincoming ] && MAXCONN=$(<${QMAIL_CONTROLDIR}/concurrencyincoming) || MAXCONN=40

# logging directives
LOG_OPTS="t" # 't' is for timestamp

# size must be between 4096 and 16777215.
# The default maximum file size is 99999.
LOG_MAXSIZE=10000000

# The count must be at least 2.
# The default number of log files is 10.
LOG_MAXCOUNT=365

# build LOG_OPTS from this
[ -n "${LOG_MAXSIZE}" ] && LOG_OPTS="${LOG_OPTS} s${LOG_MAXSIZE}"
[ -n "${LOG_MAXCOUNT}" ] && LOG_OPTS="${LOG_OPTS} n${LOG_MAXCOUNT}"

# directory to log to
LOG_DEST=/var/log/qmail/${SERVICE}d

# BIG FAT WARNING:
# If you disable this by uncommenting it you will turn _off_ the configuration
# sanity check do so at your own risk!
#QMAIL_DISABLE_SANITY_CHECK=1
