HostOnNet Blog

Plesk Server – qmail not sending mails

On a Plesk Virtual Dedicated Server, qmail is not sending out emails.
 
I try sending few emails from command prompt with “mail” command. Everything went well, but no mails reached destination. I checked status of qmail, it says stoped, i tried to start, but it won’t start.
 
# /etc/init.d/qmail status
qmail is stopped
# /etc/init.d/qmail start
Starting qmail:                                            [  OK  ]
# /etc/init.d/qmail status
qmail is stopped
#
 
I checked running qmail processes.
 
# ps aux|grep qmail
qmails    6819  0.0  0.0  1332  332 pts/0    S    02:50   0:00 qmail-send
qmaill    6882  0.0  0.0  1296  404 pts/0    S    02:50   0:00 splogger qmail
root      6912  0.0  0.0  1288  296 pts/0    S    02:50   0:00 qmail-lspawn ./Maildir/
qmailr    6948  0.0  0.0  1292  300 pts/0    S    02:50   0:00 qmail-rspawn
qmailq    6980  0.0  0.0  1280  288 pts/0    S    02:50   0:00 qmail-clean
root      9666  0.0  0.0  1412  484 pts/1    S    03:18   0:00 grep qmail
#
 
I checked qmail que, there was no emails in the que
 
# /var/qmail/bin/qmail-qstat
messages in queue: 0
messages in queue but not yet preprocessed: 0
#
 
I checked qmail log file
 
# tail /usr/local/psa/var/log/maillog
 
But there was no entry for sending email or any error.
 
On a search, i found Plesk 7.5.4. have some problem with qmail starting
 

I checked the Plesk version found it is same one
 
# cat /usr/local/psa/version
 
This was a bug with particular version of Plesk, in that files smtp_psa and smtps_psa get renamed to smtp.psa and smtps.psa, to fix it just rename the files and restarted xinetd.

 
cd /etc/xinetd.d
mv smtp.psa  smtp_psa
mv smtps.psa smtps_psa
/etc/rc.d/init.d/xinetd restart
 
Now the qmail start working.
 
I send a mail to my gmail account, i got it with out any problem, then send a mail to my email account @bizhat.com, it won’t go, on checking the server log i found
 
F=<root@SmartBusiness.prod.phx1.secureserver.net> rejected RCPT : Sender verify failed
2006-03-18 15:42:12 unexpected disconnection while reading SMTP command from (bizhat.com) [212.19.143.89]
 
 
The problem was the the hostname of qmail is invalid, so i changed the hostname of the server in
 
/var/qmail/control/me
 
and restarted qmail. Now everything start working.
 
 
 

Posted in Uncategorized. Bookmark the permalink.

  • Anonymous

    what did you change the hostname in /var/qmail/control/me too?

    mine says localhost.localdomain

    is that right??

    or should it be localhost.mydomain.com or something?

  • Anonymous

    Thank you for this post. I have a site on a virtual server and updated plesk and had the same problem. This fixed qmail right away. I also had to manualy stop the courier-imap services
    /etc/rc.d/init.d/courier-imap-new stop
    /etc/rc.d/init.d/courier-imap-tune stop
    and restart them from plesk to get imap/pop3 and horde logins to work.
    This was before I used your fix and haven’t restarted the server to see if it will come up om its own.

  • Anonymous

    Absolute superstar. Great plesk-qmail tip.