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 1LUQeP-0005IA-6i for garchives@archives.gentoo.org; Tue, 03 Feb 2009 19:09:37 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C70A6E0510; Tue, 3 Feb 2009 19:09:35 +0000 (UTC) Received: from www01.badapple.net (www01.badapple.net [64.79.219.163]) by pigeon.gentoo.org (Postfix) with ESMTP id 9D5B4E0510 for ; Tue, 3 Feb 2009 19:09:35 +0000 (UTC) Received: from [172.21.228.88] (fa0-1-wlan-rtr.corp.yahoo.com [216.145.49.5]) (Authenticated sender: ramin@badapple.net) by www01.badapple.net (Postfix) with ESMTP id 4095B150013 for ; Tue, 3 Feb 2009 11:09:30 -0800 (PST) Message-ID: <4988966A.3030609@badapple.net> Date: Tue, 03 Feb 2009 11:09:30 -0800 From: kashani User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) 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 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] problem with mail server References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 9e7a0072-493f-42b7-897e-9650f1b7f8d6 X-Archives-Hash: 1b1d4e9357595dcbe27b2cce4b149950 Marcin Nis'kiewicz wrote: > Hello > I'm testing mail server with mysql backend. Generally it works quite=20 > well. But from time to time during testing, single mails can't be send=20 > because of smtp errors: >=20 > in mail.log > Feb 3 13:47:37 mail postfix/smtpd[28339]: NOQUEUE: reject: RCPT from=20 > unknown[ip]: 451 4.3.0 :=20 > Temporary lookup failure;=20 > from=3D>=20 > to=3D> proto=3DESMTP=20 > helo=3D > > in mail.warn > Feb 3 13:47:37 kurier4 postfix/trivial-rewrite[2438]: warning:=20 > transport_maps lookup failure >=20 > when I check transport_map: >=20 > postconf | grep transport_map > address_verify_transport_maps =3D $transport_maps > fallback_transport_maps =3D > mailbox_transport_maps =3D > mydestination =3D $myhostname, localhost.localdomain, $transport_maps > proxy_read_maps =3D $local_recipient_maps $mydestination=20 > $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps=20 > $virtual_mailbox_domains $relay_recipient_maps $relay_domains=20 > $canonical_maps $sender_canonical_maps $recipient_canonical_maps=20 > $relocated_maps $transport_maps $mynetworks > transport_maps =3D mysql:/etc/mail/sql/mysql-transport.cf=20 > >=20 > my /etc/mail/sql/mysql-transport.cf looks=20 > like that: > user =3D postfix > password =3D password > dbname =3D maildb > table =3D transport > select_field =3D destination > where_field =3D domain > hosts =3D 127.0.0.1 >=20 > Generally I'm thinking that it could be mysql error - but there is=20 > nothing wrong in its error log... > I set really big limit of concurrent connections >=20 > max_user_connections =3D 1000 >=20 > So what can be wrong? > Any ideas? >=20 > Thank in progress for any help > best regards > nichu I think you've got a couple of problems, but none of them individually=20 jump at as the cause of your problems. However making these three=20 changes together might help. 1. Turn your max_user_connections in Mysql down to something sane.=20 Default is 100 which is fine unless you're also running a web app=20 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=20 open. Basically acts a connection pool and keep Postfix from opening=20 hundreds of connections to Mysql on a very busy server. I recommend=20 *always* using the proxy: statement anytime you're connecting to Mysql=20 from Postfix. Your new 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're=20 hitting Mysql on localhost which means it'll default to a socket=20 connection. It's possible that opening a new session is taking to too=20 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=20 Postfix 2.2 or better. This really isn't a problem, but the new syntax=20 is far more powerful and suspect bugs that creep into the parser around=20 old syntax 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 few others=20 to see some of the other options available. The one you're using seems=20 to be pretty far out of date. While not wrong in any way it isn't taking=20 full advantage of the last seven years of updates in Postfix. kashani