I had an interesting problem with Dove tonight. It started as an error when I opened Thunderbird informing me that the connection to a seldom-used mail account had been interrupted. I’d actually noticed the error a while ago and had made a mental note to fix it, but never got around to it. I almost never use the address in question.
While trying to diagnose the problem in TBird tonight, I noticed that it was attempting to use a certificate belonging to another domain on the server. So I assigned the problem mail domain its own cert, but that didn’t solve the problem.
I decided to restart Dovecot, and it spit out an error about a missing “}” at a certain line of
/etc/dovecot/dovecot.conf. But what actually happened was that several lines of configuration from the other domain whose cert the problem domain was trying to use had been copied into the problem domain’s configuration, but without the “}”.
I don’t think it had anything to do with SNI because the mismatch occurred before I made that change. But it’s possible because I’d already enabled SNI for the domain whose certificate it was trying to use. So maybe.
In any case, I fixed that problem and checked the rest of
/etc/dovecot/dovecot.conf, and found that there were several other instances of copying; but they didn’t trigger errors because the lines had been copied correctly. Apparently Dove is tolerant of superfluous lines of configuration as long as they’re syntactically correct.
Any problems with Dovecot always raise my eyebrow because in my experience, Dove is one of the better-behaved members of the team. I almost never have problems with Dovecot. So I tidied things up, restarted Dove, tested it, verified that it was working correctly, and backed up the working
/etc/dovecot/dovecot.conf for a quick fix should it happen again.
I really don’t know why it happened other than I probably caused it somehow. I’ll monitor it for a while to see if it recurs.