Getting this part of qmail going is, well, going to be a little rough. We need to download the scripts for qmail-smtpd, qmail-smtpd-ssl and qmail-send. We will start with making all the needed directories and stuff like that so lets get to it!
# cd ~root/qmail
The only change we will need to make in the smtpd_run file is the IP address. Change this to the local address of the server (or just the listening IP). All authentication services are disabled. By the end of this walkthrough you will have 2 secure SSL and TLS services. All mail will be filtered using RBLs, greylistiing and qmail-scanner to help thwart spam.
You will need to edit smtpd_run and change the IP Address:
Now lets make the supervise directory and get everything copied over. The qmail.sh below has about 30 commands on copying the appropriate files into the correct folders. Please feel free to take a look at the qmail.sh file to see exactly what it's doing. It is copying all qmail-smtpd, qmail-smtpd-ssl and qmail-send run files for the service and log.
Now we want to setup selective relaying:
# mkdir /etc/tcp/
# cd /etc/tcp
# cp ~root/qmail/etc-tcp-makefile Makefile
Now we need to create the smtp file
At this point it should be ready to go. All you need to do is create the "smtp" file, containing the normal access control list. You may want to add the IP of the server you specified in the /var/qmail/supervise/qmail-smtpd/run file in the /etc/tcp/smtp file. Lets say the IP you used was 192.168.9.1. The line should look like this:
This is what a typical smtp file should look like:
# vi /etc/tcp/smtp
Add the following to /etc/tcp/smtp:
and you should get an output saying:
tcprules smtp.cdb smtp.tmp < smtp
chmod 644 smtp.cdb smtp
Now to continue on.