Scroll to content

Fixing SMTP timeout issues

I’ve recently been having a problem with my mailserver. I could receive mail fine, but trying to send would frequently time out, whether it was me sending email manually from my mail client or services on the same box as postfix.

The fact that the problem was limited to SMTP led me to suspect that saslauthd might be the culprit. A quick squint at man saslauthd later and I spotted an interesting flag:

-n threads

    Use threads processes for responding to authentication queries. (default: 5) A value of zero will indicate that saslauthd should fork an individual process for each connection. This can solve leaks that occur in some deployments.

I figured it could be worth a shot, so I opened up /etc/default/saslauthd and zeroed the offending flag:

THREADS=0

A quick restart of the daemon later and no more timeouts, so it looks very much like this server is a member of “some deployments”. Given that this is a low tenancy server with only a handful of active mailboxes I don’t see the workaround causing any issues.

“Run your own mailserver”, they said. “It’ll be fun”, they said.

This entry was posted in Homelab and tagged , . Bookmark the permalink.

1 Responses to Fixing SMTP timeout issues

  1. @raymo Aye, it’s a bit nonspecific. I’d dig into it more, but I was more interested in getting it back up and running than a post mortem so I’d have to set up a whole test VM and try to replicate the problem, and I’m lazy so that’s a non starter.

Reposts

Likes

Leave a Reply

Your email address will not be published. Required fields are marked *

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)