From abfd7605d551f6a2280118092be190100cdfc3e8 Mon Sep 17 00:00:00 2001 From: Zhang Huangbin Date: Wed, 19 Aug 2015 21:11:02 +0800 Subject: [PATCH] ??????? --- en_US/howto/2-no.x-spam.headers.md | 16 ++- ...er.to.send.email.without.authentication.md | 12 +- en_US/howto/change.server.hostname.md | 1 - en_US/howto/mailbox.sharing.md | 12 +- en_US/howto/reset.user.password.md | 17 +-- en_US/migrations/password.hashes.md | 28 +++-- ....to.send.email.without.authentication.html | 14 ++- html/index.html | 4 +- html/mailbox.sharing.html | 10 +- html/no.x-spam.headers.html | 11 +- html/password.hashes.html | 28 +++-- html/reset.user.password.html | 16 +-- ...low.member.to.send.email.as.mail.list.html | 35 ++++++ ....to.send.email.without.authentication.html | 40 ++++++ html/zh_CN/change.server.hostname.html | 60 +++++++++ html/zh_CN/index.html | 12 +- html/zh_CN/mailbox.sharing.html | 116 ++++++++++++++++++ html/zh_CN/no.x-spam.headers.html | 39 ++++++ html/zh_CN/password.hashes.html | 113 +++++++++++++++++ html/zh_CN/reset.user.password.html | 55 +++++++++ zh_CN/howto/2-no.x-spam.headers.md | 20 ++- ...allow.member.to.send.email.as.mail.list.md | 14 +-- ...er.to.send.email.without.authentication.md | 13 +- zh_CN/howto/change.server.hostname.md | 5 +- zh_CN/howto/mailbox.sharing.md | 51 ++++---- zh_CN/howto/reset.user.password.md | 35 +++--- zh_CN/migrations/password.hashes.md | 74 ++++++----- 27 files changed, 669 insertions(+), 182 deletions(-) create mode 100644 html/zh_CN/allow.member.to.send.email.as.mail.list.html create mode 100644 html/zh_CN/allow.user.to.send.email.without.authentication.html create mode 100644 html/zh_CN/change.server.hostname.html create mode 100644 html/zh_CN/mailbox.sharing.html create mode 100644 html/zh_CN/no.x-spam.headers.html create mode 100644 html/zh_CN/password.hashes.html create mode 100644 html/zh_CN/reset.user.password.html diff --git a/en_US/howto/2-no.x-spam.headers.md b/en_US/howto/2-no.x-spam.headers.md index 32721eb6..6abc953f 100644 --- a/en_US/howto/2-no.x-spam.headers.md +++ b/en_US/howto/2-no.x-spam.headers.md @@ -1,12 +1,20 @@ -# Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted. +# Amavisd + SpamAssassin not working? no mail header (X-Spam-*) inserted Amavisd has below setting in its config file `/etc/amavisd/amavisd.conf` by default: - $sa_tag_level_deflt = 2.0; +``` +$sa_tag_level_deflt = 2.0; +``` -That means Amavisd will insert `X-Spam-Flag` and other `X-Spam-*` headers when email score >= 2.0. If you want to let Amavisd always insert these headers, you can set it to a low score, for example: +That means Amavisd will insert `X-Spam-Flag` and other `X-Spam-*` headers when +email score >= 2.0. If you want Amavisd always insert these headers, please +set it to a low score, for example: - $sa_tag_level_deflt = -999; +``` +$sa_tag_level_deflt = -999; +``` + +Restarting Amavisd service is required after changed setting. Amavisd's main config file is different on different Linux/BSD distributions: diff --git a/en_US/howto/allow.user.to.send.email.without.authentication.md b/en_US/howto/allow.user.to.send.email.without.authentication.md index bf7bed32..543b3ba6 100644 --- a/en_US/howto/allow.user.to.send.email.without.authentication.md +++ b/en_US/howto/allow.user.to.send.email.without.authentication.md @@ -1,18 +1,20 @@ -# Allow user to send email without authentication +# Allow user to send email without smtp authentication -Create a plain text file: `/etc/postfix/accepted_unauth_senders`: +Create a plain text file: `/etc/postfix/accepted_unauth_senders`, list all +users' email addresses which are allowed to send email without smtp +authentication. We use user email address `user@example.com` for example: ``` -fax-machine-12@mydomain.tld OK +user@example.com OK ``` -Use postmap to create hash db file: +Create hash db file with `postmap` command: ``` # postmap hash:/etc/postfix/accepted_unauth_senders ``` -Modify Postfix to use this text file: `/etc/postfix/main.cf` +Modify Postfix config file `/etc/postfix/main.cf` to use this text file: ``` smtpd_sender_restrictions = diff --git a/en_US/howto/change.server.hostname.md b/en_US/howto/change.server.hostname.md index 7343c117..ce9241fa 100644 --- a/en_US/howto/change.server.hostname.md +++ b/en_US/howto/change.server.hostname.md @@ -36,4 +36,3 @@ files to replace old hostname by the new one: * `/etc/httpd/conf.d/SOGo.conf` * `/etc/apache2/conf.d/SOGo.conf` * `/etc/apache2/conf-available/SOGo.conf` - diff --git a/en_US/howto/mailbox.sharing.md b/en_US/howto/mailbox.sharing.md index 532c4939..74167d97 100644 --- a/en_US/howto/mailbox.sharing.md +++ b/en_US/howto/mailbox.sharing.md @@ -1,12 +1,12 @@ # Mailbox sharing (Sharing IMAP folder with other users) -> Since iRedMail-`0.7.0`, mailbox sharing related settings are configured in -> Dovecot but not enabled, what you need to do is enabling "acl" plugin as -> mentioned below. - > Since iRedMail-`0.9.0`, mailbox sharing are enabled by default, you don't need > to modify any config file. +> Since iRedMail-`0.7.0`, mailbox sharing related settings are configured in +> Dovecot but not enabled, what you need to do is enabling `acl` plugin as +> mentioned below. + > Do not mistake "shared folders" for "public folders". For shared folders, > users must select which folder they want to share and with who, using an > interface, like IMAP command line or the ones available with Roundcube @@ -45,9 +45,9 @@ Restarting Dovecot service is required. ## Test shared folder -Example: share from@domain.ltd's `Sent` folder to user `testing@domain.ltd`. +Example: share `from@domain.ltd`'s `Sent` folder to user `testing@domain.ltd`. -> WARNING: Do not forget the dot before IMAP command. +> Attention: Do not forget the dot before IMAP command. ``` # telnet localhost 143 # <- Type this. diff --git a/en_US/howto/reset.user.password.md b/en_US/howto/reset.user.password.md index 65d4e7d6..89ab87df 100644 --- a/en_US/howto/reset.user.password.md +++ b/en_US/howto/reset.user.password.md @@ -7,29 +7,18 @@ With MySQL or PostgreSQL backends, you can generate a password hash with `openssl` or `doveadm` command first, then replace old one with this newly generated one. -For example: - -* Generate a salted MD5 password hash with `openssl` (plain password is `123456` -in this case): - -``` -$ openssl passwd -1 123456 -$1$2dQ48hyz$.mCLeDSdPkP3fxVmARsB.0 -``` - -Or, generate password hash with `doveadm`: +For example: generate a SSHA512 password hash with `doveadm`: ``` $ doveadm pw -s 'ssha512' -p '123456' {SSHA512}jOcGSlKEz95VeuLGecbL0MwJKy0yWY9foj6UlUVfZ2O2SNkEExU3n42YJLXDbLnu3ghnIRBkwDMsM31q7OI0jY5B/5E= ``` -* Reset password for user `user@domain.ltd` and `another-user@domain.ltd`: +* Reset password for user `user@domain.ltd`: ``` sql> USE vmail; -sql> UPDATE mailbox SET password='$1$2dQ48hyz$.mCLeDSdPkP3fxVmARsB.0' WHERE username='user@domain.ltd'; -sql> UPDATE mailbox SET password='{SSHA512}jOcGSlKEz95VeuLGecbL0MwJKy0yWY...' WHERE username='another-user@domain.ltd'; +sql> UPDATE mailbox SET password='{SSHA512}jOcGSlKEz95VeuLGecbL0MwJKy0yWY9foj6UlUVfZ2O2SNkEExU3n42YJLXDbLnu3ghnIRBkwDMsM31q7OI0jY5B/5E=' WHERE username='user@domain.ltd'; ``` With OpenLDAP backend, you can reset it with phpLDAPadmin or other LDAP client diff --git a/en_US/migrations/password.hashes.md b/en_US/migrations/password.hashes.md index f11a7f75..398a2bc5 100644 --- a/en_US/migrations/password.hashes.md +++ b/en_US/migrations/password.hashes.md @@ -3,38 +3,41 @@ ## 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 +password schemes supported by Dovecot can be used in Postfix. Please refer to Dovecot wiki page -[`Password Schemes`](http://wiki2.dovecot.org/Authentication/PasswordSchemes) for more details. +[`Password Schemes`](http://wiki2.dovecot.org/Authentication/PasswordSchemes) +for more details. Below password schemes are supported in iRedAdmin-Pro (which means you can add new mail user with either one): -* Plain text. e.g. `123456` -* MD5 (salted). For example: +1. SSHA512. e.g. `{SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJtuHWrx+wfqrs/lIH2Qxn2eA0jygXtBhMvRi7GNFmL++6aAZ0kXpcy1fxag=` +1. BCRYPT. e.g. `{CRYPT}$2a$05$TKnXV39M3uJ4o.AbY1HbjeAval9bunHbxd0.6Qn782yKoBjTEBXTe` +1. SSHA. e.g. `{SSHA}OuCrqL2yWwQIu8a9uvyOQ5V/ZKfL7LJD` +1. MD5 (salted). For example: - * (RECOMMENDED) with a prefix: `{CRYPT}$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250` + * with a prefix: `{CRYPT}$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250` * without a prefix: `$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250` __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. -* PLAIN-MD5 (unsalted MD5). e.g. `0d2bf3c712402f428d48fed691850bfc` -* SSHA. e.g. `{SSHA}OuCrqL2yWwQIu8a9uvyOQ5V/ZKfL7LJD` -* SSHA512. e.g. `{SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJtuHWrx+wfqrs/lIH2Qxn2eA0jygXtBhMvRi7GNFmL++6aAZ0kXpcy1fxag=` -* BCRYPT. e.g. `{CRYPT}$2a$05$TKnXV39M3uJ4o.AbY1HbjeAval9bunHbxd0.6Qn782yKoBjTEBXTe` +1. PLAIN-MD5 (without a salt). e.g. `0d2bf3c712402f428d48fed691850bfc` +1. Plain text. e.g. `123456` + +__WARNING__: MD5, PLAIN-MD5 and plain password are weak, please don't use them. __NOTES__: -* `BCRYPT` is only available on BSD systems, because libc shipped in Linux +* `BCRYPT` is only available on BSD systems, because `libc` shipped in Linux doesn't support bcrypt. ## Default password schemes used in iRedMail * For MySQL and PostgreSQL backends: - * in iRedMail-0.8.7 and earlier versions: `MD5` * in iRedMail-0.9.0 and later versions: `SSHA512` + * in iRedMail-0.8.7 and earlier versions: `salted MD5` * For LDAP backend: `SSHA`. @@ -53,6 +56,7 @@ __NOTES__: 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'; @@ -71,7 +75,7 @@ sql> UPDATE mailbox SET password='{PLAIN-MD5}0d2bf3c712402f428d48fed691850bfc' W sql> UPDATE mailbox SET password='{PLAIN}123456' WHERE username='xx@xx'; ``` -### For LDAP backends +### For OpenLDAP backend User password is stored in attribute `userPassword` of user object. diff --git a/html/allow.user.to.send.email.without.authentication.html b/html/allow.user.to.send.email.without.authentication.html index 3982193e..f41138c6 100644 --- a/html/allow.user.to.send.email.without.authentication.html +++ b/html/allow.user.to.send.email.without.authentication.html @@ -1,7 +1,7 @@ - Allow user to send email without authentication + Allow user to send email without smtp authentication @@ -10,16 +10,18 @@ iRedMail web site // Document Index -

