How to configure dovecot with master users/password on OS X Server 10.6.8 ?

Hello,


I've tried to sync all our users emails from OS X 10.6.8 to OS X 10.9.2 via imapsync:


Since I don't know the users passwords I've tried to setup dovecot (the IMAP-server for both server versions) to run in Master/Users mode so that the master user can transfer all the users mail to the new IMAP server (OS X 10.6.8 runs a dovecot 1.x version):
http://wiki1.dovecot.org/Authentication/MasterUsers


However I've tried everything possible and it doesn't seem to work.

E.g. when logging in, I always get a "a NO Authentication failed." message although dovecot.conf is configured to have "PLAIN" login.

Here's a test:
telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK Dovecot ready.
a login user*master PASSWORD
a NO Authentication failed.
* BYE Disconnected for inactivity.
Connection closed by foreign host.


My guess is that dovecot on OS X Server 10.6.8 doesn't seem to be configured for "passdb shadow" or "userdb shadow" but only "passdb od" and "userdb od" (od = OpenDirectory ?)

 
Here's what I get when doing command dovecotd --build-options
[root@localhost /]>dovecotd --build-options
Build options: ioloop=kqueue notify=kqueue ipv6 openssl
Mail storages: maildir mbox dbox cydir raw
SQL drivers:
Passdb: checkpassword od pam passwd passwd-file
Userdb: od passwd passwd-file prefetch static


Was someone succesful to have a master password on OS X Server Snow Leopard ?


Any help is greatly appreciated.


Cheers,


Gilles

Posted on Feb 27, 2014 9:07 AM

Reply
3 replies

Nov 4, 2014 12:34 PM in response to gilcelli

Dovecot Masteruser setup on OSX Server v4 (under OSX 10.10, I don't have access to your version)

-------------------------------------------------------------


Change to the REFERENCE directory. All files are related to THIS directory!

cd /Library/Server/Mail/Config/dovecot/


in ./conf.d/10-auth.conf file operate following changes


from > #auth_master_user_separator =

to < auth_master_user_separator = *

and

from > #!include auth-master.conf.ext

to < !include auth-master.conf.ext


create a master-users password file in the reference directory using the command

---

htpasswd -b -c -s master-users <DOVECOT_ADMIN_USER_NAME> <DOVECOT_ADMIN_PASSWORD>

---


Btw. for reference, this file is refered from ./conf.d/auth-master.conf.ext

---

passdb {

driver = passwd-file

master = yes

args = /Library/Server/Mail/Config/dovecot/master-users


# Unless you're using PAM, you probably still want the destination user to

# be looked up from passdb that it really exists. pass=yes does that.

pass = yes

}

---

Check the created file, mine has the following format:

---

dovecotadmin:{SHA}_______PASSWORD__________=

---

Start your Server.app and go to the Mail

1. Stop the server

2. Check the authentication mechanism: whatever else you choose to use, the CLEARTEXT (aka PLAIN) MUST be enabled!

3. Start the server, and WAIT until is back and green ;-)


Test if works, with openssl:

---

openssl s_client -crlf -connect <DOVECOT_IMAP_SERVER_NAME_OR_IP_ADDRESS>:993

tag login <EXISTING_AND_WORKING_USER_NAME>*<DOVECOT_ADMIN_USER_NAME> <DOVECOT_ADMIN_PASSWORD>

.... Logged in

tag logout

---

Nov 4, 2014 12:38 PM in response to Community User

for reference the OSX Server v4 dovecot:

---

localhost# dovecotd --build-options

Build options: ioloop=kqueue notify=kqueue ipv6 openssl io_block_size=8192

Mail storages: shared mdbox sdbox maildir mbox cydir imapc pop3c raw fail

SQL drivers:

Passdb: checkpassword od pam passwd passwd-file

Userdb: checkpassword od passwd prefetch passwd-file

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to configure dovecot with master users/password on OS X Server 10.6.8 ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.