Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-27-2007, 02:26 AM
mic mic is offline
Starter Member
 
Posts: 2
Default Distribution lists: controlling Zimbra's Postfix

Before I ask the question - my idea of the target setup is: Zimbra + account provisioning and external LDAP which keeps passwords, photos, groups and similar.
I have been looking into Zimbra Distribution lists - they are OK - but the problem is, that you have to create them manually. Currently I have my own postfix hooked into my LDAP server and there I have configured a few lookups, so that emails are sent to groups, or for example, to all people having attribute 'title' equal to 'Teacher'. I don't want to run two postfix MTAs. The easiest for me would be to modify Zimbra's postfix and add my own lookups that will use my external LDAP server. Is this possible or Zimbra will overwrite the configuration file next time it is started? If there is a way of modifying the configuration, then how to do it, so that everything still plays well. I understand I might have problems with upgrading - but that's something I will have to solve on my own. The idea is to get my lookups into postfix. Any clues more than welcome
Reply With Quote
  #2 (permalink)  
Old 07-05-2007, 06:06 AM
mic mic is offline
Starter Member
 
Posts: 2
Default

It is possible to add custom lookups into Zimbra's postfix - but one has to be very careful because during ugprade some stuff might suddenly disappear.
To idea was just to add new virtual_alias_maps into main.cf, so that I could use my other LDAP server, that keeps accounts and Samba stuff as a base for dynamic/group based distribution lists.
In /opt/zimbra/conf create files you will use for lookup. I did create ldap-static.cf and ldap-dyn.cf. Inside you put all the postfix-ldap directives. In my case these are:

Code:
server_host = ldap://example.com
search_base = ou=Groups,dc=example,dc=com
query_filter = (&(objectClass=posixGroup)(displayName=%s))
result_attribute = memberUid
domain = example.com
version = 3
bind = no
Lines above are for static groups (i.e. system groups are also distribution lists).

And for dynamic stuff, where you do some more sophisticated magic:

Code:
server_host = ldap://example.com
search_base = o=Email,dc=example,dc=com
query_filter = (l=%s)
special_result_attribute = description
result_attribute = mail
bind = no
The "description" attribute contains the LDAP query that will be used to match the users. "result_attribute" says which attribute contains the valid e-mail address. The query can look like this:
Code:
ldap://example.com/ou=Users,dc=example,dc=com?title,mail?sub?(title=CrazyPeople)
Which means, that e-mail will be sent to all people having the title attribute 'CrazyPeople' (which is a multi-value field, thus you can really do a lot of magic with them).

Once we have that we need to tell postfix to use our lookups. To do so edit the file /opt/zimbra/conf/zmmta.cf and substitute the following line:
Code:
POSTCONF virtual_alias_maps      LOCAL virtual_alias_maps
into

Code:
POSTCONF virtual_alias_maps      ldap:/opt/zimbra/conf/ldap-static.cf,ldap:/opt/zimbra/conf/ldap-dyn.cf,ldap:/opt/zimbra/conf/ldap-vmm.cf
You are done. Now just:
Code:
su - c zimbra
postfix reload
and you can start spamming your old friends

This way you can create your own distribution lists and use full power of the system data, like groups or titles. Probably you can do similar things directly in Zimbra, but I am using account provisioning for Zimbra with external LDAP auth and I do need these mail distribution lists, since they require nearly no maintenance.
If anybody knows how to do such thing IN Zimbra - I would love to hear more about the solution.
Reply With Quote
  #3 (permalink)  
Old 01-14-2010, 01:25 PM
Special Member
 
Posts: 160
Default

I know this is old.. but how do you do this for multiple distribution lists?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.