This tutorial is available in other languages. Help translate more

简体中文 /

Password hashes

Password hashes supported by iRedMail

iRedMail configures Postfix to use Dovecot as SASL authenticate server, so all password schemes supported by Dovecot can be used in Postfix. Please refer to Dovecot wiki page Password Schemes for more details.

Below password schemes are supported in iRedAdmin-Pro (which means you can add new mail user with either one):

  1. SSHA512. e.g. {SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJtuHWrx+wfqrs/lIH2Qxn2eA0jygXtBhMvRi7GNFmL++6aAZ0kXpcy1fxag=
  2. BCRYPT. e.g. {CRYPT}$2a$05$TKnXV39M3uJ4o.AbY1HbjeAval9bunHbxd0.6Qn782yKoBjTEBXTe
  3. SSHA. e.g. {SSHA}OuCrqL2yWwQIu8a9uvyOQ5V/ZKfL7LJD
  4. MD5 (salted). For example:

    Important note: SOGo groupware doesn't support MD5 without a prefix, so if you're going to migrate MD5 password hash from old mail server, please prepend {CRYPT} prefix in password hash.

  5. PLAIN-MD5 (without a salt). e.g. 0d2bf3c712402f428d48fed691850bfc

  6. Plain text. e.g. 123456

WARNING: MD5, PLAIN-MD5 and plain password are weak, please don't use them.


Default password schemes used in iRedMail

How to use different password hashes in iRedMail

For MySQL and PostgreSQL backends

All mail users are stored in SQL table vmail.mailbox, user password is stored in SQL column mailbox.password. For example (Note: you should replace xx@xx with your real email address):

sql> USE vmail;

sql> UPDATE mailbox SET password='$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250' WHERE username='xx@xx';
sql> UPDATE mailbox SET password='{SSHA}OuCrqL2yWwQIu8a9uvyOQ5V/ZKfL7LJD' WHERE username='xx@xx';
sql> UPDATE mailbox SET password='{SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJtuHWrx+wfqrs/lIH2Qxn2eA0jygXtBhMvRi7GNFmL++6aAZ0kXpcy1fxag=' WHERE username='xx@xx';
sql> USE vmail;
sql> UPDATE mailbox SET password='{PLAIN-MD5}0d2bf3c712402f428d48fed691850bfc' WHERE username='xx@xx';
sql> USE vmail;
sql> UPDATE mailbox SET password='{PLAIN}123456' WHERE username='xx@xx';

For OpenLDAP backend

User password is stored in attribute userPassword of user object.

userPassword: 123456
userPassword: {SSHA}OuCrqL2yWwQIu8a9uvyOQ5V/ZKfL7LJD
userPassword: {SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJtuHWrx+wfqrs...

IMPORTANT NOTE: If you want to input password hash with phpLDAPadmin, please choose clear in the password hash list, then input password hash.

See also