I'm trying to get a hybrid exim/cyrus IMAP setup working. I do not use postfix, it is not installed. OS is Debian 9 both on x64 and Raspberry Pi (Raspbian Scratch).
I've executed the install:
apt-get install cyrus-common cyrus-doc cyrus-pop3d cyrus-imapd cyrus-admin cyrus-murder cyrus-replication cyrus-nntpd cyrus-caldav cyrus-clients cyrus-dev libcyrus-imap-perl sasl2-bin
and am following the instructions on page Cyrus Quickstart Guide.
I'm stuck at the point:
testsaslauthd -u imapuser -p secret
described in Section 4 of the article above, and instead of getting OK "Success", I got an error:
connect() : No such file or directory
That meant that I misread the /etc/default/saslauthd comment about startup. you MUST edit that to get the daemon to start properly. But now I get
0: NO "authentication failed"
but only on the x64 server. The Pi gives the OK message.
[Edit 05/10/2018 22:18 BST] I must admit that I had tried to install Kolab Installation of Kolab 16 on Debian 9 on the x64 earlier in the day, but had to back out when I discovered it needed postfix. It must be exim. I had to spend a couple of hours cleaning up the mess it left behind. The Raspberry Pi however did not suffer that fate.
Any ideas would be welcome.
Best Answer
The answer is that I had missed a step on the x64.
The Kolab uninstall removed my
file, of which I had to upload a fresh copy from the Raspberry Pi.
If you see something like this:
Note the -a pam, it should be -a sasldb. This is fixed by MECHANISMS="sasldb" in the /etc/default/saslauthd file. I read the instructions and did not follow them closely enough, after trying to repair the damage from the broken Kolab uninstall.
[Edit 07/10/2018 01:56] Additional information for when you get to the next stage:
I have updated the page at https://github.com/Exim/exim/wiki/AuthenticatedSmtpUsingSaslauthd to add the "realm" parameter
since looking at the source for exim in expand.c. This was only documented in the source code:
For virtual mailbox hosting with /etc/default/saslauthd:MECHANISMS="sasldb", with the LOGIN authenticator, and your login names are of the format username@example.com, you will need to extract the domain part and pass it in as the "realm" parameter as follows:
You can test with cyrus the username and password on the server shell with e.g.
It does not work with
I now have the problem that the mail is stuck in exim and lmtp is not working.
You should be able to get something like this if you use OpenSSL if you have got this far, to verify it:
And the big GOTCHA with OpenSSL, if you type a capital R, it goes into a renegotiate sequence, which is why in the example above "mail from:" and "rcpt to:" are in lower case.
[Edit 07/10/2018 15:42] The final part of getting this all working is here:
Getting Exim LMTP to Cyrus working
It works like a dream now.