1 (edited by narrington 2020-11-08 01:07:14)

Topic: connection and session limits...

Hello, this is a base install of iRedMail on Debian 10.6. The server will be used for syslog notification emailing in our company and therefore will be sending and receiving an inordinately large volume of emails from numerous servers to numerous IT users/admins. At present I expect to need to send and receive anywhere from 500 to 1000 emails coming from the same number of servers and communicating with about 100 individuals throughout the company at any moment. Bear in mind this volume is not expected to be constant, but can go in bursts in the event of a major fault.

The MTA is loaded onto a fairly robust server so I know the hardware can take the volume, but postfix is failing my stress tests.

Basically to simulate a crash I'm running the following command:

# time /usr/sbin/smtp-source -s 20 -l 250000 -m 500 -c -f sender@mta1.example.com -t testdistributiongroup@mta2.example.com localhost:25

to kind of run down the test, I'm sending a batch of weighted emails (256k) to simulate a surge of log messages containing PDFs being sent to 500 admins at once. mta1.example.com being the mta server I'm testing (though it doesn't really matter with smtp-source) and mta2.example.com being our core exchange server. In this case, the send works without much fuss, however it takes nearly 30 minutes for all 500 emails to filter through postfix (dispite taking only seconds for smtp-source to send them in. This is because of the number of parallel sessions I set (20)... no problem, I'll just increase the number to 250 (half the number of emails surging) should make postfix process the messages in about double the time it takes smtp-source to send them in.... '

So this is my command:

# time /usr/sbin/smtp-source -s 250 -l 250000 -m 500 -c -f sender@mta1.example.com -t testdistributiongroup@mta2.example.com localhost:25

and this is the output:

  fatal: rejected at server banner: 421 4.7.0 Error: too many connections

ok... I know this one, I need to set maxproc in /etc/postfix/master.cf... right?

when I go into said config file, I find this:

# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (no)    (never) (100)
# ==========================================================================
smtp      inet  n       -       y       -       1       postscreen
smtpd     pass  -       -       y       -       -       smtpd
dnsblog   unix  -       -       y       -       0       dnsblog
tlsproxy  unix  -       -       y       -       0       tlsproxy

...This is not what I expect to see in a normal postfix config file...

I expect to see THIS:

# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       -       -       -       smtpd

I'm really not sure what breaks if I change this to what is expected and up maxproc...

so I tried simply changing it to the familliar code... and now I'm not getting errors, but emails aren't sending. I don't even see any changes in the iRedMail logs.

change the command back to postscreen and set maxproc to - (which should default to 100 processes) and the messages start filtering through from smtp-source, but they are slow as hell... we're talking one message every 10 or so seconds. at this rate the emails will "burst" through in about an hour. that's no good!

I'm not terribly familiar with postscreen so how do I change the max number of processes to increase the burst speed of the server?


==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Debian 10.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? yep
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

----

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

2

Re: connection and session limits...

If you don't need spam/virus scanning, disabling them will speed up A LOT.

- With iRedAdmin-Pro, go to "System -> Global Spam Policy", disable spam/virus/... checks.
- Without iRedAdmin-Pro, you can update SQL table "amavisd.policy" to disable the checks. Or, FYI: https://docs.iredmail.org/completely.di … assin.html