Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
From: Rahul Amaram (rahulsynovel.com)
Date: Fri Dec 12 2008 - 10:20:09 CST
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
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.
I am familiar with ldap access tables and have already written a query
for expansion of that list.
virtual_alias_maps = ldap:/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 allexample.com would return all its members:
# postmap -q allexample.com ldap:/etc/postfix/ldap-vmailinglist.cf
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.