I got it working. I have no idea why this works and the previous one
didn't but I'm going to blame Microsoft. :)
So after reading the Postfix wiki:
http://postfix.wiki.xs4all.nl/index.php?title=Relay_recipient_maps_using_LDAP_against_Active_Directory
I thought I would try changing my query filter even though using
query_filter = mail was working fine when I ran it manually with
ldapsearch
So my new /etc/postfix/ldap.cf file is:
server_host = adcontrol1.domain.com
search_base = dc=domain, dc=com
version = 3
bind_dn = cn=ldapaccess,ou=Service Accounts,ou=Administrators,dc=domain,dc=com
bind_pw = bind passwd
query_filter = (proxyAddresses=smtp:%s)
result_attribute = mail
postmap -q returns the correct value:
[***@testbox postfix]# postmap -q ***@domain2.com
ldap:/etc/postfix/ldap2.cf
***@domain2.com
Then I put it into relay_recipient_maps and used telnet to test it.
[***@linuxmgmt-socal01 RPMS]# telnet xx.xx.xx.xx 25
Trying xx.xx.xx.xx...
Connected to xx.xx.xx.xx (xx.xx.xx.xx).
Escape character is '^]'.
220 matttest.mascorp.com ESMTP Postfix
ehlo localhost
250-testbox.mascorp.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250 8BITMIME
mail from: <***@example.com>
250 Ok
rcpt to: <***@domain2.com>
250 Ok
rcpt to: <***@domain2.com>
550 <***@domain2.com>: Recipient address rejected: User unknown
quit
221 Bye
Connection closed by foreign host.
I'm not sure why using the mail for the query filter causes referral
issues with our domain controller, but I'm going to guess I'm not the
first person with this issue.
Thank to all of those who talked me down from the ledge. Maybe I'll
have some free time in the future to see if I can get query filter
mail to work, but this should do for now.
Thanks,
-GT
Post by Reinaldo CarvalhoLdap should to return or a "entry" or a "referral". Why you ldap
server return both? Postfix is prepared to read this?
--
Reinaldo Carvalho
I don't know. I guess I don't know enough about LDAP and referrals. All I
know is when I run
I get a bunch of output that says it successfull connects and the eventuall
postmap: warning: dict_ldap_lookup: Search error 10: Referral
http://groups.google.com/group/list.postfix.users/browse_thread/thread/949d5ef6d4a933a6/ff420b07ffe0c9ee?lnk=st&q=dict_ldap_lookup+search+error+10&rnum=12#ff420b07ffe0c9ee
If I use chase_referrals = yes, it takes a few seconds to display the error
message, if I use chase_referrals = no, it displays the error message
immediately.
-GT
On 9/18/07, Victor Duchovni
Post by Victor DuchovniHere's the results for the address query based off username that Jeff
said
Post by Victor Duchovnito try manually.
dc=domain,dc=com -D "cn=ldapaccess,ou=Service
Accounts,ou=Administrators,dc=domain,dc=com" -w "bind
passwd" "uid=testuser" mail
Post by Victor Duchovni# Test User, Users, Administrators, domain.com
dn: CN=Test
User,OU=Users,OU=Administrators,DC=domain,DC=com
ldap://ForestDnsZones.domain.com/DC=ForestDnsZones,DC=domain,DC=com
ldap://DomainDnsZones.domain.com/DC=DomainDnsZones,DC=domain,DC=com
ldap://domain.com/CN=Configuration,DC=domain,DC=com
Post by Victor DuchovniThis reports the referrals without following them. Do the referrals
reported by "postmap -v" bear any resemblance to the above? What
are you expecting Postfix to do with the multiple referrals?
--
Viktor.
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link
If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.