Though I am not a qmail expert. I would like to share some commands that I know for qmail MTA.
To check mail queue:
/var/qmail/bin/qmail-qstat
To flush mail queue:
qmailctl doqueue
To check SMTP log(running):
tail -f /var/log/qmail/qmail-smtpd/current
@40000000587db4390923aefc tcpserver: pid 14016 from 122.144.8.44
@40000000587db4390937db0c tcpserver: ok 14016 smtp.abc.com:122.144.8.83:25 mail.xyz.com:12.44.08.44::29044
@40000000587db4391081076c tcpserver: end 14016 status 0
14016 is the process ID for a mail.
To check mail delivery log (running):
tail -f /var/log/qmail/qmail-send/current
@40000000587db5611218ba84 starting delivery 8216: msg 8657324 to remote shidfin@yahoo.com
@40000000587db5722cf0c0cc delivery 8216: success: 66.196.118.33_accepted_message./Remote_host_said:_250_ok_dirdel/
8216 is the process ID for delivery.
To set smtproute (relayhost):
vim /var/qmail/control/smtproutes
:mx.outgoingserver.com [for all outgoing mails]
domain1.com:mx1.outgoingserver.com [For specific domain]domain2.com:mx2.outgoingserver.com [For specific domain]
To restart qmail service:
qmailctl restart
To check mail queue:
/var/qmail/bin/qmail-qstat
To flush mail queue:
qmailctl doqueue
To check SMTP log(running):
tail -f /var/log/qmail/qmail-smtpd/current
@40000000587db4390923aefc tcpserver: pid 14016 from 122.144.8.44
@40000000587db4390937db0c tcpserver: ok 14016 smtp.abc.com:122.144.8.83:25 mail.xyz.com:12.44.08.44::29044
@40000000587db4391081076c tcpserver: end 14016 status 0
14016 is the process ID for a mail.
To check mail delivery log (running):
tail -f /var/log/qmail/qmail-send/current
@40000000587db5611218ba84 starting delivery 8216: msg 8657324 to remote shidfin@yahoo.com
@40000000587db5722cf0c0cc delivery 8216: success: 66.196.118.33_accepted_message./Remote_host_said:_250_ok_dirdel/
8216 is the process ID for delivery.
To set smtproute (relayhost):
vim /var/qmail/control/smtproutes
:mx.outgoingserver.com [for all outgoing mails]
domain1.com:mx1.outgoingserver.com [For specific domain]domain2.com:mx2.outgoingserver.com [For specific domain]
To restart qmail service:
qmailctl restart