• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Problem with mail - queue too long, how to block sender?

trec

New Pleskian
Hi,

I have a problem with my qmail, the queue is getting to long (650 messages right now) the server is sending the messages slow, and the client's Outlook's are failing because the mail process on the server are too busy.

I had identified an IP sending a lot of messages (with virus) on the queue,what I am doing right now is to constatly check the queue with the qread command, then look for a message with a lot of recipents, look at the message, identify it as a virus and delete it with qhandle.

what I would like to do is:

- How to increase the qmail-remote process so the server can send more messages at the same time? the server load is lower than 1% but the queue is too long. I think it could process more messages

- How to increase the smtp and pop3 number of processes so the clients outlook doesn't fail?

- And the most important, How can I block a certain user to not let the server recieve e-mail from it? (in order to identify the user and remove the virus) I have the IP of the machine.

htanks!

Using Plesk 7.5.2, Linux RHES 3, Double Xeon 2.8, 2Gb RAM
 
Use top to see if some of your qmail related processes are running really high or if there's another process that's causing the problem. There were some bugs previous to 7.5.2 that caused this but since you're using 7.5.2, then that might not be your problem.

I would check to see what your concurrencylocal, concurrencyremote, and queuelifetime values are set to. These are found in /var/qmail/control/
To clear the messages out faster, you might change the value in queuelifttime to 3600 which is 1 hour so they don't just sit in there (you can leave it like that or change it back later - I just leave mine like that). If it's remote emails, then try uping the value of the concurrencyremote file. I've been told increasing the remote and local values too high can in some cases actually hurt the system rather than improve it. But you can experiment with it.

You'll need to stop and start qmail after making any changes. You might also consider using the new reject feature (in the control panel) which can lower the queue dramatically.
Try doing it for all domains on your server or the ones that you consider have the most emails coming thru them.
I have found that doing the above generally can fix the clients having problems sending and receiving once the emails get down lower. I've had problems such as this in the past and the combination of all of the above have corrected the problem.

About blocking the user, if you have firewall, then I would think you should be able to block the ports for that ip address from hitting your mail server. I would just block all ports from that ip. The Plesk firewall might have this capability.
 
I would check to see what your concurrencylocal, concurrencyremote, and queuelifetime values are set to. These are found in /var/qmail/control/
Are these only found in the directory above - with a Plesk v7.5 system?
+
 
Hello,

I'm using Redhat Enterprise 3 with Plesk 7.5.2 and that's where they're found on mine. I'm not sure about earlier versions of Redhat or different Linux distributions though.
 
thanks justy,

are these separate files located in this directory, or are they configurable options inside some other conf file?
+
 
these are all separate files. If you'll just open them using a text editor, you should already see something in them. You would just edit these and then restart qmail.
 
Please note that if these files do not exist then you will need to create them.

Some installations of Qmail do not have them there by default so it uses the default settings.

If you create them and then restart qmail it will use the settings files instead.

Here are the values I have used on all my servers.

concurrencylocal - Amount of deliveries to local mailboxes at a time. Set to 120

concurrencyremote - Amount of deliveries to remote mailboxes at a time. Set to 120

What i mean by setting the values is create a file if the file does not exist and the only thing in the file will be the setting.

Hope that helps
 
I second his statement:

Originally posted by 2tonecafe
Please note that if these files do not exist then you will need to create them.

Some installations of Qmail do not have them there by default so it uses the default settings.

If you create them and then restart qmail it will use the settings files instead.

Here are the values I have used on all my servers.

concurrencylocal - Amount of deliveries to local mailboxes at a time. Set to 120

concurrencyremote - Amount of deliveries to remote mailboxes at a time. Set to 120

What i mean by setting the values is create a file if the file does not exist and the only thing in the file will be the setting.

Hope that helps
 
just to make sure, is it as simple as:

"echo 120 > concurrencyremote"

in the right directory (/var/qmail/control - in my case)?

anything special about permissions?

Also, do you know what the default values are (if the file is not there), or how to find them out (where to look, what command to run to find out)?

Thanks guys.
+
 
Qmail.org

Well the information can be found at Qmail.org

Here it is so you don't have to go searching.

Life with Qmail

Read section 3.1. Configuration Files. It will explain a lot more then the few files that were discussed here.

Otherwise Try to make out this below... pastes a mess but if you can understand it ... its useful

Control Default Used by Purpose
badmailfrom none qmail-smtpd blacklisted From addresses
bouncefrom MAILER-DAEMON qmail-send username of bounce sender
bouncehost me qmail-send hostname of bounce sender
concurrencyincoming none /service/qmail-smtpd/run max simultaneous incoming SMTP connections
concurrencylocal 10 qmail-send max simultaneous local deliveries
concurrencyremote 20 qmail-send max simultaneous remote deliveries
defaultdelivery none /var/qmail/rc default .qmail file
defaultdomain me qmail-inject default domain name
defaulthost me qmail-inject default host name
databytes 0 qmail-smtpd max number of bytes in message (0=no limit)
doublebouncehost me qmail-send host name of double bounce sender
doublebounceto postmaster qmail-send user to receive double bounces
envnoathost me qmail-send default domain for addresses without "@"
helohost me qmail-remote host name used in SMTP HELO command
idhost me qmail-inject host name for Message-ID's
localiphost me qmail-smtpd name substituted for local IP address
locals me qmail-send domains that we deliver locally
me FQDN of system various default for many control files
morercpthosts none qmail-smtpd secondary rcpthosts database
percenthack none qmail-send domains that can use "%"-style relaying
plusdomain me qmail-inject domain substituted for trailing "+"
qmqpservers none qmail-qmqpc IP addresses of QMQP servers
queuelifetime 604800 qmail-send seconds a message can remain in queue
rcpthosts none qmail-smtpd domains that we accept mail for
smtpgreeting me qmail-smtpd SMTP greeting message
smtproutes none qmail-remote artificial SMTP routes
timeoutconnect 60 qmail-remote how long, in seconds, to wait for SMTP connection
timeoutremote 1200 qmail-remote how long, in seconds, to wait for remote server
timeoutsmtpd 1200 qmail-smtpd how long, in seconds, to wait for SMTP client
virtualdomains none qmail-send virtual domains and users
 
Back
Top