Articles‎ > ‎

Qmail troubleshooting

1. Qmail status

Status of Qmail installation can be checked using following command.

===============================

qmailctl stat

===============================

We could see following message if Qmail is up and running fine.
=======================================================================
# qmailctl stat
/service/qmail-send: up (pid 60301) 251 seconds
/service/qmail-send/log: up (pid 60305) 251 seconds
/service/qmail-smtpd: up (pid 60306) 251 seconds
/service/qmail-smtpd/log: up (pid 60307) 251 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0
========================================================================

If all four services are "up" for more than one second, everything is good.If that is not the case, there is some problem.

2. Checking qmail installation using Life With Qmail script

============================================

wget http://lifewithqmail.org/inst_check

chmod 755 inst_check

sh inst_check

=============================================

If Qmail is correctly installed, we could see following message.

================================================================
Congratulations, your LWQ installation looks good!
================================================================

3.Viewing Qmail runtime errors

Qmail uses a program called readproctitle to log error messages from services managed by svscan. Such errors can be viewed using following command.

====================================================================

ps -efl | grep "service errors" | grep -v grep
====================================================================

4. Running Qmail services manually

We can run qmail-smtpd/log service as given below.

=================================================================================

    cd /service/qmail-smtpd/log
svc -d .
./run
if no errors, enter a line of text and press ENTER
if still no errors, enter CTRL-D (end of file)
=================================================================================
Running Qmail service manully will help you to see & troubleshoot errors.
Comments