Gentoo Archives: gentoo-user

From: Marcin Niskiewicz <mniskiewicz@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] problem with mail server
Date: Wed, 04 Feb 2009 10:28:21
Message-Id: b6373cd60902040228h438755e7oe7b0880f2ca63142@mail.gmail.com
In Reply to: Re: [gentoo-user] problem with mail server by kashani
1 2009/2/3 kashani <kashani-list@××××××××.net>
2
3 >
4 >>
5 > I think you've got a couple of problems, but none of them individually jump
6 > at as the cause of your problems. However making these three changes
7 > together might help.
8 >
9 > 1. Turn your max_user_connections in Mysql down to something sane. Default
10 > is 100 which is fine unless you're also running a web app against the same
11 > Mysql instance.
12 >
13 > 2. Use proxy in your Mysql connections from Postfix.
14 > Postfix can be configured to open a connection to Mysql and keep it open.
15 > Basically acts a connection pool and keep Postfix from opening hundreds of
16 > connections to Mysql on a very busy server. I recommend *always* using the
17 > proxy: statement anytime you're connecting to Mysql from Postfix. Your new
18 > transport_map statement will look like this.
19 >
20 > transport_maps = proxy:mysql:/etc/mail/sql/mysql-transport.cf
21 >
22 > Generally you shouldn't be running into connection issues because you're
23 > hitting Mysql on localhost which means it'll default to a socket connection.
24 > It's possible that opening a new session is taking to too long occasionally
25 > and using proxy should alleviate that.
26 >
27 > 3. You're using Postfix 2.1 or earlier query syntax.
28 > Hell it might even be Postfix 1.x syntax. This is the new syntax for
29 > Postfix 2.2 or better. This really isn't a problem, but the new syntax is
30 > far more powerful and suspect bugs that creep into the parser around old
31 > syntax aren't noticed or getting fixed.
32 >
33 > user = postfix
34 > password = password
35 > hosts = localhost
36 > dbname = maildb
37 > query = SELECT destination FROM domain WHERE domain='%s'
38 >
39 > I'm not sure what how-to you've been using, but I'd look at a few others to
40 > see some of the other options available. The one you're using seems to be
41 > pretty far out of date. While not wrong in any way it isn't taking full
42 > advantage of the last seven years of updates in Postfix.
43 >
44 > kashani
45 >
46 > thank You for Your response
47 I switch all of mysql connections to proxy and I'll be watching if it helps.
48 You're right - syntax of my configs were ancient - so I set them right.
49
50 thank You again
51 I hope it's solutions to my problems
52
53 regards
54 nichu