127 lines
6.5 KiB
HTML
127 lines
6.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<title>LDAP: Add a mail list account</title>
|
|
<link rel="stylesheet" type="text/css" href="./css/markdown.css" />
|
|
</head>
|
|
<body>
|
|
|
|
<div id="navigation">
|
|
<a href="/index.html" target="_blank">
|
|
<img alt="iRedMail web site"
|
|
src="./images/logo-iredmail.png"
|
|
style="vertical-align: middle; height: 30px;"
|
|
/>
|
|
<span>iRedMail</span>
|
|
</a>
|
|
// <a href="./index.html">Document Index</a></div><h1 id="ldap-add-a-mail-list-account">LDAP: Add a mail list account</h1>
|
|
<div class="toc">
|
|
<ul>
|
|
<li><a href="#ldap-add-a-mail-list-account">LDAP: Add a mail list account</a><ul>
|
|
<li><a href="#add-mail-list-with-iredadmin-pro">Add mail list with iRedAdmin-Pro</a></li>
|
|
<li><a href="#add-mail-list-with-phpldapadmin">Add mail list with phpLDAPadmin</a></li>
|
|
<li><a href="#mail-list-access-policies">Mail list access policies</a></li>
|
|
<li><a href="#see-also">See also</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<h2 id="add-mail-list-with-iredadmin-pro">Add mail list with iRedAdmin-Pro</h2>
|
|
<p>With iRedAdmin-Pro, you can easily add mail list account by click menu:
|
|
<code>Add -> Mail List</code> in main navigation bar.</p>
|
|
<p><img alt="" src="../images/iredadmin/maillist_create.png" /></p>
|
|
<h2 id="add-mail-list-with-phpldapadmin">Add mail list with phpLDAPadmin</h2>
|
|
<ul>
|
|
<li>Login to phpLDAPadmin (httpS://[your_server]/phpldapadmin/)</li>
|
|
<li>Expand LDAP tree in left panel, find <code>ou=Groups</code> under your domain dn.</li>
|
|
<li>Click <code>ou=Groups</code> in left panel, then click <code>Create a child entry</code> in right
|
|
panel.</li>
|
|
<li>Choose <code>mailList</code> in <code>ObjectClasses</code> list, then click <code>Proceed</code>.</li>
|
|
<li>Select <code>mail</code> as RDN, fill necessary values of attributes:</li>
|
|
</ul>
|
|
<pre><code>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
|
|
</code></pre>
|
|
|
|
<p>Now switch to <code>ou=Users</code> under you domain LDAP dn in left panel.</p>
|
|
<ul>
|
|
<li>Expand <code>ou=Users</code> in left panel.</li>
|
|
<li>Find user account which you want to assign to new mail list we created above.</li>
|
|
<li>Click user account in left panel.</li>
|
|
<li>If attribute <code>memberOfGroup</code> exists in right panel:<ul>
|
|
<li>click <code>Add value</code> under it and fill mail address of our new mail list. For example: <code>demolist@mydomain.com</code></li>
|
|
<li>Click <code>Update Object</code> to save settings.</li>
|
|
</ul>
|
|
</li>
|
|
<li>If attribute <code>memberOfGroup</code> doesn't exist in right panel:<ul>
|
|
<li>Click <code>Add new attribute</code> in right panel</li>
|
|
<li>Choose <code>memberOfGroup</code> in drop-down list.</li>
|
|
<li>Fill mail address of our new mail list.</li>
|
|
<li>Click <code>Update Object</code> to save settings.</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<p>You can add as many <code>memberOfGroup=xxx</code> as you want, which means this user is assigned to many mail lists.</p>
|
|
<p>Here's sample to add external users as mail list members:</p>
|
|
<pre><code>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
|
|
</code></pre>
|
|
|
|
<p><strong>IMPORTANT NOTE</strong>: If you don't have any mail list member, Postfix will report error like below:</p>
|
|
<pre><code>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]>
|
|
</code></pre>
|
|
|
|
<h2 id="mail-list-access-policies">Mail list access policies</h2>
|
|
<p>You can restrict who can send email to this mailing list by adding LDAP attribute <code>accessPolicy</code>. For example:</p>
|
|
<pre><code>dn: mail=demolist@mydomain.com,ou=Groups,domainName=mydomain.com,o=domains,dc=iredmail,dc=org
|
|
accesspolicy: domain
|
|
...
|
|
</code></pre>
|
|
|
|
<p>Available access policies are:</p>
|
|
<ul>
|
|
<li><code>public</code>: no restrictions.</li>
|
|
<li><code>domain</code>: all users under same domain are allowed to send email to this mail list.</li>
|
|
<li><code>subdomain</code>: all users under same domain and sub-domains are allowed to send email to this mail list.</li>
|
|
<li><code>membersOnly</code>: only members of this mail list are allowd.</li>
|
|
<li><code>allowedOnly</code>: only moderators of this mail list are allowed. Moderators
|
|
are email addresses stored in SQL column <code>alias.moderators</code>. With iRedAPD-1.4.5,
|
|
it's ok to use <code>*@domain.com</code> as (one of) moderator for all users under
|
|
mail domain 'domain.com'.</li>
|
|
<li><code>memebersAndModeratorsOnly</code>: only members and moderators of this mail list are allowed.</li>
|
|
</ul>
|
|
<p>Access restriction is implemented in iRedAPD (a simple Postfix policy server),
|
|
iRedMail has it enabled by default. You'd better check its config file
|
|
<code>/opt/iredapd/settings.py</code> to make sure plugin <code>sql_alias_access_policy</code> is
|
|
enabled in parameter <code>plugins = []</code>.</p>
|
|
<h2 id="see-also">See also</h2>
|
|
<ul>
|
|
<li><a href="./sql.create.mail.alias.html">Create mailing list (mail alias account) for SQL backend (MySQL/MariaDB/PostgreSQL)</a></li>
|
|
</ul><div class="footer">
|
|
<p style="text-align: center; color: grey;">All documents are available in <a href="https://bitbucket.org/zhb/iredmail-docs/src">BitBucket repository</a>, and published under <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">Creative Commons</a> license. You can <a href="https://bitbucket.org/zhb/iredmail-docs/get/tip.tar.bz2">download the latest version</a> for offline reading. If you found something wrong, please do <a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.</p>
|
|
</div>
|
|
<script type="text/javascript">
|
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
|
|
ga('create', 'UA-3293801-21', 'auto');
|
|
ga('send', 'pageview');
|
|
</script>
|
|
</body></html> |