From c520ea0aeb3971def826f66cfaaacd6474875fa9 Mon Sep 17 00:00:00 2001 From: Zhang Huangbin Date: Wed, 17 Sep 2014 21:36:40 +0800 Subject: [PATCH] Move articles. --- {3-faq-howto => 3-faq}/_title.md | 0 .../why.append.timestamp.in.maildir.path.md | 0 .../use.or.migrate.password.hashes.md | 0 .../migrate.to.new.iredmail.server.html | 133 ++++++++++++++++++ .../use.or.migrate.password.hashes.html | 69 +++++++++ .../why.append.timestamp.in.maildir.path.html | 38 +++++ .../howto/use.or.migrate.password.hashes.html | 69 +++++++++ html/index.html | 4 +- html/index.md | 4 +- .../turn.on.debug.mode.in.dovecot.html | 23 +++ 10 files changed, 336 insertions(+), 4 deletions(-) rename {3-faq-howto => 3-faq}/_title.md (100%) rename {3-faq-howto => 3-faq}/why.append.timestamp.in.maildir.path.md (100%) rename {3-faq-howto => 4-howto}/use.or.migrate.password.hashes.md (100%) create mode 100644 html/backup-restore/migrate.to.new.iredmail.server.html create mode 100644 html/faq-howto/use.or.migrate.password.hashes.html create mode 100644 html/faq/why.append.timestamp.in.maildir.path.html create mode 100644 html/howto/use.or.migrate.password.hashes.html create mode 100644 html/troubleshooting/turn.on.debug.mode.in.dovecot.html diff --git a/3-faq-howto/_title.md b/3-faq/_title.md similarity index 100% rename from 3-faq-howto/_title.md rename to 3-faq/_title.md diff --git a/3-faq-howto/why.append.timestamp.in.maildir.path.md b/3-faq/why.append.timestamp.in.maildir.path.md similarity index 100% rename from 3-faq-howto/why.append.timestamp.in.maildir.path.md rename to 3-faq/why.append.timestamp.in.maildir.path.md diff --git a/3-faq-howto/use.or.migrate.password.hashes.md b/4-howto/use.or.migrate.password.hashes.md similarity index 100% rename from 3-faq-howto/use.or.migrate.password.hashes.md rename to 4-howto/use.or.migrate.password.hashes.md diff --git a/html/backup-restore/migrate.to.new.iredmail.server.html b/html/backup-restore/migrate.to.new.iredmail.server.html new file mode 100644 index 00000000..e79f6beb --- /dev/null +++ b/html/backup-restore/migrate.to.new.iredmail.server.html @@ -0,0 +1,133 @@ + + + + How to migrate old iRedMail server to the latest stable release + + + + +

How to migrate old iRedMail server to the latest stable release

+
+ +
+

WARNING: Please try it on a test server first. if it works well, then try it on product server.

+

Since new iRedMail server will install same components as old server, you can choose what data you want to migrate. Most important data are:

+ +

WARNING: Do not restore database mysql exported from old server, it contains SQL usernames/passwords for Roundcube/Amavisd/Policyd/Cluebringer used on old server. New iRedMail server has the same SQL usernames, but different passwords. So please do not restore it.

+

Client settings (Outlook, Thunderbird)

+

Since iRedMail-0.8.7, iRedMail enforces secure POP3/IMAP/SMTP connections. +Mail client programs must issue 'STARTTLS' command before authentication, +so please update your mail client programs you must change your mail client +programs (e.g. Outlook, Thunderbird) to use TLS connection.

+ +

Addition notes:

+ +

LDAP: migrate mail accounts

+

Steps to migrate LDAP mail accounts:

+ +

Normally, LDAP data can be exported into LDIF format. Here's backup/export script: http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Backup

+

Note: + There might be some changes in LDAP schema, please find scripts in below URL to apply all required changes: https://bitbucket.org/zhb/iredmail/src/default/extra/update/ + You can find all upgrade tutorials of iRedMail here: http://www.iredmail.org/doc.html#upgrade_tutorial

