Now, let's set up SASL. This will allow you to connect to your local IMAP server and login, just like any IMAP user would before checking for new emails.
saslauth group and add the
cyrus user to the group, so Cyrus can access SASL. (on Debian, this group is called 'sasl': adjust the following commands to suit.)
groupadd -fr saslauth usermod -aG saslauth cyrus
STARToption is set to yes
MECHANISMSoption to sasldb
Start the SASL auth daemon:
Now, we'll create the IMAP user inside SASL. This is the user you'll use to login to the IMAP server later on.
echo 'secret' | saslpasswd2 -p -c imapuser
You can replace
secret with a more suitable password you want and
imapuser with the username you want. Once this is done, check that the user exists and is set up correctly:
testsaslauthd -u imapuser -p secret
You should get an
0: OK "Success." message.