Mail attachments in mutt and sftp not working

May 11, 2016 1.3k views
Email Ubuntu

For a while now some attachments have not sent when sending with Mutt (postfix/dovecot). These aren't large attachments, typically under 1MB. Mutt works completely fine for the most part, particularly without attachments. Has done for over a year. Have sent hundreds of attachments previously with the same setup, so I wonder what changed?!

As a last resort, I usually send the same message with attachment from the Gmail account in mutt and that works. I can't do that this time, so it's time to find a fix.

  • I tried to adjust MTU to match home router (1492) - that didn't fix it. I then set PC, router and VPS to 1500. Still not fixed.

  • I then tried to upload the file via sftp to send as a link in the email (non-attachment emails work fine). It stalled, twice. I tried again later and after 30-60 minutes the file was uploaded by sftp.

  • I spoke to the ISP and they say there is no unusual upload activity on the network. Speed tests confirmed that.

What's going on? The logs don't say I'm being blocked by firewalls etc., only fail2ban is active iirc and that shows no catches.

The log says 'timeout after data' - the best of the online posts I found suggested MTU changes fixed that for them. Not the case for me.

Any help you can give vastly appreciated.

EDIT: there's nothing else in the logs apart from the 'timeout after DATA' line, nothing postfix specific either. Nothing in the mailqueue while it's sending. Sometimes I get an smtp 'write error' also. All non-attachment emails are sending fine. The same error occurs when I try to send a jpg - it's not the attachment itself - halting at around 140kb before timing out some 5 minutes later. It 'uploads' but then at the send stage it fails. So I find it in my 'Sent' folder, but it wasn't received (sending to other addresses to check).

  • Hi @walk,

    Could you tell us a little more about the file? Size? and, don't forget that MIME encoding increases the size of the file substantially before sending.

    Have you tried one of our speed tests from the same DC to your connection?

  • Hi @walk,

    Have you tried one of our speed tests to your connection to see what the output is? It sounds like it could be a connection, or path, issue (if both SSH, and SMTP are affected equally).

Be the first one to answer this question.