From 1dbb1504418b40d790ebcdceb92bab59dd8cf8c1 Mon Sep 17 00:00:00 2001 From: Zhang Huangbin Date: Thu, 18 Dec 2014 21:41:54 +0800 Subject: [PATCH] File names renamed. --- TODO.md | 1 + faq/file.locations.md | 2 +- howto/dovecot.master.user.md | 57 +++++++++++++++ ...ode.in.amavisd.html => debug.amavisd.html} | 0 ...luebringer.html => debug.cluebringer.html} | 0 ...ode.in.dovecot.html => debug.dovecot.html} | 0 ...ode.in.iredapd.html => debug.iredapd.html} | 0 ...e.in.openldap.html => debug.openldap.html} | 0 html/dovecot.master.user.html | 73 +++++++++++++++++++ html/file.locations.html | 2 +- html/index.html | 11 +-- index.md | 20 ----- ...ug.mode.in.amavisd.md => debug.amavisd.md} | 0 ...in.cluebringer.md => debug.cluebringer.md} | 0 ...ug.mode.in.dovecot.md => debug.dovecot.md} | 0 ...ug.mode.in.iredapd.md => debug.iredapd.md} | 0 ....mode.in.openldap.md => debug.openldap.md} | 0 17 files changed, 139 insertions(+), 27 deletions(-) create mode 100644 howto/dovecot.master.user.md rename html/{turn.on.debug.mode.in.amavisd.html => debug.amavisd.html} (100%) rename html/{turn.on.debug.mode.in.cluebringer.html => debug.cluebringer.html} (100%) rename html/{turn.on.debug.mode.in.dovecot.html => debug.dovecot.html} (100%) rename html/{turn.on.debug.mode.in.iredapd.html => debug.iredapd.html} (100%) rename html/{turn.on.debug.mode.in.openldap.html => debug.openldap.html} (100%) create mode 100644 html/dovecot.master.user.html delete mode 100644 index.md rename troubleshooting/{turn.on.debug.mode.in.amavisd.md => debug.amavisd.md} (100%) rename troubleshooting/{turn.on.debug.mode.in.cluebringer.md => debug.cluebringer.md} (100%) rename troubleshooting/{turn.on.debug.mode.in.dovecot.md => debug.dovecot.md} (100%) rename troubleshooting/{turn.on.debug.mode.in.iredapd.md => debug.iredapd.md} (100%) rename troubleshooting/{turn.on.debug.mode.in.openldap.md => debug.openldap.md} (100%) diff --git a/TODO.md b/TODO.md index 5e5c6202..0fcabb0c 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,6 @@ # TODO +* http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Dovecot.Master.User * which config files must be update if i want to change hostname * re-generate ssl cert/key diff --git a/faq/file.locations.md b/faq/file.locations.md index 82631039..1991c570 100644 --- a/faq/file.locations.md +++ b/faq/file.locations.md @@ -88,7 +88,7 @@ Addition config files: * `dovecot-pgsql.conf`: used to query mail users and passwords. PostgreSQL backend only. * `dovecot-used-quota.conf`: used to store and query real-time per-user mailbox quota. * `dovecot-share-folder.conf`: used to store settings of shared IMAP mailboxes. -* `dovecot-master-users-password`: used to store master users/passwords. +* `dovecot-master-users-password` or `dovecot-master-users`: used to store Dovecot master user accounts. ### Log files diff --git a/howto/dovecot.master.user.md b/howto/dovecot.master.user.md new file mode 100644 index 00000000..e7815ae9 --- /dev/null +++ b/howto/dovecot.master.user.md @@ -0,0 +1,57 @@ +# Dovecot Master User + +iRedMail-0.8.6 and later releases have Dovecot Master User enabled for all +backends (OpenLDAP, MySQL/MariaDB, PostgreSQL) by default, what you need to do +is adding new master user. + +iRedMail configures Dovecot to query master user accounts from config file +`/etc/dovecot/dovecot-master-users-password` (or `dovecot-master-users`) by +default, you can modify this file to add or remove master user. + +The format is simple: +``` +username:password +``` + +You can generate a password supported by Dovecot first. for example, SSHA512. +Let's generate password hash for our password `my_master_password`: +``` +# doveadm pw -s SSHA512 +Enter new password: my_master_password +Retype new password: my_master_password +{SSHA512}B0VHomJaMk6aLXOPglgNgJtCUA8JRnOweAwJxRW6NPWSNZ25rG/L6T05DJXH+t8WCQkemBilgkcEi6mq4Kadssivtts= +``` + +You can now pick up any username you like, for example, +`my_master_user@non-exist.com`. Now add new master user in file +`/etc/dovecot/dovecot-master-users-passwords` like below: + +``` +my_master_user@non-exist.com:{SSHA512}B0VHomJaMk6aLXOPglgNgJtCU... +``` + +WARNING: Make sure file `dovecot-master-users-password` is owned by Dovecot +daemon user and group, with file permission `0500`, so that others cannot view +the file content. + +> * on Linux/FreeBSD, Dovecot daemon user/group is `dovecot/dovecot`. +> * on OpenBSD, Dovecot daemon user/group is `_dovecot/_dovecot`. + +Then you can access user@domain.ltd's mailbox (via either IMAP or POP3 +protocol) as `user@domain.ltd*my_master_user@non-exist.com` with password +`my_master_password`. + + +Notes: + +* master user name must be in valid email address format. e.g. user@domain.com. + this email address doesn't need to exist. + +## Troubleshooting + +If it doesn't work for you, please enable debug mode in Dovecot and check +its log file. If you don't understand what the log says, please create a new +topic in our forum and paste related log: + +* [Debug Dovecot](./debug.dovecot.html) +* [iRedMail online support forum](http://www.iredmail.org/forum/) diff --git a/html/turn.on.debug.mode.in.amavisd.html b/html/debug.amavisd.html similarity index 100% rename from html/turn.on.debug.mode.in.amavisd.html rename to html/debug.amavisd.html diff --git a/html/turn.on.debug.mode.in.cluebringer.html b/html/debug.cluebringer.html similarity index 100% rename from html/turn.on.debug.mode.in.cluebringer.html rename to html/debug.cluebringer.html diff --git a/html/turn.on.debug.mode.in.dovecot.html b/html/debug.dovecot.html similarity index 100% rename from html/turn.on.debug.mode.in.dovecot.html rename to html/debug.dovecot.html diff --git a/html/turn.on.debug.mode.in.iredapd.html b/html/debug.iredapd.html similarity index 100% rename from html/turn.on.debug.mode.in.iredapd.html rename to html/debug.iredapd.html diff --git a/html/turn.on.debug.mode.in.openldap.html b/html/debug.openldap.html similarity index 100% rename from html/turn.on.debug.mode.in.openldap.html rename to html/debug.openldap.html diff --git a/html/dovecot.master.user.html b/html/dovecot.master.user.html new file mode 100644 index 00000000..a964863b --- /dev/null +++ b/html/dovecot.master.user.html @@ -0,0 +1,73 @@ + + + + Dovecot Master User + + + + +

