OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: transport_maps in SQL -> cached ?

From: Wietse Venema (wietseporcupine.org)
Date: Mon May 02 2005 - 12:26:15 CDT


Wouter de Jong:
> On Sat, Apr 30, 2005 at 03:46:45PM -0400, Wietse Venema wrote:
>
> Hi Wietse,
>
> > > Problem: when a record get's updated in MySQL, I need it to be almost
> > > immediately updated in Postfix (impatient :p). And this isn't the case
> > > I've noticed. It seems that Postfix somehow caches the destination for
> > > a specific transport_map entry. Mail goes only to the new destination
> > > after I've manually issued a 'postfix reload'.
>
> > - All Postfix trivial-rewrite clients cache the last result to
> > resolve a recipient to a (transport + destination host).
>
> OK.

That's one result per client.

> > - The queue manager resolves each recipient domain to (transport
> > + destination) when it opens the queue file; depending on how busy
> > the active queue is, some time may pass between the queue manager
> > looking up the (transport + destination) and the time that mail is
> > actually delivered.
>
> Well, the message get's delivered, only to 'the wrong destination'. (eg.
> the cached last result as you stated).
> And that's what I'd like to bypass :) Or actually 'influence' this
> cache (eg. timer or so?). And it's mainly for 'updates', for new
> transports it's ok to have a delay.
>
> Any possibility for this, w/o issueing a postfix reload ?
> Or maybe I'm interpretating your answer wrong ?

If I remember correctly, your data is stored in a MySQL table.
I am not aware of explicit caching in the trivial-rewrite server
except for the "*" lookup result. If any caching happens it's in
the MySQL library, outside Postfix's control.

        Wietse