On Mon, 2011-12-05 at 10:42:30 +0100, Sebastian Wiesinger wrote: > * Sahil Tandon <sahil+post...@tandon.net> [2011-12-05 03:24]: > > > 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. > > > > Do not use SQL in virtual_mailbox_domains[1]; instead, set the latter to > > a regular list. Then, even when MySQL is down, Postfix will defer mail > > with 4.3.0 instead of appearing to freeze. > > that's not really an option for me, I need these lists in MySQL. It > seems I have to live with it and make MySQL as stable as possible.
Is your list of virtual mailbox domains that large or dynamic that it must be only in SQL? Note that you can still have virtual_mailbox_maps reference an SQL location; it is just virtual_mailbox_domains (and anything else that is used by trivial-rewrite(8)) that causes the "stalling" symptoms you describe above. > > [1] Actually, you should avoid using SQL or LDAP for any tables used by > > the trivial-rewrite(8) daemon. For context, see: > > Thanks for the context but I'm still not clear on why there is no way > for postfix to delay every incoming mail when that happens. Is it > because local mail (injected by sendmail interface) would probably get > lost? > > Could you explain this in a bit more detail? Victor explains well in the posts to which I linked in my original reply. -- Sahil Tandon