LDAP cache on query

This is a discussion on LDAP cache on query within the alt.comp.mail.postfix forums, part of the Mail Servers and Related category; Hi all i have a problem with postfix because if i change the mailhost entry in the ldap and try ...


Go Back   Usenet Forums > Mail Servers and Related > alt.comp.mail.postfix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-21-2006
Workin
 
Posts: n/a
Default LDAP cache on query

Hi all
i have a problem with postfix because if i change the mailhost entry in the
ldap and try to send an email the mailhost it is not changed. To get it
changed i have to reload postfix. is there any method/trick to avoid this
caching problem ?

thk too much
Workin



Reply With Quote
  #2 (permalink)  
Old 03-21-2006
Greg Hackney
 
Posts: n/a
Default Re: LDAP cache on query

Workin wrote:
> Hi all
> i have a problem with postfix because if i change the mailhost entry in the
> ldap and try to send an email the mailhost it is not changed. To get it
> changed i have to reload postfix. is there any method/trick to avoid this
> caching problem ?
>
> thk too much
> Workin


I'm not very confident in my answer, so I won't feel badly if someone
corrects me on this.

I think... and again, I think.... that caching with the Postfix LDAP source code
was removed quite a while back, when the caching feature was removed from OpenLDAP.

But my question to you is, are you using the Postfix _proxymap_ feature
in your config file for the ldap table ? I belive that proxymap caches the ldap
query results, and that removing the "proxymap" keyword from the ldap table query
will stop the caching.

But I'm way out on a limb on this one.... Be sure to let us know.
--
Greg

Reply With Quote
  #3 (permalink)  
Old 03-22-2006
Workin
 
Posts: n/a
Default Re: LDAP cache on query

Hi Greg.
No i'm not using any proxymap. this is my configuration in the main.cf:

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = /etc/postfix/virtual, workindebian.localhost
mynetworks = 127.0.0.0/8
smtpd_helo_required = yes
mydomain = smttest.xxxxx.xxx
myorigin = $mydomain
myhostname = smtptest.xxxxxx.xxx
relay_domains = $mydestination
local_recipient_maps = ldap:ldaprelayhost
content_filter = smtp-amavis:[127.0.0.1]:10024
address_verify_poll_count = 1

# LDAP configuration

transport_maps = ldap:ldaprelayhost

#hash:/etc/postfix/transport
ldaprelayhost_server_host = xxx.xxx.xxx.xxx
ldaprelayhost_server_port = 389
ldaprelayhost_bind_dn = cn=Manager, o=xxxxxxxx
ldaprelayhost_bind_pw = xxxxxxxx
ldaprelayhost_bind = yes
ldaprelayhost_timeout = 5
ldaprelayhost_search_base = o=xxxxxx
ldaprelayhost_query_filter =
(&(|(mail=%s)(mailAlternateAddress=%s)(mailLifeLon gAddress=%s)(mailDefaultAddress=%s)))
ldaprelayhost_result_attribute = mailHost
ldaprelayhost_result_filter = smtp:%s
swap_bangpath = no
append_at_myorigin = no

i've at the xxxx my real information.

This is my dynamicmaps.cf :

#type location of .so file open function (mkmap
func)
#==== ================================ =============
============
tcp /usr/lib/postfix/dict_tcp.so dict_tcp_open
ldap /usr/lib/postfix/dict_ldap.so dict_ldap_open

thk workin

Reply With Quote
  #4 (permalink)  
Old 03-22-2006
Greg Hackney
 
Posts: n/a
Default Re: LDAP cache on query


A couple more things to try, if you are in the testing mood:

1. Comment out "scache" in master.cf, and restart Postifx.
(reference: man 8 scache)

2. Use the manual "ldapsearch" command to make sure it's not the LDAP server
itself that's caching the info.

--
Greg
Reply With Quote
  #5 (permalink)  
Old 03-22-2006
Workin
 
Posts: n/a
Default Re: LDAP cache on query

Thk Greg for your answer...
i find proxymap in master.cf. I commmented the line but the result was
the same.
I don't think is ldap caching becaus when i restart postfix the
mailhost is right. So when i change a mailhost in ldap user entry i
need to reload all postfix.

Workin

Reply With Quote
  #6 (permalink)  
Old 03-22-2006
Greg Hackney
 
Posts: n/a
Default Re: LDAP cache on query

Workin wrote:
> Thk Greg for your answer...
> i find proxymap in master.cf. I commmented the line but the result was
> the same.


Try commenting out "scache", not "proxymap".

--
Greg
Reply With Quote
  #7 (permalink)  
Old 03-22-2006
Workin
 
Posts: n/a
Default Re: LDAP cache on query

mmm
I don't have any parameters who name is scache .. this is my master.cf:

#
================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
#
================================================== ========================
smtp inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_etrn_restrictions=reject
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - - 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
# proxymap unix - - n - - proxymap
smtp unix - - - - - smtp
relay unix - - - - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop
-f$sender $recipient
cyrus unix - n n - 2 pipe
flags=R user=cyrus argv=/usr/sbin/cyrdeliver -r ${sender} -m
${exstension} ${user}

# only used by postfix-tls
#tlsmgr fifo - - n 300 1 tlsmgr
#smtps inet n - n - - smtpd -o
smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#587 inet n - n - - smtpd -o
smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes

# AMAVIS
smtp-amavis unix - - n - 2 smtp -o smtp_data_done_timeout=1200
127.0.0.1:10025 inet n - n - - smtpd -o content_filter= -o
local_recipient_maps= -o relay_recipient_maps= -o
smtpd_restriction_classes= -o smtpd_client_restrictions= -o
smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o
smtpd_recipient_restrictions=permit_mynetworks,rej ect -o
mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes -o
smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o
smtpd_hard_error_limit=1000

thk too much
workin

Reply With Quote
  #8 (permalink)  
Old 03-22-2006
Greg Hackney
 
Posts: n/a
Default Re: LDAP cache on query

Workin wrote:
> mmm
> I don't have any parameters who name is scache


You must be running an older version of Postfix. scache was
introduced beginning with version 2.2.


By the way, LDAP caching did exist in early Postfix versions, but
was removed after version 2.1.13.

--
Greg

Reply With Quote
  #9 (permalink)  
Old 03-23-2006
Workin
 
Posts: n/a
Default Re: LDAP cache on query

Good morning Greg.
My version of postfix is 2.1.5.
Now i search how upgrade postfix with debian or compile by myself the
new version.

thk
Workin

Reply With Quote
  #10 (permalink)  
Old 03-23-2006
Workin
 
Posts: n/a
Default Re: LDAP cache on query

I upugrade mi version of postfix to 2.2.9 and comment out scache but
the problem persist....

:(

Workin

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:52 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0