From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1LUezU-00008r-7P for garchives@archives.gentoo.org; Wed, 04 Feb 2009 10:28:21 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1A4D5E0515; Wed, 4 Feb 2009 10:28:19 +0000 (UTC) Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.187]) by pigeon.gentoo.org (Postfix) with ESMTP id EBBF2E0515 for ; Wed, 4 Feb 2009 10:28:18 +0000 (UTC) Received: by rn-out-0910.google.com with SMTP id k1so1727666rnd.14 for ; Wed, 04 Feb 2009 02:28:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=nxpH9rXc3yzYE5E+ZOfGHc9rzvm8yeRfe2+F9F1Rt6Y=; b=OjXrIObiwet4RBdlziATNa6+V2krA7ctoXoeliI7RX84G7ZjeUiuHf3n9xgsakdzIJ M/npP4Kt0gvkKX9sGLZTVhZaIZo8L9oEZyEGbbZFDlNIjM/ZgA2VNgVoWVSF4007/77O L/lE3kSovmVjpEIE4glp85Ala2DR57hQJMS80= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=BhbAs2BP4OHBsfTANRtQFwme0KRLK2ApGKUFVBdnG7bTVbdgzU6jdG4KH3JgyQydHU 0SC5bWVtyi5mSag8qlUJdPAttwhMUDz7q5yeIrduCQ1L8Ca4Vu02LjSxXR5o+0Ym/shR ToZzgKy2k66J1P2P9jkMmZhTy8jKlboeYEA9A= Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.64.112.16 with SMTP id k16mr3852019qbc.59.1233743297453; Wed, 04 Feb 2009 02:28:17 -0800 (PST) In-Reply-To: <4988966A.3030609@badapple.net> References: <4988966A.3030609@badapple.net> Date: Wed, 4 Feb 2009 11:28:17 +0100 Message-ID: Subject: Re: [gentoo-user] problem with mail server From: Marcin Niskiewicz To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=001485e22b55fd1f070462153ea6 X-Archives-Salt: 87e940ad-0097-495e-ba33-97daed03d57b X-Archives-Hash: 1c8b26920c323df7e5f9cf105853acf6 --001485e22b55fd1f070462153ea6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 2009/2/3 kashani > >> > I think you've got a couple of problems, but none of them individually jump > at as the cause of your problems. However making these three changes > together might help. > > 1. Turn your max_user_connections in Mysql down to something sane. Default > is 100 which is fine unless you're also running a web app against the same > Mysql instance. > > 2. Use proxy in your Mysql connections from Postfix. > Postfix can be configured to open a connection to Mysql and keep it open. > Basically acts a connection pool and keep Postfix from opening hundreds of > connections to Mysql on a very busy server. I recommend *always* using the > proxy: statement anytime you're connecting to Mysql from Postfix. Your new > transport_map statement will look like this. > > transport_maps = proxy:mysql:/etc/mail/sql/mysql-transport.cf > > Generally you shouldn't be running into connection issues because you're > hitting Mysql on localhost which means it'll default to a socket connection. > It's possible that opening a new session is taking to too long occasionally > and using proxy should alleviate that. > > 3. You're using Postfix 2.1 or earlier query syntax. > Hell it might even be Postfix 1.x syntax. This is the new syntax for > Postfix 2.2 or better. This really isn't a problem, but the new syntax is > far more powerful and suspect bugs that creep into the parser around old > syntax aren't noticed or getting fixed. > > user = postfix > password = password > hosts = localhost > dbname = maildb > query = SELECT destination FROM domain WHERE domain='%s' > > I'm not sure what how-to you've been using, but I'd look at a few others to > see some of the other options available. The one you're using seems to be > pretty far out of date. While not wrong in any way it isn't taking full > advantage of the last seven years of updates in Postfix. > > kashani > > thank You for Your response I switch all of mysql connections to proxy and I'll be watching if it helps. You're right - syntax of my configs were ancient - so I set them right. thank You again I hope it's solutions to my problems regards nichu --001485e22b55fd1f070462153ea6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2009/2/3 kashani <<= a href=3D"mailto:kashani-list@badapple.net">kashani-list@badapple.net&g= t;


I think you've got a couple of problems, but none of them individually = jump at as the cause of your problems. However making these three changes t= ogether might help.

1. Turn your max_user_connections in Mysql down to something sane. Default = is 100 which is fine unless you're also running a web app against the s= ame Mysql instance.

2. Use proxy in your Mysql connections from Postfix.
Postfix can be configured to open a connection to Mysql and keep it open. B= asically acts a connection pool and keep Postfix from opening hundreds of c= onnections to Mysql on a very busy server. I recommend *always* using the p= roxy: statement anytime you're connecting to Mysql from Postfix. Your n= ew transport_map statement will look like this.

transport_maps =3D  proxy:mysql:/etc/mail/sql/mysql-transport.cf

Generally you shouldn't be running into connection issues because you&#= 39;re hitting Mysql on localhost which means it'll default to a socket = connection. It's possible that opening a new session is taking to too l= ong occasionally and using proxy should alleviate that.

3. You're using Postfix 2.1 or earlier query syntax.
Hell it might even be Postfix 1.x syntax. This is the new syntax for Postfi= x 2.2 or better. This really isn't a problem, but the new syntax is far= more powerful and suspect bugs that creep into the parser around old synta= x aren't noticed or getting fixed.

user =3D postfix
password =3D password
hosts =3D localhost
dbname =3D maildb
query =3D SELECT destination FROM domain WHERE domain=3D'%s'

I'm not sure what how-to you've been using, but I'd look at a f= ew others to see some of the other options available. The one you're us= ing seems to be pretty far out of date. While not wrong in any way it isn&#= 39;t taking full advantage of the last seven years of updates in Postfix.
kashani

thank You for Your response
I switch all of my= sql connections to proxy and I'll be watching if it helps.
You'r= e right - syntax of my configs were ancient - so I set them right.

thank You again
I hope it's solutions to my problems

reg= ards
nichu
--001485e22b55fd1f070462153ea6--