max connection for inbound/outbound smtp

427 views
Skip to first unread message

Michael Peter

unread,
Jul 24, 2015, 7:17:31 AM7/24/15
to
Hi,

master.cf
smtp inet n - - - 100 smtpd


I understand that the default concurrent simultaneous incoming smtp
connections is 100?

but what about outgoing smtp connections to remote smtpd servers? how many
connections postfix can establish for outgoing emails to different mail
servers simultaneously ?

For example, can postfix connect to 120 different remote smtpd servers to
for email delivery simultaneously ? and how to control this parameter ?
does it count from the smtpd maxproc mentioned in the master.cf? or this
is only for smtpd incoming connections (not outgoing) ?

Thanks

Peter Michael

Wietse Venema

unread,
Jul 24, 2015, 11:08:12 AM7/24/15
to
Michael Peter:
[ Charset ISO-8859-1 converted... ]
> Hi,
>
> master.cf
> smtp inet n - - - 100 smtpd
>
> I understand that the default concurrent simultaneous incoming smtp
> connections is 100?

There is one connection per "smtpd" process.

> but what about outgoing smtp connections to remote smtpd servers? how many
> connections postfix can establish for outgoing emails to different mail
> servers simultaneously ?

There is one connection per "smtp" process.

There are also limits per destination:
transport_destination_concurrency_limit
transport_destination_rate_delay
transport_transport_rate_delay (Postfix 3.1)

See http://www.postfix.org/postconf.5.html#transport_destination_concurrency_limit
and so on.

Wietse

Viktor Dukhovni

unread,
Jul 24, 2015, 12:18:26 PM7/24/15
to
On Fri, Jul 24, 2015 at 10:31:10AM +0300, Michael Peter wrote:

http://www.postfix.org/postconf.5.html#reject_unknown_sender_domain

reject_unknown_sender_domain
Reject the request when Postfix is not final destination
for the sender address, and the MAIL FROM domain has 1) no
DNS MX and no DNS A record, or 2) a malformed MX record
such as a record with a zero-length MX hostname (Postfix
version 2.3 and later). The reply is specified with the
unknown_address_reject_code parameter (default: 450),
unknown_address_tempfail_action (default: defer_if_permit),
or 550 (nullmx, Postfix 3.0 and later). See the respective
parameter descriptions for details.

> I am confused that is the meaning "when postfix is not final destination
> for the sender address" ?

The restriction only applies when the domain in question is not
hosted by the receiving Postfix system as determined by its address
class.

http://www.postfix.org/ADDRESS_CLASS_README.html

Sender domains in the local, virtual alias and virtual mailbox
address classes are never rejected by reject_unknown_sender_domain,
they are "known" to Postfix whether or not they are "known" to DNS.

--
Viktor.

Michael Peter

unread,
Jul 26, 2015, 8:46:17 AM7/26/15
to
Thank you very much for your reply, please find my comments below.

> Michael Peter:
> [ Charset ISO-8859-1 converted... ]
>> Hi,
>>
>> master.cf
>> smtp inet n - - - 100 smtpd
>>
>> I understand that the default concurrent simultaneous incoming smtp
>> connections is 100?
>
> There is one connection per "smtpd" process.
>
>> but what about outgoing smtp connections to remote smtpd servers? how
>> many
>> connections postfix can establish for outgoing emails to different mail
>> servers simultaneously ?

Sorry, it is my mistake since i didn't ask my question correctly.

What i meant to ask, is how many outbound processes to remote email
servers can postfix handle simultaneously (in case sending emails to many
different remove hosts and not 1 specific host)

I understand that in case send to 1 host , then
transport_destination_concurrency_limit will apply. But my question is
that incase postfix is to send to 200 different remote smtpd hosts
simultaneously , then how many outbound process postfix can handle
simultaneously as default ? and how to increase its value ?

Many thanks again.

Peter Michael

Wietse Venema

unread,
Jul 26, 2015, 9:39:05 AM7/26/15
to
Wietse:
> There is one connection per "smtpd" process.

Michael Peter:
> >> but what about outgoing smtp connections to remote smtpd servers? how
> >> many
> >> connections postfix can establish for outgoing emails to different mail
> >> servers simultaneously ?
>
> Sorry, it is my mistake since i didn't ask my question correctly.
>
> What i meant to ask, is how many outbound processes to remote email
> servers can postfix handle simultaneously (in case sending emails to many
> different remove hosts and not 1 specific host)

There is one connection per "smtp" process. You configure the process
limit (and therefore the maximum number of connections) in master.cf.

See also:
http://www.postfox.org/TUNING_README.html
http://www.postfox.org/QSHAPE_README.html

Wietse

Benny Pedersen

unread,
Jul 26, 2015, 9:46:55 AM7/26/15
to

Michael Peter

unread,
Aug 5, 2015, 2:50:16 AM8/5/15
to
Hi,

i have set on postfix that max process for SMTPD is 10 using master.cf

So once simulations concurrent connections reached 10, Postfix started
STRESS behaviour

so the SMTPD using command stress=yes

Now after the connections drooped from 10 till 5 , still postfix handle
new connections with stress=yes although the current connections is 5 and
did not reach yet again 10

so i understand from this behaviour than once stress behaviour is
activated by postfix, it remains for some time (even if the current
processes connections has decreased than the max process connections
limit).

My question is how long the time that the stress behaviour continue to be
activated after current processes connections has decreased than the max
process connections limit

I have read he documentations and searched alot but i couldn't find an
answer...

Thank you.

Michael Peter

Wietse Venema

unread,
Aug 5, 2015, 6:27:36 AM8/5/15
to
Michael Peter:
> Hi,
>
> i have set on postfix that max process for SMTPD is 10 using master.cf
>
> So once simulations concurrent connections reached 10, Postfix started
> STRESS behaviour
>
> so the SMTPD using command stress=yes
>
> Now after the connections drooped from 10 till 5 , still postfix handle
> new connections with stress=yes although the current connections is 5 and
> did not reach yet again 10

stress=yes stays persists for some time, perhaps 1000s, to prevent
Postfix from logging tons of warnings as load fluctuates. Why does
it matter what the precise time is? Address the problem (why is the
limit reached?), not the symptom (short timeouts etc.).

Wietse

Charles Kugarakuripi

unread,
Mar 2, 2021, 5:26:55 PM3/2/21
to
Hello guys
I am running postfix 2.10.1 and my problem is that when I connect my mailserver to the LAN the router restarts as if its activated DoS, could that be an issue to do with not limited concurrent connections?

Pls help
Reply all
Reply to author
Forward
0 new messages