I'm having trouble limiting the number of concurrent connections from the same client to my Postfix server. Limiting the maximal number of concurrent processes, from the same or different clients, is done easily.
Here are the two parameters that I'm using on main.cf
to do so:
default_process_limit = 50
smtpd_client_connection_count_limit = 25
When testing, I run 100 concurrent connections (threads) from the same client, but it limits at 50 smtpd processes instead of just 25. Here is how I'm counting the smtpd
processes at the server:
ps -C smtpd | wc -l
Does anyone know why this happens?
Best Answer
If you want to change the maximal number of smtpd running you should make your changes in
/etc/postfix/master.cf
. You change-
to50
in the 7th column then restart postfix withpostfix restart
(or a distro specific substitute).change this to
smtpd_client_connection_count_limit limits how many connections an smtp client can make.
It does not say how many smtpd servers will run by default. (smtpd_client_connection_count_limit is by default half of the default process limit.)