1

Topic: MAIL queue on hight server load.

Hello,

I run quite big installation of iRedMail (iRedAdmin Pro 1.5, iRedMail 0.7.0)

I have ~30 000 active users boxes.

Couple days ago I noticed following problem:

Sometimes queue size grows quite big (even to 1000 mails) all mails in queue are incoming mails. When I check id-s, all of them are stuck on following step:

postfix/qmgr[3722]: 61D0AF588DB: from=<notification+kr4mnqee5e5r@facebookmail.com>, size=3362, nrcpt=1 (queue active)

Here are details:

cat /var/log/maillog | grep 61D0AF588DB

May 21 16:13:59 mail3 postfix/smtpd[5898]: 61D0AF588DB: client=unknown[66.220.144.151]
May 21 16:13:59 mail3 postfix/cleanup[3888]: 61D0AF588DB: message-id=<13a3df4089caf3b7e11f37e42bd4962f@www.facebook.com>
May 21 16:14:00 mail3 postfix/qmgr[3722]: 61D0AF588DB: from=<notification+kr4mnqee5e5r@facebookmail.com>, size=3362, nrcpt=1 (queue active)
May 21 16:15:57 mail3 postfix/smtp[8606]: 61D0AF588DB: to=<marikun1000@posta.ge>, relay=127.0.0.1[127.0.0.1]:10024, conn_use=150, delay=118, delays=1.2/115/0/1.6, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=06178-01-150, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 30B26F58891)
May 21 16:15:57 mail3 postfix/qmgr[3722]: 61D0AF588DB: removed

This shows all ready delivered mail but you can notice that between

May 21 16:14:00 mail3 postfix/qmgr[3722]

and next step

May 21 16:15:57 mail3 postfix/smtp[8606]

time difference is almost 2 mins (thats quite big for me)

can you advice what i need to tune up for better performance?

when queue has lots of such mails I don't experience low resources on server (cpu is ~ 60/70 % ), RAM ~50% free, not swapping, disk io is not much.

I increased amavisd $max_servers to 10 and not I don't experience errors with connection refused to 10024 but this problem with mail queue size still exists.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: MAIL queue on hight server load.

kotso wrote:

cat /var/log/maillog | grep 61D0AF588DB

So you're running RHEL/CentOS or FreeBSD, tell us some basic info will help troubleshoot. e.g. we will know expected location of config files, etc.

kotso wrote:

time difference is almost 2 mins (thats quite big for me)

That means Amavisd took about 2 mins to process this email. Below are some references.

Note: Below are normal tuning tips, but you didn't find the exact bottleneck of this issue, so it probably can't solve your issues.

- Bypass spam/virus checking for outgoing mails in policy_bank "MYNETS", "ORIGINATING", "MYUSERS" like below:

$policy_bank{'MYNETS'} = {
    ...,
    bypass_virus_checks_maps => [1],
    bypass_spam_checks_maps => [1],
    bypass_banned_checks_maps => [1],
    bypass_header_checks_maps => [1],
    bypass_virus_checks_maps => [1],
    ...,
}

- Stop logging into bdb database if you don't use SNMP (required by commands: amavisd-nanny, amavisd-agent.)

$enable_db = 0;

- Retire a child after that many accepts. Default is 20.

$max_requests = 40;

- Don't lookup LDAP for per-user amavisd settings.

$enable_ldap = 0;