Hello.
I'm sorry if this has been asked before, I've been searching but couldn't find anything about this.
I have a basic mail server (Dovecot + Postfix + Spamassassin + etc...) which has 200+ domains and quite a lot of mailboxes. The server is old and we need to move everything to a new machine.
I would like to use Mailcow in the new server, the problem is that I don't know if the mailboxes DB is compatible.
I think that the mailbox password is stored in a custom md5 hash ${magic}${salt}${password} and I don't know if Mailcow still uses that method for storing them. Since I don't have all the passwords for the mailboxes, and I can't ask all the customers to change their passwords, does Mailcow still support that password hashing method?
Hi,
Can you provide a hash example for the string "admin"? I can try to integrate it. But SOGo still needs to be able to read it, too.
Hi @andryyy
I've been searching about this and I've found how Roundcube and PostfixAdmin implement this kind of hashing. These are the links to the files:
https://github.com/roundcube/roundcubemail/blob/master/plugins/password/helpers/dovecot_hmacmd5.php
https://github.com/postfixadmin/postfixadmin/blob/master/scripts/snippets/dovecot_crypt.php
I've also found information about it in the Dovecot documentation. They call it MD5-CRYPT: Dovecot PasswordSchemes
MD5-CRYPT: A weak but common scheme often used in /etc/shadow. The encrypted password will start with $1$
This is the hash for the string "admin11": $1$e06247ba$7mE2AMf5w5MYIj/Aw/.wS0
I had to use numbers because password policies, sorry.
Ah, that's good and something I can easily implement. :-) I will try to do so asap.
Thank you @andryyy, I really appreciate it ^^
Hi @andryyy thank you. When you will get this easy implement done.
I really need this to migrate our mailserver to mailcow
thx
Hi, sorry it took so long, will push a fix now.
You will need to prepend {MD5-CRYPT} to the hash! Like {MD5-CRYPT}$1$e06247ba$7mE2AMf5w5MYIj/Aw/.wS0
working! Thank you :D
Hello,
I'm trying to migrate from an older cPanel server to the new mailcow-dockerized - but can't make it to work.
I've done the following:
/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data//var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/example.com/usernamedocker-compose exec dovecot-mailcow doveadm quota recalc -AQuestion 1:
How do I actually associate password data from old server's /home/username/etc/shadow to migrated mailboxes?
Question 2:
Where do I get private and public*.pem keys which are required in the encrypt script ?
Thank you!
Most helpful comment
Ah, that's good and something I can easily implement. :-) I will try to do so asap.