1

Topic: homeDirectory: storageBaseDirectory: mailMessageStore: 問題

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version:  CentOS7.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx):Nignx
- Manage mail accounts with iRedAdmin-Pro? LDAP-3.2
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

新建帳號:  6@mydomain.com
查看 LDIF:
homeDirectory: /var/vmail/vmail1/mydomain.com/6/_/_/6-2018.12.26.10.57.55/

再Advanced 隨意修改 Enabled Services 如Alias account 後變更為
homeDirectory: /var/vmail/vmail1/
且增加原先未有的屬性:
storageBaseDirectory: /var/vmail/vmail1/
mailMessageStore:

# ll /var/vmail/vmail1/
總計 0
drwx------ 5 vmail vmail 201 12月 26 09:36 Maildir
drwx------ 4 vmail vmail 125 12月 26 09:46 mdbox
drwx------ 5 vmail vmail  33 12月 25 17:44 mydoamin.com

Thanks.

Post's attachments

修改前.txt 1.34 kb, 1 downloads since 2018-12-26 

修改後.txt 1.33 kb, 1 downloads since 2018-12-26 

You don't have the permssions to download the attachments of this post.

----

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

2

Re: homeDirectory: storageBaseDirectory: mailMessageStore: 問題

Bug. 以下 patch 修正了该问题:
https://pastebin.com/raw/bMyWiFU6

请帮忙确认是否 ok。

3

Re: homeDirectory: storageBaseDirectory: mailMessageStore: 問題

Hi 版主:

homeDirectory: /var/vmail/vmail1/mydomain.com/7/_/_
/7-2018.12.26.14.25.05/

homeDirectory:  正常沒有被更動

但查不到該目錄: (要有/7/ 才對)
# ll /var/vmail/vmail1/mydom.com/
總計 0
drwx------ 3 vmail vmail 15 12月 25 17:44 a
drwx------ 3 vmail vmail 15 12月 25 12:19 p
drwx------ 3 vmail vmail 15 12月 25 17:31 t


LDIF: 7@mydomain.com

accountStatus: active
amavisLocal: TRUE
cn: 7
enabledService: managesievetls
enabledService: managesieve
enabledService: imaptls
enabledService: displayedInGlobalAddressBook
enabledService: sievetls
enabledService: smtp
enabledService: lda
enabledService: smtpsecured
enabledService: pop3
enabledService: forward
enabledService: deliver
enabledService: lmtp
enabledService: lib-storage
enabledService: sieve
enabledService: imap
enabledService: dsync
enabledService: smtptls
enabledService: sogo
enabledService: imapsecured
enabledService: pop3tls
enabledService: senderbcc
enabledService: recipientbcc
enabledService: pop3secured
enabledService: internal
enabledService: doveadm
enabledService: managesievesecured
enabledService: mail
enabledService: indexer-worker
enabledService: sievesecured
homeDirectory: /var/vmail/vmail1/mydomain.com/7/_/_/7-2018.12.26.14.25.05/
mail: 7@mydomain.com
mailQuota: 5268045824
mailboxFolder: Maildir
mailboxFormat: maildir
objectClass: inetOrgPerson
objectClass: mailUser
objectClass: shadowAccount
objectClass: amavisAccount
preferredLanguage: zh_TW
shadowLastChange: 17891
sn: 7
uid: 7
userPassword: {SSHA}3+Z2AR1885+FsZowjTQAAAFq3flDAF+SWVR3Fw==
userRecipientBccAddress: admin@mydomain.com
userSenderBccAddress: admin@mydomain.com


這兩個屬性也沒有
mailMessageStore:
storageBaseDirectory: /var/vmail/vmail1/

感謝回覆

4

Re: homeDirectory: storageBaseDirectory: mailMessageStore: 問題

Hi 版主:

對不起, 應可以了.

RC 登入後, 目錄就產生了.

感謝,

至於 這兩個屬性:
mailMessageStore:
storageBaseDirectory:
我查看其他帳號 , 有的有, 有的沒有,
其是 iRedAdmin後端產生?

還有:
mdbox 的儲存格式 , 要每個帳號手動更新.
無法dovecot-ldap.conf 更改後, 後續新建帳號自動為mdbox?

Thanks.

5

Re: homeDirectory: storageBaseDirectory: mailMessageStore: 問題

rain6966 wrote:

至於 這兩個屬性:
mailMessageStore:
storageBaseDirectory:
我查看其他帳號 , 有的有, 有的沒有,
其是 iRedAdmin後端產生?

旧版本 iRedAdmin-Pro 使用了这两个属性,但是在 iRedMail 的其它组件里没有用到,所以在最新发布的 iRedAdmin-Pro 里弃用了这两个属性。

rain6966 wrote:

mdbox 的儲存格式 , 要每個帳號手動更新.
無法dovecot-ldap.conf 更改後, 後續新建帳號自動為mdbox?

- 对于已经存在的帐号和 mailbox,只能先 migrate mailbox 到新格式(maildir -> mdbox),然后立刻修改 sql/ldap 里的 mailboxFormat, mailboxFolder 字段/属性。因为 iRedMail-0.9.9 里 dovecot 已经被配置为直接从 sql/ldap 查询这些信息,所以会立即生效。
- 对于新建帐号,在 iRedAdmin-Pro 里有相关参数可以控制,你可以在 iRedAdmin-Pro 的 "libs/default_settings.py" 里找到默认设置,要定制的话请复制参数到 "settings.py":

# Mailbox format (in lower cases)
#   - All Dovecot supported mailbox formats are ok, e.g. maildir, mdbox.
#     https://wiki2.dovecot.org/MailboxFormat
#   - If not set, Dovecot will use the hard-coded setting defined in its config
#     file.
MAILBOX_FORMAT = 'maildir'

# Default folder used to store mailbox under per-user HOME directory.
#
#   - Folder name is case SeNsItIvE. Defaults to 'Maildir'.
#
#   - If not set, Dovecot will use the hard-coded setting defined in its config
#     file.
#
#   - It will be appended to the `mail` variable returned by Dovecot SQL/LDAP
#     query. for example, sql query in `/etc/dovecot/dovecot-mysql.conf`:
#
#       user_query = SELECT ...,  CONCAT(...) AS mail, ...
#
#     Or LDAP query in `/etc/dovecot/dovecot-ldap.conf`:
#
#       user_attrs      = ...,=mail=%{ldap:mailboxFormat:maildir}:~/%{ldap:mailboxFolder:Maildir}/,...
MAILBOX_FOLDER = 'Maildir'

6

Re: homeDirectory: storageBaseDirectory: mailMessageStore: 問題

注意:mdbox 需要特别小心它的 index 文件,一旦被破坏或丢失,相关的 email messages 即使仍然存在也无法 recover。