Saturday, December 10, 2011

smtp relay and spam?

If you are using an external email server to relay your emails,
makesure to add spf record to your dns:

#Create a TXT record containing this text:
v=spf1 -all
#above meants only allow email to be sent directly from

if you want to use google:
v=spf1 -all

for multiple mail server:
v=spf1 -all

-all = exclude all others..

How to setup qmail to forward emails to another smtp server?
sudo vi /var/qmail/control/smtproutes username password
#port, username and password are optional

if you want to set for specific domain: username password username password

Other useful commands for kloxo qmail:
List queue:
To test send email:
echo to: | /var/qmail/bin/qmail-inject

Kloxo logs -
tail /var/log/kloxo/smtp.log

To force qmail to send queue:
#grap id from qmail-send pid
ps -Af | grep qmail-send
kill -9 #id

sudo /etc/init.d/qmail restart

No comments: