1

Topic: How generate a password hash in php for iRedMail

I want to generate new passwords for all mailboxes (5000). But I dont know how the password are encrypted. Could you help me with some php  script to do this.
==== Required information ====
- iRedMail version: 0.8.1
- Store mail accounts in which backend (MySQL):
- Linux/BSD distribution name and version: Centos 6
- Related log if you're reporting an issue:
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: How generate a password hash in php for iRedMail

With MySQL backend, passwords are salted MD5 hashes.:)

References:
- http://www.lornajane.net/posts/2009/how … md5-in-php
- http://pbeblog.wordpress.com/2008/02/12 … sing-salt/

Also, you can use SSHA too, better than MD5.

3

Re: How generate a password hash in php for iRedMail

So where is salt stored (in what file)

ZhangHuangbin wrote:

With MySQL backend, passwords are salted MD5 hashes.:)

References:
- http://www.lornajane.net/posts/2009/how … md5-in-php
- http://pbeblog.wordpress.com/2008/02/12 … sing-salt/

Also, you can use SSHA too, better than MD5.

4

Re: How generate a password hash in php for iRedMail

Mail accounts are stored in two tables: vmail.mailbox, vmail.alias. Password is stored in `mailbox.password'.

Please check our script as reference:
https://bitbucket.org/zhb/iredmail/src/ … at=default