qpsmtpd Wiki


You are here: start » config » submission


You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.


You don't have an account yet? Just get one: Register

Forgotten your password? Get a new one: Set new password


Here are a few pointers on how to run a separate instance of qpsmtpd on another port (for example, 587 (submission)) where authorised users can submit mail messages. One of the advantages is that you don't need to run TLS and AUTH on the normal SMTP port, and you can also be more aggressive against direct connections from dial-up IPs. Many ISPs also block outgoing traffic on port 25, so if you want to let roaming users use your mail servers (for SPF for example) you will probably need this.

You can also use stunnel, and forward the traffic to qpsmtpd from there. That is discussed in the smtps solution described elsewhere on this wiki.

My goal with this was to create as few duplicate files as possible; I wanted to use the same lib/ and plugins/ directories for example. This creates a bit of a problem as many things in qpsmtpd are hard-coded, but there is a way.

I created a new directory, submission/ in the qpsmtpd/ directory. In that submission/ directory, I created two subdirectories, submission/log and submission/config, and the following run file:

QMAILDUID=`id -u smtpd`
NOFILESGID=`id -g smtpd`
cd ..
exec /usr/local/bin/softlimit -m 50000000 \
  /usr/local/bin/tcpserver -c 10 -v -R -p \
  -u $QMAILDUID -g $NOFILESGID `head -1 config/IP` submission \
  ./qpsmtpd 2>&1

Note the environment_variable QPSMTPD_CONFIG and the cd .. to change the working directory. This is of course potentially dangerous it's the same working directory as the port-25 qpsmtpd uses – but that runs under tcpserver too (i.e. there may be several instances) so I expect it to be free of race conditions in this area.

I also created a file submission/log/run quite similar to the original qpsmtpd/log/run file, and I copied and adapted the configuration files from qpsmtpd/config. Finally. I did

ln -s /home/smtpd/qpsmtpd/submission/ /service/submission
svc -u /service/submission

Please send me feedback – or add to this page!

tyskjohan 2006/02/20 19:29