An interesting gotcha wasted me quite a bit of time and frustration last evening. After installing OTRS I went to configure the email delivery for tickets. I created a new virtual user, gave it a password and so it was all set. And it did not work when I tried to fetch the mail from OTRS. The message of OTRS itself did not help at all being very generic but the server reported this:
Feb 11 14:19:59 mail imapd-ssl: Connection, ip=[x.x.x.x] Feb 11 14:19:59 mail imapd-ssl: chdir example.com/otrs/: No such file or directory Feb 11 14:19:59 mail imapd-ssl: email@example.com: No such file or directory
It was hard to imagine a more cryptic message. I could not understand what could be wrong. And why would the server try to chdir into some strange directory. I flushed, changed passwords, tried all sorts of protocols, nothing helped. At a certain point I typed in a wrong password and the message changed to the very familiar “user login failed”. And then the realization hit me.
You just need the directory, you know. Maildir means there must be a directory for the IMAP server to look into. That’s what it tells me! IMAP says that it cannot find the directory where the messages should be. And sure enough, the Maildir directory is not there. Who would create it? Silly me.
And, of course, after the fact you remember it all: always send a welcome message to the new IMAP users so that the mailbox or Maildir is created for them… Hard to remember though when you don’t create new mail users so often.