Mailforwarding and shared folders

Jan Kowalsky jankow at datenkollektiv.net
Thu Sep 29 15:33:24 CEST 2016


Hi all,

from time to time we have questions, if it's possible to forward mails
to several people if they are addressed to a shared folder.

Background: in some organizations there are freelancers which don't have
an account on the groupware but should be informed about emails. Or:
just to get the mails also to a primary mailbox - but still can organize
mails together with other people.

As far as I found out it's not easy to achieve that via sieve. They
respond only for inbox. Do they?

I tried to edit the virtual_alias_maps_sharedfolders.cf with a
additional result_attribute "mailforwardingaddress" and put a
corresponding attribute to the ldap entry of the shared folder.

##################
server_host = ldap.example.net
server_port = 389
version = 3
search_base = dc=example,dc=net
scope = sub

domain = ldap:/etc/postfix/ldap/mydestination.cf

bind_dn = uid=kolab-service,ou=Special Users,dc=example,dc=net
bind_pw = BJltdLAf7Kt3_5i

query_filter =
(&(|(mail=%s)(alias=%s))(objectclass=kolabsharedfolder)(kolabFolderType=mail))
result_attribute = kolabtargetfolder mailforwardingaddress
result_format = "shared+%s"

##################

But here we get problems because one attribute has to become formatted
the other not and I didn't found any possibility to handle them different.

Ok. Why we can't just use two lookup tables and add a second one like:

test_shared_forwarding.cf
##################
server_host = ldap.example.net
server_port = 389
version = 3
search_base = dc=example,dc=net
scope = sub

domain = ldap:/etc/postfix/ldap/mydestination.cf

bind_dn = uid=kolab-service,ou=Special Users,dc=example,dc=net
bind_pw = BJltdLAf7Kt3_5i

query_filter =
(&(|(mail=%s)(alias=%s))(objectclass=kolabsharedfolder)(kolabFolderType=mail))
result_attribute = mailForwardingAddress
##################

but if I test:
postmap -q testshared at datenkollektiv.net  \
  ldap:/etc/postfix/ldap/test_shared_forwarding.cf \
  ldap:/etc/postfix/ldap/hosted_duplet_virtual_alias_maps_sharedfolders.cf

only the last one will targeted.

Is their a possibility to use multiple lookup-tables in this way?

Any ideas?

Thanks and best regards
Jan


More information about the users mailing list