- Error: ldap-bind fails, ldap-lookup fails
- POP3 fails in qmail-ldap, I suspect ldap-lookup failure
- No response on SMTP port
- Something is wrong with qmail-smtpd. Cannot receive/send mail.
Throughout this document I am assuming that you have installed qmail in /var/qmail directory. If your location is different than this one replace /var/qmail with your installation prefix.
Error: ldap-bind fails, ldap-lookup fails
If you get any error related to LDAP, such ldap-bind, ldap-lookup try this first to confirm that qmail-ldap is able to bind with ldap server. If qmail-ldap can't bind, you will see the reason on running following command.
# /var/qmail/bin/qmail-ldaplookup -d 255 -u youruidqmail-ldap POP3 fails, I suspect ldap-lookup failure
In qmail-ldap, qmail-pop3d (located in /var/qmail/boot/qmail-pop3d/) ldap-lookup is done on mail address so you have to do qmail-ldaplookup on email which can be done as follows.
# /var/qmail/bin/qmail-ldaplookup -d 255 -m youruid@yourdomain.tldNo response on SMTP port.
See if you are able to connect to SMTP port using raw telnet connection as follows.
$ telnet yourdomain.tld 25Trying 10.100.1.1...
Connected to yourdomain.tld (10.100.10.10).
Escape character is '^]'.
Connection closed by foreign host.
If you get the output as above, Check your log file for smtpd as shown below. Check your /var/qmail/control/qmail-smtpd.rules is defined and contain proper rules. Check you have file /var/qmail/control/qmail-smtpd.cdb updated.
# tail /var/qmail/log/qmail-smtpd/current@4000000042a53dec1971f444 tcpserver: status: 1/50
@4000000042a53dec197203e4 tcpserver: pid 26706 from 11.11.111.100
@4000000042a53dec19720f9c tcpserver: warning: dropping connection, unable to read /var/qmail/control/qmail-smtpd.cdb: file does not exist
@4000000042a53dec19721f3c tcpserver: end 26706 status 28416
@4000000042a53dec19722af4 tcpserver: status: 0/50
@4000000042a53e023705f5dc tcpserver: status: 1/50
@4000000042a53e023706057c tcpserver: pid 26765 from 11.11.111.100
@4000000042a53e1217ccd794 tcpserver: warning: dropping connection, unable to read /var/qmail/control/qmail-smtpd.cdb: file does not exist
@4000000042a53e1217cdb63c tcpserver: end 26765 status 28416
@4000000042a53e1217cdc5dc tcpserver: status: 0/50
You need to create qmail-smtpd.rules if it does not exist, if it does edit it and follow the instructions here Starting qmail-smtpd section
Something is wrong with qmail-smtpd. Cannot receive/send mail.
If for some reason you cannot get any mail through, you need to first zero in on the problem that is prohibiting you from sending/receiving mail. For this it is you would first look at the logs of qmail-smtpd which normally are on location /var/qmail/log/qmail-smtpd/current. If you find that the information in logs is not enough to debug the problem you would want to run qmail-smtpd with increased loglevel to have more verbose messages in logs. For this you will have to increase the LOGLEVEL which can be set in environment (tcpserver?) for qmail-smtpd. To do this in terminal you will have to stop qmail-smtpd. If you are running it using svc, you would issue following command.
# svc -d /service/qmail-smtpdAbove we assume that you have /var/qmail/boot/qmail-smtpd/run symlinked in /service with name qmail-smtpd and that it was started
Then you would start qmail-smtpd with increased LOGLEVEL in a terminal (in screen maybe). You can do it as follows.
# cd /var/qmail/boot/qmail-smtpd# env LOGLEVEL=255 ./run
Then you would try to connect using telnet on port 25 as shown below.
$ telnet yourdomain.tld 25Trying 10.11.111.22...
Connected to yourdomain.tld (10.11.111.22).
Escape character is '^]'.
220 yourdomain.tld ESMTP
ehlo
250-yourdomain.tld
250-PIPELINING
250-DATAZ
250-STARTTLS
250-AUTH LOGIN PLAIN
250 8BITMIME
quit
221 yorudomain.tld Goodbye.
Connection closed by foreign host.
During this connection you would see all the messages scrolling up in terminal/screen where you runnning qmail-smtpd/run. You can see there what exactly is wrong with your setup.