niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Apps » Postfix
Postfix ldap and Rewriting sender email address
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
Author Message
endfx
*nix forums beginner


Joined: 17 Apr 2008
Posts: 3

PostPosted: Thu Apr 17, 2008 9:34 pm    Post subject: Postfix ldap and Rewriting sender email address Reply with quote

I'm trying to setup postfix to rewrite a sender address from
userid@hostname.domain.com to firstname.lastname@domain.com

Basically just rewriting entire address to the userid's email address from ldap.

Can anyone give me some tips on how I might do this?

Thanks!
Back to top
endfx
*nix forums beginner


Joined: 17 Apr 2008
Posts: 3

PostPosted: Fri Apr 18, 2008 3:52 pm    Post subject: Reply with quote

This is what I've got so far:

In main.cf:
canonical_maps = ldap:/etc/postfix/ldap-canonical.cf


In ldap-canonical.cf:
server_host = ldap.domain.com
search_base = ...

bind = yes
bind_dn = ...
bind_pw = ...


query_filter = sAMAccountName=%u
result_attribute = mail

I take the above two lines to mean:
find the ldap entry that has sAMAccountName = to the local part of the sender address (eg: userid from userid@pcname).
Use the "mail" entry as the result address. Am I wrong here?

I think it's authenticating just fine but I'm getting the following error in my log file:
warning: dict_ldap_lookup: Search error 9: Partial results and referral received
Apr 18 09:22:15 pcname postfix/cleanup[32577]: warning: 10C2A7BC464: canonical_maps map lookup problem for userid@pcname

This should be a pretty simple task ... any postfix admins have any thoughts?
Back to top
endfx
*nix forums beginner


Joined: 17 Apr 2008
Posts: 3

PostPosted: Fri Apr 18, 2008 9:24 pm    Post subject: Reply with quote

I got it working with a little googling ...

My LDAP server is Active Directory running on MS Server 2003.
I added:

version = 3

to my ldap-canonical.cf file and everything started working.
I guess postfix defaults to version 2 and AD on MS Server 2003 uses version 3.

Maybe this will help someone else ...
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
The time now is Sun Nov 23, 2008 10:46 am | All times are GMT
navigation Forum index » Apps » Postfix
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts spoofed local email addresses watkykjy Postfix 0 Thu Nov 20, 2008 8:49 am
No new posts Postfix fatal authentication errors! JamesMaxwell Postfix 0 Tue Oct 28, 2008 3:37 pm
No new posts Postfix relay to specific domain and to everybody else golgotha Postfix 0 Thu Oct 23, 2008 11:11 pm
No new posts Postfix + Altermime on FC6 Not working simjith Setup 0 Sat Oct 11, 2008 3:06 pm
No new posts postfix smtp authentication using mysql stored user/pass rtresidd Postfix 0 Fri Oct 03, 2008 5:58 am

Myspace Proxy | Home Loan | Credit Cards | Valentine's Day Gifts | Holiday Deals
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1649s ][ Queries: 16 (0.0602s) ][ GZIP on - Debug on ]