LDAP: Add a (unsubscribeable) mailing list

Attention

Check out the lightweight on-premises email archiving software developed by iRedMail team: Spider Email Archiver.

Warning

The mailing list account mentioned in this tutorial is not subscribealbe. For subscribeable mailing list, please read tutorial Manage subscribeable mailing lists.

Add mail list with iRedAdmin-Pro

With iRedAdmin-Pro, you can easily add mail list account by click menu: Add -> Mail List in main navigation bar.

Add mail list with phpLDAPadmin

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

Now switch to ou=Users under you domain LDAP dn in left panel.

You can add as many memberOfGroup=xxx as you want, which means this user is assigned to many mail lists.

Here's sample to add external users as mail list members:

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

IMPORTANT NOTE: If you don't have any mail list member, Postfix will report error like below:

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]>

Mail list access policies

You can restrict who can send email to this mailing list by adding LDAP attribute accessPolicy. For example:

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

Available access policies are:

Access restriction is implemented in iRedAPD (a simple Postfix policy server), iRedMail has it enabled by default. You'd better check its config file /opt/iredapd/settings.py to make sure plugin ldap_maillist_access_policy is enabled in parameter plugins = [].

See also