> Hi, > > I'm using Postfix with MySQL via proxy:mysql maps. The documentation > states that mails should get deferred if no mysql server is reachable. > > However when I shut down MySQL, SMTP transaction freeze after I enter > the "MAIL FROM:<...>" statement. > > Any ideas how I can change that? There seems to be no timeout, I left > the SMTP dialog open for a few minutes at least. >
Sebastian, Sorry for the delayed response, but I thought you might find this useful. I used to love the flexability of the mysql maps but I ran into similar problems with performance and such. Though I'm a smaller shop now I've gone away from mysql on the frontend. That's not to say I don't use it, I just changed the methodology. What I do instead is I export all of the records out into a file, one for domains and the other for aliases, and I have a batch job that runs every 1 minute and updates an internal site with these, then on the frontend postfix servers I run do a pull every one minute as well and get the latest. The implementation is much better than what I presented above, and it seems to solve all of those cases where mysql is offline for maintenance, updates, whatever. We've also extended it to push static updates (such as holds, rejects, mynetwork exclusions, etc). I think if you look into something like that you'd be much happier with the performance. Best thing is that when there is an update to the database there usually only a 60 second delay. Only thing I had to do is setup an apache server (any web server will do) and a bash script that uses basic bash commands. If you are interested, I can email you some sample scripts of the backend/frontend. The SQL is tweaked for our database format but that should be simple enough to figure out. Gary Smith