Recently, I stopped get mail from cron and I'm seeing "Connection lost in middle of processing" messages in /var/log/mail. Mail sent from the command line works just fine. So there is some environmental difference in cron that can trip up ssmtp. Oddly, there are multiple threads on the forums discussing this and some possibilities are the messages may bigger than ssmtp's buffer or multiple messages may be getting sent at once and that confuses ssmtp. The threads are http://forums.gentoo.org/viewtopic-t-66882-highlight-ssmtp+connection+lost+processing.html http://forums.gentoo.org/viewtopic-t-68293-highlight-ssmtp+connection+lost+processing.html http://forums.gentoo.org/viewtopic-t-302341-highlight-ssmtp+connection+lost+processing.html http://forums.gentoo.org/viewtopic-t-412425-highlight-ssmtp+connection+lost+processing.html http://forums.gentoo.org/viewtopic-t-551034-highlight-ssmtp+connection+lost+processing.html http://forums.gentoo.org/viewtopic-t-510335-highlight-ssmtp+connection+lost+processing.html It's amazing this problem has gone on this long and I don't see any bug referenced. And the problem has just surfaced on my system with 2.61-r2. Anyway, if the bug can't be definitively fixed, Gentoo should consider masking or even removing ssmtp from portage.
please test with ssmtp-2.62 and report back if the problem still exists.
I'm using ssmtp 2.62 on amd64 but sending big mail (I'm sending attach of ~1 MB) sometimes crash with "Connection lost in middle of processing" so I think 2.62 don't solve this bug.
re-open then
Does anyone know how to resolve this? The same problem is on my recently installed AMD64 with all the latest packages. Cron jobs more often than not fail to send e-mail with the following message: sSMTP[445]: Connection lost in middle of processing
I made a quick-and-dirty patch for ssmtp 2.64 to make it use (it's configurable) a temporary file as buffer, so the connection doesn't get lost because it isn't initiated until the message is complete. If someone is interested I will upload it. Anyway, you can always use nullmailer, which uses a queue (it requires a service running).
Please try with version 2.64 and re-open if it's still a problem.