+

MySQL/PostgreSQL: Migrate mail accounts

+

All mail accounts are stored in database vmail by default, to migrate mail +accounts, you can simply export this database on old server, then import it +on new server.

+

IMPORTANT NOTE: iRedMail-0.8.7 drops several SQL columns, so before you +import backup SQL database, please add them first. It's safe to drop them +after you imported old database on new server.

+
mysql> USE vmail;
+
+mysql> ALTER TABLE mailbox ADD COLUMN bytes BIGINT(20) NOT NULL DEFAULT 0;
+mysql> ALTER TABLE mailbox ADD COLUMN messages BIGINT(20) NOT NULL DEFAULT 0;
+
+mysql> ALTER TABLE domain ADD COLUMN defaultlanguage VARCHAR(5) NOT NULL DEFAULT 'en_US';
+mysql> ALTER TABLE domain ADD COLUMN defaultuserquota BIGINT(20) NOT NULL DEFAULT '1024';
+mysql> ALTER TABLE domain ADD COLUMN defaultuseraliases TEXT;
+mysql> ALTER TABLE domain ADD COLUMN disableddomainprofiles VARCHAR(255) NOT NULL DEFAULT '';
+mysql> ALTER TABLE domain ADD COLUMN disableduserprofiles VARCHAR(255) NOT NULL DEFAULT '';
+mysql> ALTER TABLE domain ADD COLUMN defaultpasswordscheme VARCHAR(10) NOT NULL DEFAULT '';
+mysql> ALTER TABLE domain ADD COLUMN minpasswordlength INT(10) NOT NULL DEFAULT 0;
+mysql> ALTER TABLE domain ADD COLUMN maxpasswordlength INT(10) NOT NULL DEFAULT 0;
+
+mysql> ALTER TABLE alias ADD COLUMN islist TINYINT(1) NOT NULL DEFAULT 0;
+
+ +

After imported backup SQL databases, please execute below commands to mark +mail alias accounts and drop above newly created columns:

+
mysql> USE vmail;
+mysql> UPDATE alias SET islist=1 WHERE address NOT IN (SELECT username FROM mailbox);
+mysql> UPDATE alias SET islist=0 WHERE address=domain;    -- domain catch-all account
+
+-- Store values into new column: domain.settings and drop them
+mysql> UPDATE domain SET settings='';
+mysql> UPDATE domain SET settings=CONCAT(settings, IF(defaultlanguage IS NULL OR defaultlanguage='', '', CONCAT('default_language:', defaultlanguage, ';')));
+mysql> UPDATE domain SET settings=CONCAT(settings, IF(defaultuserquota IS NULL OR defaultuserquota=0, '', CONCAT('default_user_quota:', defaultuserquota, ';')));
+mysql> UPDATE domain SET settings=CONCAT(settings, IF(defaultuseraliases IS NULL OR defaultuseraliases='', '', CONCAT('default_groups:', defaultuseraliases, ';')));
+mysql> UPDATE domain SET settings=CONCAT(settings, IF(minpasswordlength IS NULL OR minpasswordlength=0, '', CONCAT('min_passwd_length:', minpasswordlength, ';')));
+mysql> UPDATE domain SET settings=CONCAT(settings, IF(maxpasswordlength IS NULL OR maxpasswordlength=0, '', CONCAT('max_passwd_length:', maxpasswordlength, ';')));
+mysql> UPDATE domain SET settings=CONCAT(settings, IF(disableddomainprofiles IS NULL OR disableddomainprofiles='', '', CONCAT('disabled_domain_profiles:', disableddomainprofiles, ';')));
+mysql> UPDATE domain SET settings=CONCAT(settings, IF(disableduserprofiles IS NULL OR disableduserprofiles='', '', CONCAT('disabled_user_profiles:', disableduserprofiles, ';')));
+
+mysql> ALTER TABLE domain DROP defaultlanguage;
+mysql> ALTER TABLE domain DROP defaultuserquota;
+mysql> ALTER TABLE domain DROP defaultuseraliases;
+mysql> ALTER TABLE domain DROP minpasswordlength;
+mysql> ALTER TABLE domain DROP maxpasswordlength;
+mysql> ALTER TABLE domain DROP disableddomainprofiles;
+mysql> ALTER TABLE domain DROP disableduserprofiles;
+
+ +