Allow user to send email without authentication

-

Create a plain text file: /etc/postfix/accepted_unauth_senders:

-
fax-machine-12@mydomain.tld OK
+    

Allow user to send email without smtp authentication

+

Create a plain text file: /etc/postfix/accepted_unauth_senders, list all +users' email addresses which are allowed to send email without smtp +authentication. We use user email address user@example.com for example:

+
user@example.com OK
 
-

Use postmap to create hash db file:

+

Create hash db file with postmap command:

# postmap hash:/etc/postfix/accepted_unauth_senders
 
-

Modify Postfix to use this text file: /etc/postfix/main.cf

+

Modify Postfix config file /etc/postfix/main.cf to use this text file:

smtpd_sender_restrictions = 
     check_sender_access hash:/etc/postfix/accepted_unauth_senders,
     [...OTHER RESTRICTIONS HERE...]
diff --git a/html/index.html b/html/index.html
index 16a1a84b..a515b720 100644
--- a/html/index.html
+++ b/html/index.html
@@ -74,13 +74,13 @@ repository.

  • Completely disable Amavisd + ClamAV + SpamAssassin
  • Enable SMTPS service (SMTP over SSL, port 465)
  • Disable spam virus scanning for outgoing mails
  • -
  • Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.
  • +
  • Amavisd + SpamAssassin not working? no mail header (X-Spam-*) inserted
  • Quarantine clean emails sent from/to certain local user
  • Quarantining
  • Sign DKIM signature on outgoing emails for new mail domain
  • Allow insecure POP3/IMAP/SMTP connections without STARTTLS
  • Allow member to send email as mailing list or mail alias
  • -
  • Allow user to send email without authentication
  • +
  • Allow user to send email without smtp authentication
  • Amavisd: Enable per-recipient policy lookup
  • Change server hostname
  • Process more emails concurrently
  • diff --git a/html/mailbox.sharing.html b/html/mailbox.sharing.html index 32972644..f42de4c6 100644 --- a/html/mailbox.sharing.html +++ b/html/mailbox.sharing.html @@ -12,11 +12,11 @@ // Document Index

    Mailbox sharing (Sharing IMAP folder with other users)

    -

    Since iRedMail-0.7.0, mailbox sharing related settings are configured in -Dovecot but not enabled, what you need to do is enabling "acl" plugin as -mentioned below.

    Since iRedMail-0.9.0, mailbox sharing are enabled by default, you don't need to modify any config file.

    +

    Since iRedMail-0.7.0, mailbox sharing related settings are configured in +Dovecot but not enabled, what you need to do is enabling acl plugin as +mentioned below.

    Do not mistake "shared folders" for "public folders". For shared folders, users must select which folder they want to share and with who, using an interface, like IMAP command line or the ones available with Roundcube @@ -53,9 +53,9 @@ protocol imap {

    Restarting Dovecot service is required.

    Test shared folder

    -

    Example: share from@domain.ltd's Sent folder to user testing@domain.ltd.

    +

    Example: share from@domain.ltd's Sent folder to user testing@domain.ltd.

    -

    WARNING: Do not forget the dot before IMAP command.

    +

    Attention: Do not forget the dot before IMAP command.

    # telnet localhost 143                # <- Type this.
     * OK [...] Dovecot ready.
    diff --git a/html/no.x-spam.headers.html b/html/no.x-spam.headers.html
    index b29e9278..f7a56c6d 100644
    --- a/html/no.x-spam.headers.html
    +++ b/html/no.x-spam.headers.html
    @@ -1,7 +1,7 @@
     
         
             
    -        Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.
    +        Amavisd + SpamAssassin not working? no mail header (X-Spam-*) inserted
             
         
         
    @@ -10,13 +10,18 @@
             iRedMail web site
         
             // Document Index
    -    

    Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.

    +

    Amavisd + SpamAssassin not working? no mail header (X-Spam-*) inserted

    Amavisd has below setting in its config file /etc/amavisd/amavisd.conf by default:

    $sa_tag_level_deflt  = 2.0;
     
    -

    That means Amavisd will insert X-Spam-Flag and other X-Spam-* headers when email score >= 2.0. If you want to let Amavisd always insert these headers, you can set it to a low score, for example:

    + +

    That means Amavisd will insert X-Spam-Flag and other X-Spam-* headers when +email score >= 2.0. If you want Amavisd always insert these headers, please +set it to a low score, for example:

    $sa_tag_level_deflt  = -999;
     
    + +

    Restarting Amavisd service is required after changed setting.

    Amavisd's main config file is different on different Linux/BSD distributions:

    • Red Hat, CentOS, OpenBSD: /etc/amavisd/amavisd.conf
    • diff --git a/html/password.hashes.html b/html/password.hashes.html index 35f9e134..4cd5a9ed 100644 --- a/html/password.hashes.html +++ b/html/password.hashes.html @@ -13,16 +13,19 @@

      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 +password schemes supported by Dovecot can be used in Postfix. Please refer to Dovecot wiki page -Password Schemes for more details.

      +Password Schemes +for more details.

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

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

            -
          • (RECOMMENDED) with a prefix: {CRYPT}$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250
          • +
          • with a prefix: {CRYPT}$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250
          • without a prefix: $1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250

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

        7. -

          PLAIN-MD5 (unsalted MD5). e.g. 0d2bf3c712402f428d48fed691850bfc

          +

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

        8. -
        9. SSHA. e.g. {SSHA}OuCrqL2yWwQIu8a9uvyOQ5V/ZKfL7LJD
        10. -
        11. SSHA512. e.g. {SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJtuHWrx+wfqrs/lIH2Qxn2eA0jygXtBhMvRi7GNFmL++6aAZ0kXpcy1fxag=
        12. -
        13. BCRYPT. e.g. {CRYPT}$2a$05$TKnXV39M3uJ4o.AbY1HbjeAval9bunHbxd0.6Qn782yKoBjTEBXTe
        14. -
      +
    • Plain text. e.g. 123456
    • + +

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

      NOTES:

        -
      • BCRYPT is only available on BSD systems, because libc shipped in Linux +
      • BCRYPT is only available on BSD systems, because libc shipped in Linux doesn't support bcrypt.

      Default password schemes used in iRedMail

      @@ -46,8 +48,8 @@ prepend {CRYPT} prefix in password hash.

    • For MySQL and PostgreSQL backends:

        -
      • in iRedMail-0.8.7 and earlier versions: MD5
      • in iRedMail-0.9.0 and later versions: SSHA512
      • +
      • in iRedMail-0.8.7 and earlier versions: salted MD5
    • @@ -82,7 +84,7 @@ sql> UPDATE mailbox SET password='{SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJt
      sql> UPDATE mailbox SET password='{PLAIN}123456' WHERE username='xx@xx';
       
      -

      For LDAP backends

      +

      For OpenLDAP backend

      User password is stored in attribute userPassword of user object.

      • To store plain password, SSHA, SSHA512 password hash, just store them in diff --git a/html/reset.user.password.html b/html/reset.user.password.html index 710b4f43..9376865b 100644 --- a/html/reset.user.password.html +++ b/html/reset.user.password.html @@ -20,26 +20,16 @@

        With MySQL or PostgreSQL backends, you can generate a password hash with openssl or doveadm command first, then replace old one with this newly generated one.

        -

        For example:

        -
          -
        • Generate a salted MD5 password hash with openssl (plain password is 123456 -in this case):
        • -
        -
        $ openssl passwd -1 123456
        -$1$2dQ48hyz$.mCLeDSdPkP3fxVmARsB.0
        -
        - -

        Or, generate password hash with doveadm:

        +

        For example: generate a SSHA512 password hash with doveadm:

        $ doveadm pw -s 'ssha512' -p '123456'
         {SSHA512}jOcGSlKEz95VeuLGecbL0MwJKy0yWY9foj6UlUVfZ2O2SNkEExU3n42YJLXDbLnu3ghnIRBkwDMsM31q7OI0jY5B/5E=
         
          -
        • Reset password for user user@domain.ltd and another-user@domain.ltd:
        • +
        • Reset password for user user@domain.ltd:
        sql> USE vmail;
        -sql> UPDATE mailbox SET password='$1$2dQ48hyz$.mCLeDSdPkP3fxVmARsB.0' WHERE username='user@domain.ltd';
        -sql> UPDATE mailbox SET password='{SSHA512}jOcGSlKEz95VeuLGecbL0MwJKy0yWY...' WHERE username='another-user@domain.ltd';
        +sql> UPDATE mailbox SET password='{SSHA512}jOcGSlKEz95VeuLGecbL0MwJKy0yWY9foj6UlUVfZ2O2SNkEExU3n42YJLXDbLnu3ghnIRBkwDMsM31q7OI0jY5B/5E=' WHERE username='user@domain.ltd';
         

        With OpenLDAP backend, you can reset it with phpLDAPadmin or other LDAP client diff --git a/html/zh_CN/allow.member.to.send.email.as.mail.list.html b/html/zh_CN/allow.member.to.send.email.as.mail.list.html new file mode 100644 index 00000000..18220a0b --- /dev/null +++ b/html/zh_CN/allow.member.to.send.email.as.mail.list.html @@ -0,0 +1,35 @@ + + + + 允许列表成员以列表邮件地址作为发件人发送邮件 + + + + +

        允许列表成员以列表邮件地址作为发件人发送邮件

        +

        要允许列表成员以列表邮件地址作为发件人发送邮件,请按照以下步骤操作:

        +
          +
        • 在 Postfix 配置文件 /etc/postfix/main.cf 中移除参数 reject_sender_login_mismatch
        • +
        • 在 iRedAPD 配置文件 /opt/iredapd/settings.py 中启用插件 reject_sender_login_mismatch
        • +
        • 在 iRedAPD 配置文件 /opt/iredapd/settings.py 中添加如下参数,允许列表成员 + 以列表邮件地址作为发件人发送邮件:
        • +
        +
        ALLOWED_LOGIN_MISMATCH_LIST_MEMBER = True
        +
        + +
          +
        • 修改后需要重启 Postfix 和 iRedAPD 服务。
        • +

        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/zh_CN/allow.user.to.send.email.without.authentication.html b/html/zh_CN/allow.user.to.send.email.without.authentication.html new file mode 100644 index 00000000..fb0d3a66 --- /dev/null +++ b/html/zh_CN/allow.user.to.send.email.without.authentication.html @@ -0,0 +1,40 @@ + + + + 允许用户无需身份验证发送邮件 + + + + +

        允许用户无需身份验证发送邮件

        +

        创建文本文件 /etc/postfix/accepted_unauth_senders,列出无需身份验证就可以 +发送邮件的用户邮件地址。下面以用户 user@example.com 为例:

        +
        user@example.com OK
        +
        + +

        使用 postmap 命令建立哈希数据库文件:

        +
        # postmap hash:/etc/postfix/accepted_unauth_senders
        +
        + +

        修改 Postfix 配置文件 /etc/postfix/main.cf 以使用该文件:

        +
        smtpd_sender_restrictions =
        +    check_sender_access hash:/etc/postfix/accepted_unauth_senders,
        +    [...OTHER RESTRICTIONS HERE...]
        +
        + +

        重启 postfix 服务以使设置生效:

        +
        # /etc/init.d/postfix restart
        +

        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/zh_CN/change.server.hostname.html b/html/zh_CN/change.server.hostname.html new file mode 100644 index 00000000..6bf37b72 --- /dev/null +++ b/html/zh_CN/change.server.hostname.html @@ -0,0 +1,60 @@ + + + + 修改服务器主机名 + + + + +

        修改服务器主机名

        +

        要在安装 iRedMail 后修改服务器的主机名,请将以下文件中的旧主机名改为新主机名:

        +

        系统配置文件

        +
          +
        • +

          /etc/hosts

          +
        • +
        • +

          Debian/Ubuntu: /etc/hostname

          +
        • +
        • Debian/Ubuntu: /etc/mailname
        • +
        +

        Postfix

        +
          +
        • /var/spool/postfix/etc/hosts
        • +
        • /etc/postfix/main.cf (Linux/OpenBSD) 或者 /usr/local/etc/postfix/main.cf (FreeBSD)
        • +
        +

        Awstats

        +
          +
        • /etc/awstats/awstats.web.conf
        • +
        • /etc/awstats/awstats.smtp.conf
        • +
        +

        Apache

        +
          +
        • RHEL/CentOS: /etc/httpd/conf/httpd.conf
        • +
        • Debian/Ubuntu: /etc/apache2/apache.conf
        • +
        +

        Amavisd

        +
          +
        • RHEL/CentOS, OpenBSD: /etc/amavisd/amavisd.conf
        • +
        • Debian/Ubuntu: /etc/amavis/conf.d/50-user
        • +
        • FreeBSD: /usr/local/etc/amavisd.conf
        • +
        +

        SOGO

        +
          +
        • /etc/httpd/conf.d/SOGo.conf
        • +
        • /etc/apache2/conf.d/SOGo.conf
        • +
        • /etc/apache2/conf-available/SOGo.conf
        • +

        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/zh_CN/index.html b/html/zh_CN/index.html index 48cdbb63..164c0b4c 100644 --- a/html/zh_CN/index.html +++ b/html/zh_CN/index.html @@ -8,11 +8,21 @@

        How to

        + +

        How to

        排错与调试

        diff --git a/html/zh_CN/mailbox.sharing.html b/html/zh_CN/mailbox.sharing.html new file mode 100644 index 00000000..aabecefb --- /dev/null +++ b/html/zh_CN/mailbox.sharing.html @@ -0,0 +1,116 @@ + + + + 共享邮箱(将 IMAP 目录共享给其他用户) + + + + +

        共享邮箱(将 IMAP 目录共享给其他用户)

        +
        +

        自 iRedMail-0.9.0版起,共享邮箱功能默认开户,用户不需要任何额外的配置。

        +

        自 iRedMail-0.7.0 版起,Dovecot 已包含共享邮箱的相关设置,但没有启用。 +只需要按照以下文档中启用 acl 插件的步骤即可启用该功能。

        +

        请勿将共享目录误理解为公共目录的概念混淆。对于共享目录而言,用户必须 +选择一个要共享的目录并指定共享给谁。

        +
        +

        共享邮箱

        +

        要开启邮箱共享功能,请确保 acl 插件已在Dovecot 的配置文件 +/etc/dovecot/dovecot.conf 里启用。以下是配置示例:

        +
          +
        • Dovecot-1.2 版:
        • +
        +
        # Part of file: /etc/dovecot/dovecot.conf
        +
        +protocol lda {
        +    mail_plugins = ... acl
        +}
        +
        +protocol imap {
        +    mail_plugins = ... acl imap_acl
        +}
        +
        + +
          +
        • Dovecot-2.x 版:
        • +
        +
        # Part of file: /etc/dovecot/dovecot.conf
        +
        +mail_plugins = ... acl
        +
        +protocol imap {
        +    mail_plugins = ... imap_acl
        +}
        +
        + +

        修改后需重启 Dovecot 服务,以使配置生效。

        +

        测试共享目录

        +

        示例:将用户 from@domain.ltdSent 目录共享给用户 testing@domain.ltd

        +
        +

        注意:不要遗漏 IMAP 命令前面的点 . 号。

        +
        +
        # telnet localhost 143                # <- 输入此命令
        +* OK [...] Dovecot ready.
        +
        +. login from@domain.ltd passwd        # <- 输入此命令
        +                                      # 使用完整邮件地址和密码登陆
        +. OK [... ACL ..] Logged in
        +
        +. SETACL Sent testing@domain.ltd rli  # <- 输入此命令
        +                                      # 将 Sent 目录共享给 testing@domain.ltd,
        +                                      # 具体权限为:读(r, read),查询(l, lookup),插入新邮件(i, insert)。
        +. OK Setacl complete.
        +
        +^]                                    # <- 按 `Ctrl + ]` 组合键退出 telnet 程序。
        +telnet> quit
        +
        + +

        以用户 testing@domain.ltd 身份登录 Roundcube 或 SOGo webmail,即可看到共享的目录。

        +

        额外信息:

        +
          +
        • +

          使用 SETACL 命令共享目录后, Dovecot 会在 MySQL 数据库中插入一条记录。

          +
            +
          • 对于采用 OpenLDAP 后端的用户,此记录保存在 SQL 表 iredadmin.share_folder 中。
          • +
          • 对于采用 MySQL/MariaDB/PostgreSQL 后端的用户,此记录保存在 vmail.share_folder 中。
          • +
          +
        • +
        +
        # mysql -uroot -p
        +mysql> USE vmail;
        +mysql> SELECT * FROM share_folder;
        ++-----------------+--------------------+-------+
        +| from_user       | to_user            | dummy |
        ++-----------------+--------------------+-------+
        +| from@domain.ltd | testing@domain.ltd | 1     |
        ++-----------------+--------------------+-------+
        +
        + +

        参考资料

        +

        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/zh_CN/no.x-spam.headers.html b/html/zh_CN/no.x-spam.headers.html new file mode 100644 index 00000000..4d11d553 --- /dev/null +++ b/html/zh_CN/no.x-spam.headers.html @@ -0,0 +1,39 @@ + + + + Amavisd + SpamAssassin 无效,邮件头无 X-Spam-* 信息插入 + + + + +

        Amavisd + SpamAssassin 无效,邮件头无 X-Spam-* 信息插入

        +

        在 Amavisd 的配置文件 /etc/amavisd/amavisd.conf 中有如下默认设置:

        +
        $sa_tag_level_deflt  = 2.0;
        +
        + +

        该设置表示 Amavisd 在邮件评分 >= 2.0 时会在邮件头(mail header)里插入 +X-Spam-Flag 及其它的 X-Spam-* 信息。要让 Amavisd 总是插入 X-Spam-* 邮件头, +将上面的参数设成一个更低的值即可。例如:

        +
        $sa_tag_level_deflt  = -999;
        +
        + +

        修改后需要重启 Amavisd 服务。

        +

        Amavisd 的主配置文件在不同的 Linux/BSD 系统上路径不同:

        +
          +
        • Red Hat, CentOS, OpenBSD: /etc/amavisd/amavisd.conf
        • +
        • Debian, Ubuntu: /etc/amavis/conf.d/50-user (其它配置文件均在 /etc/amavs/conf.d/ 目录下)
        • +
        • FreeBSD: /usr/local/etc/amavisd/amavisd.conf
        • +

        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/zh_CN/password.hashes.html b/html/zh_CN/password.hashes.html new file mode 100644 index 00000000..623999f4 --- /dev/null +++ b/html/zh_CN/password.hashes.html @@ -0,0 +1,113 @@ + + + + 密码 + + + + +

        密码

        +

        iRedMail 支持的密码

        +

        在 iRedMail 中,Doevcot 被配置为 Postfix 的 SASL 认证服务器,因此,Dovecot 支持 +的所有密码格式都可以在 Postfix (SMTP 服务)中使用。 查看 Dovecot 的 wiki 页面 +Password Schemes +获取更多信息。

        +

        iRedAdmin-Pro 支持以下密码格式,因此你可以使用给用户使用下列任意一种。

        +
          +
        1. SSHA512,例如: {SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJtuHWrx+wfqrs/lIH2Qxn2eA0jygXtBhMvRi7GNFmL++6aAZ0kXpcy1fxag=
        2. +
        3. BCRYPT,例如: {CRYPT}$2a$05$TKnXV39M3uJ4o.AbY1HbjeAval9bunHbxd0.6Qn782yKoBjTEBXTe
        4. +
        5. SSHA,例如: {SSHA}OuCrqL2yWwQIu8a9uvyOQ5V/ZKfL7LJD
        6. +
        7. +

          MD5(salted)。例如:

          +
            +
          • 带有前缀:{CRYPT}$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250
          • +
          • 不带前缀:$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250
          • +
          +

          重要提示: SOGo 不支持不带前缀的 MD5 密码,因此,当你打算从旧邮件服务器 +上迁移密码数据时,请预先加上 {CRYPT} 前缀。

          +
        8. +
        9. +

          PLAIN-MD5 (不带 salt),例如:0d2bf3c712402f428d48fed691850bfc

          +
        10. +
        11. 明文密码。例如: 123456
        12. +
        +

        警告:MD5, PLAIN-MD5 和明文密码都不安全,请尽可能不要使用它们。

        +

        注意:

        +
          +
        • BCRYPT 目前仅在 BSD 平台上有效,因为 Linux 系统带的 libc 函数库不支持 bcrypt。
        • +
        +

        iRedMail 中默认使用的密码

        +
          +
        • +

          对于采用 MySQL 和 PostgreSQL 后端而言:

          +
            +
          • iRedMail-0.9.0 及后续新版本:SSHA512
          • +
          • iRedMail-0.8.7 及更早版本:MD5
          • +
          +
        • +
        • +

          LDAP 后端:SSHA.

          +

          OpenLDAP 内建的密码验证不支持直接验证 SHA-2 格式密码,因此,如果你有第三方 +程序需要使用 OpenLDAP 内建的密码验证机制,建议使用 SSHA

          +

          如果你没有这方面的顾虑,可以使用 SSHA512/BCRYPT 来保存用户密码,同时 +在 /etc/dovecot/dovecot.conf 里设置 ldap_bind = no。SMTP/IMAP/POP3 +服务都能正常工作,但是,Apache 的基础认证(basic auth)则不行。

          +
        • +
        +

        如何在 iRedMail 中使用不同的哈希密码

        +

        对于采用 MySQL 和 PostgreSQL 后端的用户

        +

        所有的邮箱用户账户存放于 SQL 表 vmail.mailbox 中,用户密码则存放于 +mailbox.password 字段中。例如:

        +
        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';
        +
        + +
          +
        • 要保存 PLAIN-MD5 ,需要加上 {PLAIN-MD5} 前缀:
        • +
        +
        sql> UPDATE mailbox SET password='{PLAIN-MD5}0d2bf3c712402f428d48fed691850bfc' WHERE username='xx@xx';
        +
        + +
          +
        • 要保存明文密码,需要加上 {PLAIN} 前缀:
        • +
        +
        sql> UPDATE mailbox SET password='{PLAIN}123456' WHERE username='xx@xx';
        +
        + +

        对于采用 OpenLDAP 后端的用户

        +

        用户密码存储于用户的 userPassword 属性中。

        +
          +
        • 要保存明文密码,SSHA,SSHA512 哈希密码,只需要直接按原有格式保存即可。例如:
        • +
        +
        userPassword: 123456
        +userPassword: {SSHA}OuCrqL2yWwQIu8a9uvyOQ5V/ZKfL7LJD
        +userPassword: {SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJtuHWrx+wfqrs...
        +
        + +
          +
        • 要保存标准的 MD5 哈希值密码(salted MD5 hash),请在密码前加上 {CRYPT} +前缀(不区分大小写)。例如:
        • +
        +
        userPassword: {CRYPT}$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250
        +
        + +

        重要提示 :If you want to input password hash with phpLDAPadmin, +please choose clear in the password hash list, then input password hash.

        +

        参考资料

        +

        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/zh_CN/reset.user.password.html b/html/zh_CN/reset.user.password.html new file mode 100644 index 00000000..072a8c12 --- /dev/null +++ b/html/zh_CN/reset.user.password.html @@ -0,0 +1,55 @@ + + + + 重置用户密码 + + + + +

        重置用户密码

        +
        +
          +
        • SQL 版本推荐使用 SSHA512 密码。没有特殊情况请不要使用 MD5 密码。
        • +
        • BSD 系统的 SQL 后端推荐使用 BCRYPT 密码。
        • +
        +
        +

        对于 MySQL 或者 PostgreSQL 后端,可以使用 openssldoveadm 命令来生成 +密码,然后用它替换掉旧密码。

        +

        例如:使用 doveadm 命令生成一个 SSHA512 密码:

        +
        $ doveadm pw -s 'ssha512' -p '123456'
        +{SSHA512}jOcGSlKEz95VeuLGecbL0MwJKy0yWY9foj6UlUVfZ2O2SNkEExU3n42YJLXDbLnu3ghnIRBkwDMsM31q7OI0jY5B/5E=
        +
        + +
          +
        • 为用户 user@domain.ltd 重置密码:
        • +
        +
        sql> USE vmail;
        +sql> UPDATE mailbox SET password='{SSHA512}jOcGSlKEz95VeuLGecbL0MwJKy0yWY9foj6UlUVfZ2O2SNkEExU3n42YJLXDbLnu3ghnIRBkwDMsM31q7OI0jY5B/5E=' WHERE username='user@domain.ltd';
        +
        + +

        OpenLDAP 后端用户可以使用 phpLDAPadmin 或其它 LDAP 客户端工具。如果有其它 +程序需要通过 LDAP 做验证,建议使用 SSHA 密码以保证通用性,不是所有程序都支持 +SSHA512。

        +

        作为一种临时方案,可以重置为明文密码,然后立即登录 Roundcube webmail 或 +启用了自助服务 (self-service) 功能的 iRedAdmin-Pro 修改密码。 +例如:

        +
        sql> UPDATE mailbox SET password='{PLAIN}123456' WHERE username='user@domain.ltd';
        +
        + +

        参考资料

        +

        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/zh_CN/howto/2-no.x-spam.headers.md b/zh_CN/howto/2-no.x-spam.headers.md index 3f52e664..a1d5e031 100644 --- a/zh_CN/howto/2-no.x-spam.headers.md +++ b/zh_CN/howto/2-no.x-spam.headers.md @@ -1,15 +1,23 @@ -# Amavisd + SpamAssassin 失效,邮件头无 (X-Spam-*) 信息插入 +# Amavisd + SpamAssassin 无效,邮件头无 X-Spam-* 信息插入 在 Amavisd 的配置文件 `/etc/amavisd/amavisd.conf` 中有如下默认设置: - $sa_tag_level_deflt = 2.0; +``` +$sa_tag_level_deflt = 2.0; +``` -即 Amavisd 将在邮件评分 >= 2.0 时在邮件头插入 `X-Spam-Flag` 及其他的 `X-Spam-*` 信息。假如想让 Amavisd 总是在邮件头插入前述信息,将参数评分设成一个更低的值即可,例如: +该设置表示 Amavisd 在邮件评分 >= 2.0 时会在邮件头(mail header)里插入 +`X-Spam-Flag` 及其它的 `X-Spam-*` 信息。要让 Amavisd 总是插入 `X-Spam-*` 邮件头, +将上面的参数设成一个更低的值即可。例如: - $sa_tag_level_deflt = -999; +``` +$sa_tag_level_deflt = -999; +``` -Amavisd 的主配置文件在不同版本的 Linux/BSD 系统上分布路径如下: +修改后需要重启 Amavisd 服务。 + +Amavisd 的主配置文件在不同的 Linux/BSD 系统上路径不同: * Red Hat, CentOS, OpenBSD: `/etc/amavisd/amavisd.conf` -* Debian, Ubuntu: `/etc/amavis/conf.d/50-user` (and other config files under `/etc/amavs/conf.d/`) +* Debian, Ubuntu: `/etc/amavis/conf.d/50-user` (其它配置文件均在 `/etc/amavs/conf.d/` 目录下) * FreeBSD: `/usr/local/etc/amavisd/amavisd.conf` diff --git a/zh_CN/howto/allow.member.to.send.email.as.mail.list.md b/zh_CN/howto/allow.member.to.send.email.as.mail.list.md index dc9d3e31..6e17d9ab 100644 --- a/zh_CN/howto/allow.member.to.send.email.as.mail.list.md +++ b/zh_CN/howto/allow.member.to.send.email.as.mail.list.md @@ -1,14 +1,14 @@ -# Allow member to send email as mailing list or mail alias +# 允许列表成员以列表邮件地址作为发件人发送邮件 -To allow member of mailing list (or mail alias) account to send email as this -mailing list (or mail alias), please follw steps below: +要允许列表成员以列表邮件地址作为发件人发送邮件,请按照以下步骤操作: -* 将参数 `reject_sender_login_mismatch` 从 Postfix 配置文件 `/etc/postfix/main.cf` 中移除。 -* 更改 iRedAPD 配置文件 `/opt/iredapd/settings.py` 中的参数 `reject_sender_login_mismatch` ,以启用 iRedAPD 插件。 -* 在配置文件 `/opt/iredapd/settings.py` 中添加如下参数,允许成员按发件列表或者邮件别名来发送邮件: +* 在 Postfix 配置文件 `/etc/postfix/main.cf` 中移除参数 `reject_sender_login_mismatch`。 +* 在 iRedAPD 配置文件 `/opt/iredapd/settings.py` 中启用插件 `reject_sender_login_mismatch`。 +* 在 iRedAPD 配置文件 `/opt/iredapd/settings.py` 中添加如下参数,允许列表成员 + 以列表邮件地址作为发件人发送邮件: ``` ALLOWED_LOGIN_MISMATCH_LIST_MEMBER = True ``` -* 之后重启 Postfix 和 iRedAPD 服务器。 +* 修改后需要重启 Postfix 和 iRedAPD 服务。 diff --git a/zh_CN/howto/allow.user.to.send.email.without.authentication.md b/zh_CN/howto/allow.user.to.send.email.without.authentication.md index 1732722a..f61f1ce5 100644 --- a/zh_CN/howto/allow.user.to.send.email.without.authentication.md +++ b/zh_CN/howto/allow.user.to.send.email.without.authentication.md @@ -1,26 +1,27 @@ # 允许用户无需身份验证发送邮件 -创建一个文本文件 `/etc/postfix/accepted_unauth_senders` : +创建文本文件 `/etc/postfix/accepted_unauth_senders`,列出无需身份验证就可以 +发送邮件的用户邮件地址。下面以用户 `user@example.com` 为例: ``` -fax-machine-12@mydomain.tld OK +user@example.com OK ``` -使用 postmap 命令建立一个哈希库文件: +使用 `postmap` 命令建立哈希数据库文件: ``` # postmap hash:/etc/postfix/accepted_unauth_senders ``` -修改 Postfix 服务调用此文件: `/etc/postfix/main.cf` +修改 Postfix 配置文件 `/etc/postfix/main.cf` 以使用该文件: ``` -smtpd_sender_restrictions = +smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/accepted_unauth_senders, [...OTHER RESTRICTIONS HERE...] ``` -重启/重新装载 postfix 服务,以使设置生效: +重启 postfix 服务以使设置生效: ``` # /etc/init.d/postfix restart diff --git a/zh_CN/howto/change.server.hostname.md b/zh_CN/howto/change.server.hostname.md index 6e174e1d..9a1e95f5 100644 --- a/zh_CN/howto/change.server.hostname.md +++ b/zh_CN/howto/change.server.hostname.md @@ -1,6 +1,6 @@ -# 更改邮件服务器主机名 +# 修改服务器主机名 -要在 iRedMail 被安装后更改服务器的主机名,要将以下文件中的主机名更改为新主机名: +要在安装 iRedMail 后修改服务器的主机名,请将以下文件中的旧主机名改为新主机名: ## 系统配置文件 @@ -35,4 +35,3 @@ * `/etc/httpd/conf.d/SOGo.conf` * `/etc/apache2/conf.d/SOGo.conf` * `/etc/apache2/conf-available/SOGo.conf` - diff --git a/zh_CN/howto/mailbox.sharing.md b/zh_CN/howto/mailbox.sharing.md index a80f63d9..656225e3 100644 --- a/zh_CN/howto/mailbox.sharing.md +++ b/zh_CN/howto/mailbox.sharing.md @@ -1,20 +1,20 @@ -# 共享邮箱(和其他用户共享 IMAP 目录) - -> 自 iRedMail-`0.7.0` 版起,共享邮箱的相关设置被配置于 Dovecot 中,但是没有启用。 -> 以下是开启此 "acl" 插件功能的方法。 +# 共享邮箱(将 IMAP 目录共享给其他用户) > 自 iRedMail-`0.9.0`版起,共享邮箱功能默认开户,用户不需要任何额外的配置。 -> 请勿将“共享目录”和“公共目录”的概念混淆。对于共享目录而言,用户必须选择一个要共享的目录并指定共享给谁。Do not mistake "shared folders" for "public folders". For shared folders, -> users must select which folder they want to share and with who, using an -> interface, like IMAP command line or the ones available with Roundcube -> webmail or SOGo and SOGo connectors. +> 自 iRedMail-`0.7.0` 版起,Dovecot 已包含共享邮箱的相关设置,但没有启用。 +> 只需要按照以下文档中启用 `acl` 插件的步骤即可启用该功能。 -## 开户邮箱共享 +> 请勿将`共享目录`误理解为`公共目录`的概念混淆。对于共享目录而言,用户必须 +> 选择一个要共享的目录并指定共享给谁。 -要开启邮箱共享功能,请确保 Dovecot 中位于 `/etc/dovecot/dovecot.conf` 路径的配置文件中的 `acl` 插件参数为启用状态,如下所示: +## 共享邮箱 + +要开启邮箱共享功能,请确保 `acl` 插件已在Dovecot 的配置文件 +`/etc/dovecot/dovecot.conf` 里启用。以下是配置示例: * Dovecot-1.2 版: + ``` # Part of file: /etc/dovecot/dovecot.conf @@ -28,6 +28,7 @@ protocol imap { ``` * Dovecot-2.x 版: + ``` # Part of file: /etc/dovecot/dovecot.conf @@ -42,34 +43,34 @@ protocol imap { ## 测试共享目录 -例如:将用户 share from@domain.ltd 的 `Sent` 目录共享给用户 `testing@domain.ltd` 。 +示例:将用户 `from@domain.ltd` 的 `Sent` 目录共享给用户 `testing@domain.ltd` 。 -> 警告:不要遗漏 IMAP 命令前面的点 `.` 号。 +> 注意:不要遗漏 IMAP 命令前面的点 `.` 号。 ``` -# telnet localhost 143 # <- Type this. +# telnet localhost 143 # <- 输入此命令 * OK [...] Dovecot ready. -. login from@domain.ltd passwd # <- Type this. - # Login with full email address and password +. login from@domain.ltd passwd # <- 输入此命令 + # 使用完整邮件地址和密码登陆 . OK [... ACL ..] Logged in -. SETACL Sent testing@domain.ltd rli # <- Type this. - # Share folder `Sent` with user testing@domain.ltd, - # with permissions: read (r), lookup (l) and insert (i). +. SETACL Sent testing@domain.ltd rli # <- 输入此命令 + # 将 Sent 目录共享给 testing@domain.ltd, + # 具体权限为:读(r, read),查询(l, lookup),插入新邮件(i, insert)。 . OK Setacl complete. -^] # <- Press `Ctrl + ]` to exit telnet. +^] # <- 按 `Ctrl + ]` 组合键退出 telnet 程序。 telnet> quit ``` -以用户 `testing@domain.ltd` 身份登录 Roundcube 网页邮箱或 SOGo 网页邮箱,即可看到共享的目录。 +以用户 `testing@domain.ltd` 身份登录 Roundcube 或 SOGo webmail,即可看到共享的目录。 额外信息: * 使用 `SETACL` 命令共享目录后, Dovecot 会在 MySQL 数据库中插入一条记录。 - * 对于采用 OpenLDAP 后端的用户,此记录保存在 `iredadmin.share_folder` 中。 + * 对于采用 OpenLDAP 后端的用户,此记录保存在 SQL 表 `iredadmin.share_folder` 中。 * 对于采用 MySQL/MariaDB/PostgreSQL 后端的用户,此记录保存在 `vmail.share_folder` 中。 ``` @@ -85,11 +86,11 @@ mysql> SELECT * FROM share_folder; ## 参考资料 -* Dovecot wiki百科: +* Dovecot wiki: - * [用户间共享邮箱 (v2.0+)](http://wiki2.dovecot.org/SharedMailboxes/Shared) - * [用户间共享邮箱 (v1.2+)](http://wiki.dovecot.org/SharedMailboxes/Shared) + * [共享邮箱 (v2.0+)](http://wiki2.dovecot.org/SharedMailboxes/Shared) + * [共享邮箱 (v1.2+)](http://wiki.dovecot.org/SharedMailboxes/Shared) * Roundcubemail 有官方插件 `acl` 用来管理邮箱共享。 * SOGo 邮箱组件默认支持邮箱共享:右击 IMAP 文件夹,选择 `Sharing` 。 -* [Imap-ACL-Extension for Thunderbird](https://addons.mozilla.org/en-US/thunderbird/addon/imap-acl-extension/), manage acls/permissions for shared mailboxes/folders on imap servers. +* Thunderbird 客户端可以使用 [Imap-ACL-Extension 插件](https://addons.mozilla.org/en-US/thunderbird/addon/imap-acl-extension/)管理共享邮箱 diff --git a/zh_CN/howto/reset.user.password.md b/zh_CN/howto/reset.user.password.md index e79a516f..1980a466 100644 --- a/zh_CN/howto/reset.user.password.md +++ b/zh_CN/howto/reset.user.password.md @@ -1,44 +1,37 @@ # 重置用户密码 -> * SQL 后台推荐使用 SSHA512 编译的密码,没有特别的原因不要使用 MD5 值作为密码。 -> * BSD 系统的 SQL 后端推荐使用 BCRYPT 编译密码。 +> * SQL 版本推荐使用 SSHA512 密码。没有特殊情况请不要使用 MD5 密码。 +> * BSD 系统的 SQL 后端推荐使用 BCRYPT 密码。 -对于 MySQL 或者 PostgreSQL 后端,可以使用 `openssl` 或 `doveadm` 命令来生成一个密码哈希值,然后用它来替换旧的密码。 +对于 MySQL 或者 PostgreSQL 后端,可以使用 `openssl` 或 `doveadm` 命令来生成 +密码,然后用它替换掉旧密码。 -例如: - -* 用 `openssl` 生成一个 MD5 哈希密码(本例中使用一个非常简单的密码 `123456` ) : - -``` -$ openssl passwd -1 123456 -$1$2dQ48hyz$.mCLeDSdPkP3fxVmARsB.0 -``` - -或者,使用 `doveadm` 命令来生成: +例如:使用 `doveadm` 命令生成一个 SSHA512 密码: ``` $ doveadm pw -s 'ssha512' -p '123456' {SSHA512}jOcGSlKEz95VeuLGecbL0MwJKy0yWY9foj6UlUVfZ2O2SNkEExU3n42YJLXDbLnu3ghnIRBkwDMsM31q7OI0jY5B/5E= ``` -* 为用户 `user@domain.ltd` 和 `another-user@domain.ltd` 重置密码: +* 为用户 `user@domain.ltd` 重置密码: ``` sql> USE vmail; -sql> UPDATE mailbox SET password='$1$2dQ48hyz$.mCLeDSdPkP3fxVmARsB.0' WHERE username='user@domain.ltd'; -sql> UPDATE mailbox SET password='{SSHA512}jOcGSlKEz95VeuLGecbL0MwJKy0yWY...' WHERE username='another-user@domain.ltd'; +sql> UPDATE mailbox SET password='{SSHA512}jOcGSlKEz95VeuLGecbL0MwJKy0yWY9foj6UlUVfZ2O2SNkEExU3n42YJLXDbLnu3ghnIRBkwDMsM31q7OI0jY5B/5E=' WHERE username='user@domain.ltd'; ``` -OpenLDAP 后端用户可以使用 phpLDAPadmin 重置密码,或者使用其他的 LDAP 客户端工具。 `SSHA` is preferred if you have other applications to authenticate -users against OpenLDAP. +OpenLDAP 后端用户可以使用 phpLDAPadmin 或其它 LDAP 客户端工具。如果有其它 +程序需要通过 LDAP 做验证,建议使用 `SSHA` 密码以保证通用性,不是所有程序都支持 +SSHA512。 -使用一组简单的临时密码用来登录 Roundcube 网页邮箱或者 iRedMail-Pro(已启用自助服务功能)后台是没有问题的,但登录后应立即更改密码。 +作为一种临时方案,可以重置为明文密码,然后立即登录 Roundcube webmail 或 +启用了自助服务 (self-service) 功能的 iRedAdmin-Pro 修改密码。 例如: ``` sql> UPDATE mailbox SET password='{PLAIN}123456' WHERE username='user@domain.ltd'; ``` -## 另请参阅 +## 参考资料 -* [iRedMail 使用/支持的哈希密码](./password.hashes.html) +* [iRedMail 支持的哈希密码](./password.hashes.html) diff --git a/zh_CN/migrations/password.hashes.md b/zh_CN/migrations/password.hashes.md index 6cc95892..bbf8d4b2 100644 --- a/zh_CN/migrations/password.hashes.md +++ b/zh_CN/migrations/password.hashes.md @@ -1,68 +1,80 @@ -# 哈希密码 +# 密码 -## iRedMail 使用/支持的哈希密码 +## iRedMail 支持的密码 -在 iRedMail 中, Doevcot 被配置为 Postfix 的 SASL(简单认证与安全层)认证服务器,因此,所有被 Dovecot 支持的密码设定都可以在 iRedMail 中使用。 请参考 Dovecot 的 Wiki 页面:[`Password Schemes`](http://wiki2.dovecot.org/Authentication/PasswordSchemes) ,以获取更多的信息。 +在 iRedMail 中,Doevcot 被配置为 Postfix 的 SASL 认证服务器,因此,Dovecot 支持 +的所有密码格式都可以在 Postfix (SMTP 服务)中使用。 查看 Dovecot 的 wiki 页面 +[Password Schemes](http://wiki2.dovecot.org/Authentication/PasswordSchemes) +获取更多信息。 -下列密码设定均可在 iRedMail-Pro 中使用(就是说可以采用其中任意一种方式来添加新邮箱用户): +iRedAdmin-Pro 支持以下密码格式,因此你可以使用给用户使用下列任意一种。 -* 简单文本。例如: `123456` -* MD5 (salted)。例如: +1. SSHA512,例如: `{SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJtuHWrx+wfqrs/lIH2Qxn2eA0jygXtBhMvRi7GNFmL++6aAZ0kXpcy1fxag=` +1. BCRYPT,例如: `{CRYPT}$2a$05$TKnXV39M3uJ4o.AbY1HbjeAval9bunHbxd0.6Qn782yKoBjTEBXTe` +1. SSHA,例如: `{SSHA}OuCrqL2yWwQIu8a9uvyOQ5V/ZKfL7LJD` +1. MD5(salted)。例如: - * (推荐)带有前缀: `{CRYPT}$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250` - * 没有前缀: `$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250` + * 带有前缀:`{CRYPT}$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250` + * 不带前缀:`$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250` - __重要提示__: SOGo 组件不支持没有前缀的 MD5 哈希值,因此,当你打算从旧邮件服务器上迁移密码数据时,请预先加上 `{CRYPT}` 前缀。 + __重要提示__: SOGo 不支持不带前缀的 MD5 密码,因此,当你打算从旧邮件服务器 + 上迁移密码数据时,请预先加上 `{CRYPT}` 前缀。 -* PLAIN-MD5 (unsalted MD5),例如: `0d2bf3c712402f428d48fed691850bfc` -* SSHA,例如: `{SSHA}OuCrqL2yWwQIu8a9uvyOQ5V/ZKfL7LJD` -* SSHA512,例如: `{SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJtuHWrx+wfqrs/lIH2Qxn2eA0jygXtBhMvRi7GNFmL++6aAZ0kXpcy1fxag=` -* BCRYPT,例如: `{CRYPT}$2a$05$TKnXV39M3uJ4o.AbY1HbjeAval9bunHbxd0.6Qn782yKoBjTEBXTe` +1. PLAIN-MD5 (不带 salt),例如:`0d2bf3c712402f428d48fed691850bfc` +1. 明文密码。例如: `123456` + +__警告__:MD5, PLAIN-MD5 和明文密码都不安全,请尽可能不要使用它们。 __注意__: -* `BCRYPT` 仅在 BSD 平台上有效,因数在 Linux 系统上装载的函数库不支持 bcrypt 编码。 +* `BCRYPT` 目前仅在 BSD 平台上有效,因为 Linux 系统带的 `libc` 函数库不支持 bcrypt。 -## iRedMail 中默认使用的密码设定 +## iRedMail 中默认使用的密码 * 对于采用 MySQL 和 PostgreSQL 后端而言: - * iRedMail-0.8.7 及更早版本: `MD5` - * iRedMail-0.9.0 及更新版本: `SSHA512` + * iRedMail-0.9.0 及后续新版本:`SSHA512` + * iRedMail-0.8.7 及更早版本:`MD5` -* 对于采用 LDAP 后端而言: `SSHA`. +* LDAP 后端:`SSHA`. - OpenLDAP 内建的密码验证并不直接支持 SHA-2 格式密码,因此,如果你采用的第三方程序需要使用 OpenLDAP 内建的密码验证,那么最好使用 `SSHA` 哈希密码。 - 如果你没有这方面的问题,那么可使用 `SSHA512/BCRYPT` 哈希码来保存邮箱用户密码,同时,修改配置文件 `/etc/dovecot/dovecot.conf` 中的参数为 `ldap_bind = no` 。至此, SMTP/IMAP/POP3 服务都能良好的工作在此配置下,但是, Apache 的基础认证则不行。 + OpenLDAP 内建的密码验证不支持直接验证 SHA-2 格式密码,因此,如果你有第三方 + 程序需要使用 OpenLDAP 内建的密码验证机制,建议使用 `SSHA`。 + + 如果你没有这方面的顾虑,可以使用 `SSHA512/BCRYPT` 来保存用户密码,同时 + 在 `/etc/dovecot/dovecot.conf` 里设置 `ldap_bind = no`。SMTP/IMAP/POP3 + 服务都能正常工作,但是,Apache 的基础认证(basic auth)则不行。 ## 如何在 iRedMail 中使用不同的哈希密码 ### 对于采用 MySQL 和 PostgreSQL 后端的用户 -所有的邮箱用户账户存放于 SQL 数据表 `vmail.mailbox` 中,用户密码则存放于 SQL 列 `mailbox.password` 中。例如: +所有的邮箱用户账户存放于 SQL 表 `vmail.mailbox` 中,用户密码则存放于 +`mailbox.password` 字段中。例如: + ``` 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'; ``` -* 要保存 PLAIN-MD5 ,你需要在哈希密码值前加上前缀 `{PLAIN-MD5}` : +* 要保存 PLAIN-MD5 ,需要加上 `{PLAIN-MD5}` 前缀: ``` sql> UPDATE mailbox SET password='{PLAIN-MD5}0d2bf3c712402f428d48fed691850bfc' WHERE username='xx@xx'; ``` -* 要保存文本密码,你需要加上 `{PLAIN}` 前缀: +* 要保存明文密码,需要加上 `{PLAIN}` 前缀: ``` sql> UPDATE mailbox SET password='{PLAIN}123456' WHERE username='xx@xx'; ``` -### 对于采用 LDAP 后端的用户 +### 对于采用 OpenLDAP 后端的用户 -用户密码被存放于用户对象的 `userPassword` 属性中。 +用户密码存储于用户的 `userPassword` 属性中。 -* 要保存文本密码,SSHA,SSHA512哈希密码,只需要直接按原有格式保存即可。例如: +* 要保存明文密码,SSHA,SSHA512 哈希密码,只需要直接按原有格式保存即可。例如: ``` userPassword: 123456 @@ -70,12 +82,16 @@ userPassword: {SSHA}OuCrqL2yWwQIu8a9uvyOQ5V/ZKfL7LJD userPassword: {SSHA512}FxgXDhBVYmTqoboW+ibyyzPv/wGG7y4VJtuHWrx+wfqrs... ``` -* 要保存标准的 MD5 哈希值密码(salted MD5 hash),请在哈希密码前加上前缀 `{CRYPT}` (不区分大小写)。例如: -```userPassword: {CRYPT}$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250``` +* 要保存标准的 MD5 哈希值密码(salted MD5 hash),请在密码前加上 `{CRYPT}` +前缀(不区分大小写)。例如: + +``` +userPassword: {CRYPT}$1$GfHYI7OE$vlXqMZSyJOSPXAmbXHq250 +``` __重要提示__ :If you want to input password hash with phpLDAPadmin, please choose `clear` in the password hash list, then input password hash. -## 另请参阅 +## 参考资料 * [重置用户密码](./reset.user.password.html)