iredmail創建郵件羣組


使用phpLDAPadmin添加郵件列表

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

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

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

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

使用該鏈接增加該內容到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可讀:

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

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


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

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

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

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

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

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

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

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

  • 查找要分配給我們上面創建的新郵件列表的用戶帳戶。

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

  • 如果memberOfGroup右側面板中存在屬性:

    • 點擊Add value它下面並填寫我們新郵件列表的郵件地址。例如:[email protected]

    • 單擊Update Object以保存設置。

  • 如果memberOfGroup右側面板中不存在屬性:

    • 單擊Add new attribute右側面板

    • memberOfGroup在下拉列表中選擇。

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

    • 單擊Update Object以保存設置。

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

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

dn: [email protected],ou=Externals,domainName=mydomain.com,o=domains,dc=iredmail,dc=org
accountstatus: active
enabledservice: mail
enabledservice: deliver
mail: [email protected]
mail: [email protected]
memberofgroup: [email protected]
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
<[email protected]>: Recipient address rejected: User unknown in virtual mailbox table; from=<[email protected]>
 to=<[email protected]> proto=ESMTP helo=<[2.2.2.2]>

郵件列表訪問策略

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

dn: [email protected],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 = []


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章