IMPORTANT NOTE: There might be some changes in SQL structure, please read +all upgrade tutorials for your current iRedMail release, then apply SQL +structure related changes. For example: +http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.4-0.8.0#Add_internal_service_required_by_Doveadm_2

+

Migrate mailboxes (Maildir format)

+ +

WARNING: please make sure maildir path stored in SQL/LDAP matches the mailbox +path on file system, so that mail clients can find imported emails.

+

Migrate Roundcube webmail data

+ \ No newline at end of file diff --git a/html/faq-howto/use.or.migrate.password.hashes.html b/html/faq-howto/use.or.migrate.password.hashes.html new file mode 100644 index 00000000..63c95300 --- /dev/null +++ b/html/faq-howto/use.or.migrate.password.hashes.html @@ -0,0 +1,69 @@ + + + + How to use or migrate password hashes + + + + +

How to use or migrate 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 iRedMail. 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):

+ +

NOTE: Dovecot claims it supports SSHA512, but I didn't get it work. +Please test it first if you choose SSHA512.

+

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:

+
+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> UPDATE mailbox SET password='{PLAIN-MD5}0d2bf3c712402f428d48fed691850bfc' WHERE username='xx@xx';
+
+ + +

For LDAP backends

+

User password is stored in attribute userPassword of user object.

+ +

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

\ No newline at end of file diff --git a/html/faq/why.append.timestamp.in.maildir.path.html b/html/faq/why.append.timestamp.in.maildir.path.html new file mode 100644 index 00000000..b0b03d35 --- /dev/null +++ b/html/faq/why.append.timestamp.in.maildir.path.html @@ -0,0 +1,38 @@ + + + + Why append timestamp in maildir path + + + + +

Why append timestamp in maildir path

+

iRedMail will append timestamp in maildir path by default, here's why.

+

Depends on the tools/scripts you used to create mail accounts, it's tunable +in scripts shipped within iRedMail and iRedAdmin (file settings.py, variable +MAILDIR_APPEND_TIMESTAMP = True or `False').

+

Deleting mail accounts with iRedAdmin will not remove the mailboxes on file +system, so that you can keep user's mailbox for some time.

+

Think about this situation:

+ +

iRedAdmin doesn't remove the mailboxes on file system, so Mike will see all +emails in Michael's mailbox if Michael didn't delete them. To avoid this, we +append a timestamp in maildir path to make sure all users will be assigned +a unique maildir paths.

\ No newline at end of file diff --git a/html/howto/use.or.migrate.password.hashes.html b/html/howto/use.or.migrate.password.hashes.html new file mode 100644 index 00000000..63c95300 --- /dev/null +++ b/html/howto/use.or.migrate.password.hashes.html @@ -0,0 +1,69 @@ + + + + How to use or migrate password hashes + + + + +

How to use or migrate 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 iRedMail. 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):

+ +

NOTE: Dovecot claims it supports SSHA512, but I didn't get it work. +Please test it first if you choose SSHA512.

+

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:

+
+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> UPDATE mailbox SET password='{PLAIN-MD5}0d2bf3c712402f428d48fed691850bfc' WHERE username='xx@xx';
+
+ + +

For LDAP backends

+

User password is stored in attribute userPassword of user object.

+ +

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

\ No newline at end of file diff --git a/html/index.html b/html/index.html index 5c2f6780..04d77d8a 100644 --- a/html/index.html +++ b/html/index.html @@ -8,8 +8,7 @@

Frequently Asked Questions

How to

Backup and Restore