How to prevent saslauthd sucking up memory

For about a year I noticed that very infrequently my VPS would run out of memory.. at first I thought it was probably just a wordpress plugin, but after a while I discovered it was actually saslauthd. This is a known bug (not known very well though..) with saslauthd on Debian. Anyway, here’s the fix – I’m not totally sure of the implications, so if you run a busy mail server I’d recommend you look into it a bit more before doing it:

I changed this line:

Update the file: /etc/default/saslauthd

OPTIONS=”-c -m /var/run/saslauthd”


OPTIONS=”-c -m /var/spool/postfix/var/run/saslauthd -r”

I think this basically disables threading and enables forking of the process (or something like that) which is what was responsible for the memory leak.

So if you’re running out memory on your server, maybe give this a try 🙂

[Thanks to Djamu: ]

4 thoughts on “How to prevent saslauthd sucking up memory

  1. You’re wrong

    What makes saslauthd not opening threads are “-n 0” parameter

    So you have to change default

    OPTIONS=”-c -m /var/spool/postfix/var/run/saslauthd -r”


    OPTIONS=”-n0 -c -m /var/spool/postfix/var/run/saslauthd -r”

    As said in the howtoforge link you provide.

  2. Or, even better

    Don’t touch the “OPTIONS” line, and change:




    in the same file


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.