My Cyrus IMAP mail server is my very own 20-headed hydra.   It’s mostly well-behaved, but once in a while I have to jump back in the ring with the bitch and wrestle her back into submission. This is not fun, and if you can structure your life in such a way as to avoid it, I would highly recommend it.

The authentication started failing when I went to check my email.  Because I know what a monster the thing is, I put off fixing it for a couple weeks – I just didn’t have 5 hours for the dive back into the internals.  Eventually I really needed some email, so I jumped in.

  • rebuilt cyrus-imap and cyrus-sasl, no luck
  • suspected that sasl was to blame, saslpasswd2 (the tool to manage email account passwords) reported failure
  • played with every authentication setting of sasl, no luck
  • errors were minimal, I monitored logs and googled for the errors I got with no luck
  • FINALLY someone with a similar error was told to try strace, as follows:
    strace -o sasl-out.txt -f sasldblistusers2

    Awesome! It shows all kinds of system calls made by the executable, including reads and writes and logs. And that showed failure during a seek inside my sasldb file.  Holy occam’s razor, batman! Wiped the file and recreated it, and everything is all happy again.