void-packages/srcpkgs/sqmail/files/qmail-smtpd/run

25 lines
608 B
Bash
Executable File

#!/bin/sh
exec 2>&1
QMAILU=$(id -u _qmaild)
QMAILG=$(id -g _qmaild)
HOSTNAME=$(hostname)
export UTF8="1"
if [ -f /var/qmail/ssl/ssl.env ]; then
export UCSPITLS=""
. /var/qmail/ssl/ssl.env
exec env PATH="/var/qmail/bin:$PATH" \
chpst -m 50000000 \
sslserver -seVn -Rp -l $HOSTNAME \
-Xx /var/qmail/control/rules.smtpd.cdb \
-u $QMAILU -g $QMAILG :0 25 \
qmail-smtpd 2>&1
else
exec env PATH="/var/qmail/bin:$PATH" \
chpst -m 50000000 \
tcpserver -p -v \
-Xx /var/qmail/control/rules.smtpd.cdb \
-u $QMAILU -g $QMAILG :0 25 \
qmail-smtpd 2>&1
fi