Results 1 to 5 of 5

Thread: Migration mail account between exim server ?

  1. #1
    Join Date
    Apr 2008
    Posts
    288

    Migration mail account between exim server ?

    I need to migrate mail accounts between exim servers but I do not know user passwords. And do not want to change or disturb users.

    Old server (vestapanel) uses passwd file in format (MD5-CRYPT):

    {MD5}$1$s3jmZ3Rg$ja/jVRKSojRyNJmahoarI0

    And new server (directadmin) uses passwd file in format (SHA512-CRYPT):

    $6$MnPsMdkM$N1WcJJPMIvpkFK905rCO9IWnPcqf6NlFFEKlwsajByfpN9EI3Obg2OfRD839Wl5k7JCzb9rCX.5BKTFeiVtcI0

    So I think (please advise if any easy and better way), if I can manage to update old server passwd file to SHA512-CRYPT then I can copy and paste password hashes to new server after I created with a random password. I tested copy and paste hash in passwd file is fine.

    But how can I update pass hash to SHA512-CRYPT ? On dovecot page https://wiki2.dovecot.org/HowTo/ConvertPasswordSchemes it shows and example for mysql context but I need to update passwd file.

    Can you please guide me?

  2. #2
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    13,479
    Hello,

    The password hashes are one-way encrypted and you can not decrypt them. So no conversion is possible.
    I've just checked one of the servers and I see many of them are md5 hashes:

    Code:
    cat /etc/virtual/*/passwd
    and they work all fine.
    Regards, Alex G.

    - Get the best commercial DirectAdmin support and hire me on poralix.com
    - Follow and like @Poralix on Facebook

  3. #3
    Join Date
    Apr 2008
    Posts
    288
    Problem is this, when I copy md5 hash to sha512 type (from old server to DA- md5 to sha512), I can only login with imap. Pop clients can not use passwords. If I re-set same password in DA, they can login too. So I ended up with converting hashes https://wiki2.dovecot.org/HowTo/ConvertPasswordSchemes
    But can I tell exim to use md5 hash along with SHA512 ? So then maybe pop client can auth. too.
    Or I would be happy if you can tell me any other way to move users between these servers with out changing and knowing userpasses.

  4. #4
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    13,479
    What do you mean under copy md5 hash to sha512 type? How do you do that?

    I have on my own server both type password hashes under
    /etc/virtual/*/passwd:


    Code:
    support:$1$SVsX4htD$SHgF4R/Csg7v........
    sendout:$6$66jdBvTG$Q4.OplHLo0G4........

    and I don't have any issue with them.

    I believe you are trying to solve a wrong issue.... which is not a root cause of your real issue....
    Regards, Alex G.

    - Get the best commercial DirectAdmin support and hire me on poralix.com
    - Follow and like @Poralix on Facebook

  5. #5
    Join Date
    Apr 2008
    Posts
    288
    Thank you for the sample. In old server, $1$ pass has a {MD5} prefix which was probably causig smtp not working. After I remove it. Now it works fine. I meant that I was copying that string between passwd files.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •