Qmail relay setup
You want to relay mail through your qmail server. This will only work if you are coming from a specific IP address. This is not very useful if you are on the road, but it's good if you have a static IP address at home.
First, see what IP address is hitting your qmail SMTP server to relay mail. You should see your machine attempting to connect in this log:
tail -f /var/log/qmail/qmail-smtpd/current
For example, here I can see my iPhone attempting to send mail over Edge through IP 184.108.40.206:
@4000000047c622c427bbc2b4 tcpserver: ok 17315 mail.example.org:10.1.0.15:25 mobile- 021-071-228-230.mycingular.net:220.127.116.11::52546
Edit /etc/tcp.smtp. The first line should be the default which allows the local machine to send mail. The second line is the IP address of the machine you want to allow relaying through your qmail SMTP server. You can add additional lines for other acceptable hosts:
127.:allow,RELAYCLIENT="" 18.104.22.168:allow,RELAYCLIENT="" 66.18.10.:allow,RELAYCLIENT=""
Then rebuild your tcp.smtp.cdb databse:
tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
You don't have to restart qmail.