Help - Search - Members - Calendar
Full Version: Qmail issue - not processing local messages
The Planet Forums > Control Panels > Plesk
prggr
I have Plesk 7.1.7 on Red Hat (Enterprise 3) and I'm having some recent problems with qmail. This server has been running 7.1.7 for quite some time now and these problems just started. What happens is that its putting messages in the local queue, but its not processing them all. This morning I had a big problem with about 8000 messages in the local queue. I'm not sure how many it was delivering, but it was not a lot. I tried sending myself a test message on the server and it never went through. I use qmHandle to check out the stats and using its flush queue option didn't do anything for the local queue. In order to "fix" it I had to dump the entire queue and start from scratch. All mail started working at that point but now (a few hours later) I'm up to 1200 messages again and simple tests are getting stuck in the queue. qmail isn't even using up to the concurrent delivery settings (30 local, 150 remote) so it doesn't appear to be bogged down any. The server has pleny of RAM and HD available, so those shouldn't be causing any problems. I cannot accept a solution of emptying the queue every day as I'm losing messages left and right that way. Does anyone have any idea on how I can fix this?

The only two things I did previously to the server yesterday (which I have no idea how they would affect qmail) are tweaking the MySQL settings and tweaking the HDs (hdparm). If it matters, here is what I've done:

hdparm settings for the Hds on boot: (MySQL DB is on hdb)
/sbin/hdparm -d1 -X udma5 -c1 -u1 -W0 /dev/hda
/sbin/hdparm -d1 -X udma5 -c1 -u1 -W0 /dev/hdb

MySql settings:
---------------
[mysqld]
datadir=/backup/mysql
socket=/var/lib/mysql/mysql.sock
set-variable = max_connections=400
set-variable = key_buffer=128M
set-variable = myisam_sort_buffer_size=64M
set-variable = join_buffer=1M
set-variable = record_buffer=2M
set-variable = sort_buffer=2M
set-variable = table_cache=1024
set-variable = thread_cache_size=256
set-variable = wait_timeout=9600
set-variable = connect_timeout=10
set-variable = max_allowed_packet=16M
set-variable = max_connect_errors=10
skip-innodb

[mysql.server]
user=mysql
basedir=/backup/mysql/

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
open_files_limit=8192

[mysqldump]
quick
set-variable = max_allowed_packet=16M

[myisamchk]
set-variable = key_buffer=64M
set-variable = sort_buffer=64M
set-variable = read_buffer=16M
set-variable = write_buffer=16M
---------------

Again, I've no idea how those two things could have caused this, but stranger things have happened.

Thanks for any help!
prggr
Another note- qmail is processing local messages, but it is doing it very slowly compared to the number of messages stacking up in the queue.

qmHandle -s
Messages in local queue: 3822
Messages in remote queue: 1446

/usr/local/psa/var/log/maillog
May 19 10:29:59 server1 qmail: 1116523799.598484 status: local 1/30 remote 3/200
May 19 10:30:03 server1 qmail: 1116523803.797605 status: local 1/30 remote 2/200
May 19 10:30:05 server1 qmail: 1116523805.201200 status: local 2/30 remote 2/200
May 19 10:30:06 server1 qmail: 1116523806.591920 status: local 3/30 remote 2/200
May 19 10:30:06 server1 qmail: 1116523806.768185 status: local 3/30 remote 3/200
May 19 10:30:06 server1 qmail: 1116523806.918725 status: local 2/30 remote 3/200
dynamicnet
Greetings:

You may want to bump up your concurrencyremote and concurrencylocal settings (generally found in /var/qmail/control); and restart qmail afterwards.

You may also want to examine the types of messages in your queue (the queue typically starts in /var/qmail/queue/mess) to see if you have spam running through your servers (interally or externally).

Thank you.
Gary Simat
ya with messages building up that fast i think someone is spamming through your server...
prggr
concurrencyremote and local is just fine. Notice in the log that its not even hitting either limit:

/usr/local/psa/var/log/maillog
May 19 10:29:59 server1 qmail: 1116523799.598484 status: local 1/30 remote 3/200
May 19 10:30:03 server1 qmail: 1116523803.797605 status: local 1/30 remote 2/200
May 19 10:30:05 server1 qmail: 1116523805.201200 status: local 2/30 remote 2/200
May 19 10:30:06 server1 qmail: 1116523806.591920 status: local 3/30 remote 2/200
May 19 10:30:06 server1 qmail: 1116523806.768185 status: local 3/30 remote 3/200
May 19 10:30:06 server1 qmail: 1116523806.918725 status: local 2/30 remote 3/200

We do receive a lot of spam and have a lot of spam sent to bad addresses which bounce back. Our remote queue appears fine. Its just all building up in the local queue. It is delivering messages, but very slowly.. I had 8 test messages from yesterday morning be delivered over the course of the day (received the last one around midnight.)

The really annoying thing about this is that it was working just fine for months two days ago.. I've always received a lot of spam, so it should be able to handle the 10000 incoming messages a day.. It sure used to.
Gary Simat
install mrtg and configure it to monitor your mail incoming / outgoing this might shed some more light on the issue.
prggr
I managed to tweak some scripts around to work with the plesk qmail system.. I'm running the following through mrtg now: # messages delivered locally/remotely, the current concurrency numbers, and processed/unprocessed mail in the queue.

Any other ideas for good things to log?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.