1

Topic: Restrict sending to Mailalias to just one address

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: Ubuntu 14.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

Hallo,

as described above. I've created an Mailalias using phpLDAPadmin. Now I want to allow just one extern address to send emails to this mailalias-address. Is this possible?

Thanks in advance!

----

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

2

Re: Restrict sending to Mailalias to just one address

*) With OpenLDAP backend, you should create mailing list instead of mail alias account to get this kind of restriction.
Reference: http://www.iredmail.org/docs/ldap.add.mail.list.html

*) With LDAP mailing list, please follow below steps to achieve this restriction:

- Add ldap attribute/value pair: accessPolicy=allowedOnly
- Add ldap attribute/value pair: listAllowedUser=user@domain.com (here the user@domain.com is the email address of the who allowed to send email to the mailing list.
- Enable plugin 'ldap_maillist_access_policy' in /opt/iredapd/settings.py, like below:

plugins = [..., 'ldap_maillist_access_policy']

3

Re: Restrict sending to Mailalias to just one address

I've decided to use mailAlias instead of Maillist because I wanted to manage the list within one entry. Otherwise I would have to add an attribute to the 800 members of this list. (parents of our pupils)

And additionally in this list there are just external addresses which I don't manage. Or should I add them to the LDAP-tree under external?

4

Re: Restrict sending to Mailalias to just one address

Mail alias account stores both internal and external members in same place, no need to add them to ou=External.

5

Re: Restrict sending to Mailalias to just one address

I know. But you've mentioned to use a MailList instead of mailalias. In the maillist I can't add users directly so I thought that I would have to add them to ou=externals?

6

Re: Restrict sending to Mailalias to just one address

Oh, I'm sorry. There is already a wiki article which describes how to restrict sending to a maillist to just one user and how to add external users to this list:

http://www.iredmail.org/docs/ldap.add.mail.list.html

Sorry for disturbing!