# Troubleshooting qmail [Solved]

## eXt

Hi, I emerged mail-mta/netqmail-1.05-r5 on my mailserver which was working correctly before upgrading. I ran into some problems which I managed to fix. It's working except with some mails that just disappears.

/var/log/qmail/qmail-smtpd/current contains lines like:

```

@40000000460abcf70e178564 tcpserver: status: 1/40

@40000000460abcf70e179cd4 tcpserver: pid 5555 from *.*.*.*

@40000000460abcf70fc1ed8c tcpserver: ok 5555 *.*.com:*.*.*.*:25 *.*.com:*.*.*.*::22955

@40000000460abcf7141dfc7c tcpserver: end 5555 status 256

@40000000460abcf7141e17d4 tcpserver: status: 0/40

```

But nothing is written to /var/log/qmail/qmail-send/current or /var/log/messages and the mail is not delivered to my inbox. About half of the mail does this. I have no idea how to troubleshoot this. Any idea?

Also, I am using qmail, spamassassin, clamav, qmail-scanner and vpopmail.Last edited by eXt on Tue Apr 03, 2007 1:04 pm; edited 1 time in total

----------

## Decibels

Well, not sure how much help I can be. I have qmail running fine for years, but only using it for internal cron mail. But what I do have is the Qmail Handbook.

It says that since your showing 'ok' and nonzero exit status that the most common cause of this is the server sending a message with 'bare linefeeds'.

Which is apparently '\n' and not using '\r\n'

Say if you use recordio in your /var/qmail/supervise/qmail-smtpd/run file you'll might be able to isolate the problem. But book is little different than the gentoo script.

So first try to use something like wireshark to see if you can catch anything first.

Or if you need to use recordio. Found an example like the book on the internet: http://www.webservertalk.com/message1071702.html

instead of writing it all down from the book. 

Hope this helps.

----------

## eXt

The problem seems to be with TLS sessions 

```

 4000000046101f8f05453094 22938 > (454 TLS connection failed: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher (#4.3.0)

```

Is there something wrong with openssl maybe? Or have I misconfigured the certificate?

----------

## Decibels

Not sure.

Try these: http://inoa.net/qmail-tls/debug.html

http://iain.cx/ssl/?qmailtls

http://gentoo-wiki.com/QmailRocksOnGentoo#Config_Show_SSL_Link

----------

## eXt

Running "openssl s_client -starttls smtp -crlf -connect localhost:25" as written at http://inoa.net/qmail-tls/debug.html helped me to solve it.

When running the above command it I got a more helpful error message so I could google a bit. It seems a qmail may need a list of ciphers in /var/qmail/control/tlsclientciphers and /var/qmail/control/tlsserverciphers which I didn't have.

By running these commands one may create those files:

```

# openssl ciphers > /var/qmail/control/tlsclientciphers

# openssl ciphers > /var/qmail/control/tlsserverciphers

```

Working perfectly now! Thanks!

----------

## Decibels

Glad you got it.   :Smile: 

----------

