Finaly i did found the problem. In the end i did add the ldap ldap://etc/postfix/zarafa-ads-*-aliases.cf in the aliases_map and all the redirects in the virtual_alias_maps
and now i did some testing with an e-mail address, .. which did not have any typos in the email adres in ldap. that was where my error was. Greetz, -----Oorspronkelijk bericht----- Van: [email protected] [mailto:[email protected]] Namens L.P.H. van Belle Verzonden: vrijdag 14 augustus 2015 16:07 Aan: [email protected] Onderwerp: ldap virtual split domain and forwarding. Hai, Im new to the list, so tell me if im do-ing something wrong.. in advance, .. sorry for my english, and sorry for the long explanation.. better to much than to little imo. Im having the following setup. Debian Jessie 8.1 with packages, running a zarafa mail server samba 4 AD domain, I have amost all info i want in the AD, but im having problems with some e-mail aliases and forwarding of these. packages of postfix used: ii postfix 2.11.3-1 amd64 High-performance mail transport agent ii postfix-ldap 2.11.3-1 amd64 LDAP map support for Postfix ii postfix-mysql 2.11.3-1 amd64 MySQL map support for Postfix ii postfix-pcre 2.11.3-1 amd64 PCRE map support for Postfix This is the part im having problems with: ( i'll explain more below the configuration ) (master.cf) -------------------------------------------------------------------------------- alias_maps = hash:/etc/aliases, regexp:/etc/postfix/asp-redirect.regexp, ldap://etc/postfix/zarafa-ads-local-aliases.cf, alias_database = hash:/etc/aliases transport_maps = ldap:/etc/postfix/zarafa-ads-zpublic-transport.cf, virtual_transport = lmtp:127.0.0.1:2003 virtual_mailbox_domains = domain.tld, internal.domain.tld virtual_mailbox_maps = ldap:/etc/postfix/zarafa-ads-users.cf # Active Directory has the possibility to create distribution groups which can be used as email distribution list in ZCP. # To use integrate Postfix with distribution groups, Postfix 2.4 or higher is required. # virtual_alias_maps = ldap:/etc/postfix/zarafa-ads-users.cf, ldap:/etc/postfix/zarafa-ads-groups.cf, ldap:/etc/postfix/zarafa-ads-zpublic-aliases.cf, ldap://etc/postfix/zarafa-ads-local-redirects.cf ldap://etc/postfix/zarafa-ads-general-aliases.cf -------------------------------------------------------------------------------- So, im running zarafa 7.2 as mail server and samba 4 AD as domain for email adres lookups The zarafa server and email adresses and email aliasses and groups and public folder works fine. I need these settings for zarafa : virtual_transport = lmtp:127.0.0.1:2003 virtual_mailbox_domains = domain.tld, internal.domain.tld virtual_mailbox_maps = ldap:/etc/postfix/zarafa-ads-users.cf virtual_alias_maps = ldap:/etc/postfix/zarafa-ads-users.cf, ldap:/etc/postfix/zarafa-ads-groups.cf, ldap:/etc/postfix/zarafa-ads-zpublic-aliases.cf, with a delivery to public folders, with a setup like this example. http://www.leckerbeef.de/zarafa-deliver-mail-to-public-folder-the-postfix-way/ as sad this all works fine, i can email to all users/groups/public folder email adresses. Now based on that im creating a "contact" and I use the displayName and description fiels to set my adresses for postfix. for the ldap -aliases files i use this filter. scope = sub query_filter = (&(objectClass=contact)(displayName=%s)) result_attribute = displayName for the ldap -redirects files i use this filter. scope = sub query_filter = (&(objectClass=contact)(displayName=%s)) result_attribute = description for this one in the alias_maps : ldap://etc/postfix/zarafa-ads-local-aliases.cf i have here for example user: root with forward adres to an email adres in my public folders of zarafa, and a user e-mail adres. postmap -q root ldap://etc/postfix/zarafa-ads-local-aliases.cf gives back root , which is correct in this case. postmap -q root ldap://etc/postfix/zarafa-ads-local-redirects.cf gives back : [email protected],[email protected] this works and is used for messages send to "root" from the server. ( and mailing to [email protected] does NOT works and should not work ) here in this, i also have my [email protected] [email protected] [email protected] e-mail adresses. i can use this ldap file on all my servers, with this setup. and this is in a separated OU in the AD. (OU=local-aliases) I can send to them and these are also delivered where i want. Now my problem(s).. 1) what i want is email to : [email protected], forward to [email protected], forward to [email protected] alias_map has : regexp:/etc/postfix/asp-redirect.regexp and contains lines like /^someadres01/ [email protected] Here i catch all email adresses like [email protected] postmap -q [email protected] regexp:/etc/postfix/asp-redirect.regexp and reports back my alias i want to see. [email protected] this alias [email protected] is created in my AD and a destination adres like [email protected] As from the email adresses are in (OU=general-aliases) postmap -q [email protected] ldap:/etc/postfix/zarafa-ads-general-aliases.cf gives back [email protected] and this one if for the forward to email adres. postmap -q [email protected] ldap:/etc/postfix/zarafa-ads-general-redirects.cf [email protected] when i send a test email im getting the following ( send with zarafa webmail ) Aug 14 15:53:50 mail1 postfix/smtpd[45415]: connect from localhost[::1] Aug 14 15:53:50 mail1 postfix/smtpd[45415]: NOQUEUE: reject: RCPT from localhost[::1]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail1.domain.tld> Aug 14 15:53:50 mail1 postfix/smtpd[45415]: disconnect from localhost[::1] The ldap:/etc/postfix/zarafa-ads-general- (redirects and aliasses ) .cf are also email adresses like (displayName) (description) [email protected] [email protected] whan i send to these Aug 14 15:58:33 mail1 postfix/smtpd[45442]: connect from localhost[::1] Aug 14 15:58:34 mail1 postfix/smtpd[45442]: NOQUEUE: reject: RCPT from localhost[::1]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail1.domain.tld> Aug 14 15:58:34 mail1 postfix/smtpd[45442]: disconnect from localhost[::1] i cant figure out what im missing... I did read the http://www.postfix.org/VIRTUAL_README.html but i think im not understanding it right. i have my virtual_alias_domain defined correct, and also the virtual_alias_maps. but its not working,, what im i missing.. Any help is apriciated... Greetings, Louis
