iredmail建立郵件羣組


使用phpLDAPadmin添加郵件列表

使用系統包管理安裝phpldapadmin軟件包,而後使用個nginx加載該功能。php

設置完成nginx對phpldapadmin的訪問在新版本的iredmail系統中會出現以下錯誤:nginx

Notice: Undefined variable: _SESSION in /usr/share/phpldapadmin/lib/page.php on line 379git

Fatal error: Call to a member function getValue() on a non-object in /usr/share/phpldapadmin/lib/page.php on line 379github

使用該連接增長該內容到htdocs/index.php文件的59行下面:https://github.com/leenooks/phpLDAPadmin/commit/73b7795bc0b232491de35dd91ad9ea86ad34eae8服務器

if (! is_readable($app['config_file'])) {    
	if (ob_get_level()) ob_end_clean();    
	die(sprintf("Missing configuration file <b>%s</b> - have you created it?",$app['config_file']));    
}

更改/etc/phpldapadmin/config.php的內容以下, 並更改該文件權限爲nginx可讀:
app

397  $servers->setValue('login','attr','dn');dom

398  // $servers->setValue('login','attr','uid');ide


  • 登陸phpLDAPadmin(httpS:// [your_server] / phpldapadmin /)post

  • 在左側面板中展開LDAP樹,ou=Groups在您的域dn下找到。ui

  • 單擊ou=Groups左側面板,而後單擊Create a child entry右側面板。

  • mailListObjectClasses列表中選擇,而後單擊Proceed

  • 選擇mail爲RDN,填寫必要的屬性值:

dn: mail=demolist@mydomain.com,ou=Groups,domainName=mydomain.com,o=domains,dc=iredmail,dc=org
accountStatus: active
cn: demolist
enabledService: mail
enabledService: deliver
enabledService: displayedInGlobalAddressBook
mail: demolist@mydomain.com
objectClass: mailList

如今切換到ou=Users左側面板中的域LDAP dn下。

  • ou=Users在左側面板中展開。

  • 查找要分配給咱們上面建立的新郵件列表的用戶賬戶。

  • 單擊左側面板中的用戶賬戶。

  • 若是memberOfGroup右側面板中存在屬性:

    • 點擊Add value它下面並填寫咱們新郵件列表的郵件地址。例如:demolist@mydomain.com

    • 單擊Update Object以保存設置。

  • 若是memberOfGroup右側面板中不存在屬性:

    • 單擊Add new attribute右側面板

    • memberOfGroup在下拉列表中選擇。

    • 填寫咱們新郵件列表的郵件地址。

    • 單擊Update Object以保存設置。

您能夠根據memberOfGroup=xxx須要添加任意數量,這意味着該用戶被分配到許多郵件列表。

如下是將外部用戶添加爲郵件列表成員的示例:

dn: memberOfGroup=demolist@mydomain.com,ou=Externals,domainName=mydomain.com,o=domains,dc=iredmail,dc=org
accountstatus: active
enabledservice: mail
enabledservice: deliver
mail: user01@external.com
mail: user02@external.com
memberofgroup: demolist@mydomain.com
objectclass: mailExternalUser

重要說明:若是您沒有任何郵件列表成員,Postfix將報告以下錯誤:

Aug  1 15:45:42 mail postfix/smtpd[6024]: NOQUEUE: reject: RCPT from unknown[1.1.1.1]: 550 5.1.1
<it@domain1.ru>: Recipient address rejected: User unknown in virtual mailbox table; from=<test@domain1.ru>
 to=<it@domain1.ru> proto=ESMTP helo=<[2.2.2.2]>

郵件列表訪問策略

您能夠經過添加LDAP屬性來限制誰能夠向此郵件列表發送電子郵件accessPolicy。例如:

dn: mail=demolist@mydomain.com,ou=Groups,domainName=mydomain.com,o=domains,dc=iredmail,dc=org
accesspolicy: domain
...

可用的訪問策略包括:

  • public: 無限制。

  • domain:容許同一域下的全部用戶向此郵件列表發送電子郵件。

  • subdomain:容許相同域和子域下的全部用戶向此郵件列表發送電子郵件。

  • membersonly:只容許此郵件列表的成員。

  • moderatorsonly:只容許此郵件列表的版主。版主是存儲在SQL列中的電子郵件地址alias.moderators。使用iRedAPD-1.4.5,能夠*@domain.com在郵件域「domain.com」下爲全部用戶使用(一個)主持人。

  • membersandmoderatorsonly:只容許此郵件列表的成員和版主。

訪問限制在iRedAPD(一個簡單的Postfix策略服務器)中實現,iRedMail默認啓用它。你最好檢查一下它的配置文件 /opt/iredapd/settings.py,以確保ldap_maillist_access_policy參數中啓用了插件plugins = []

相關文章
相關標籤/搜索