Dovecot Master User

+

iRedMail-0.8.6 and later releases have Dovecot Master User enabled for all +backends (OpenLDAP, MySQL/MariaDB, PostgreSQL) by default, what you need to do +is adding new master user.

+

iRedMail configures Dovecot to query master user accounts from config file +/etc/dovecot/dovecot-master-users-password (or dovecot-master-users) by +default, you can modify this file to add or remove master user.

+

The format is simple:

+
username:password
+
+ +

You can generate a password supported by Dovecot first. for example, SSHA512. +Let's generate password hash for our password my_master_password:

+
# doveadm pw -s SSHA512
+Enter new password: my_master_password
+Retype new password: my_master_password
+{SSHA512}B0VHomJaMk6aLXOPglgNgJtCUA8JRnOweAwJxRW6NPWSNZ25rG/L6T05DJXH+t8WCQkemBilgkcEi6mq4Kadssivtts=
+
+ +

You can now pick up any username you like, for example, +my_master_user@non-exist.com. Now add new master user in file +/etc/dovecot/dovecot-master-users-passwords like below:

+
my_master_user@non-exist.com:{SSHA512}B0VHomJaMk6aLXOPglgNgJtCU...
+
+ +

WARNING: Make sure file dovecot-master-users-password is owned by Dovecot +daemon user and group, with file permission 0500, so that others cannot view +the file content.

+
+ +
+

Then you can access user@domain.ltd's mailbox (via either IMAP or POP3 +protocol) as user@domain.ltd*my_master_user@non-exist.com with password +my_master_password.

+

Notes:

+ +

Troubleshooting

+

If it doesn't work for you, please enable debug mode in Dovecot and check +its log file. If you don't understand what the log says, please create a new +topic in our forum and paste related log:

+

Document published under a CC BY-ND 3.0 license. If you found something wrong, please do contact us to fix it. + + + \ No newline at end of file diff --git a/html/file.locations.html b/html/file.locations.html index 90e5ba59..6b54db8a 100644 --- a/html/file.locations.html +++ b/html/file.locations.html @@ -130,7 +130,7 @@

  • dovecot-pgsql.conf: used to query mail users and passwords. PostgreSQL backend only.
  • dovecot-used-quota.conf: used to store and query real-time per-user mailbox quota.
  • dovecot-share-folder.conf: used to store settings of shared IMAP mailboxes.
  • -
  • dovecot-master-users-password: used to store master users/passwords.
  • +
  • dovecot-master-users-password or dovecot-master-users: used to store Dovecot master user accounts.
  • Log files

    Troubleshooting and Debug

    Frequently Asked Questions