Hi,
I am looking for limiting posts to internal email distribution lists to
its members. I have already looked at the example in
http://www.postfix.org/RESTRICTION_CLASS_README.html. But what I am
looking for is permitting mails only from those email ids which are
members of that particular mailing list. Essentially this is what is to
be performed:
1. Check if the RCPT TO address matches a distribution list.
2. Get all the members of that distribution list.
3. Check if the FROM address is among the members.
The mailing lists are defined in my ldap directory as groups. For ex.
dn: cn=all,ou=Group,dc=example,dc=com
cn: all
mail: a...@example.com
memberAddr: nik...@example.com
uniqueMember: uid=rahul,ou=People,dc=example,dc=com
dn: uid=rahul,ou=People,dc=example,dc=com
uid: rahul
mail: ra...@example.com
I am familiar with ldap access tables and have already written a query
for expansion of that list.
/etc/postfix/main.cf:
virtual_alias_maps = ldap:/etc/postfix/ldap-vmailinglist.cf
/etc/postfix/ldap-vmailinglist.cf:
....
search_base = ou=Group,dc=example,dc=com
query_filter = (mail=%s)
result_attribute = memberAddress
special_result_attribute = uniqueMember
leaf_result_attribute = mail
....
So a query for a...@example.com would return all its members:
# postmap -q a...@example.com ldap:/etc/postfix/ldap-vmailinglist.cf
nik...@example.com, ra...@example.com
Now is there any way of achieving what I want i.e. restrictring posts to
the mailing list to its member users.
Any help would be appreciated.
Thanks,
Rahul.