Hi

[2026-07-05 09:18] Martin Kjær Jørgensen <[email protected]>
> In smtpd.conf(5) it says:
>
> smtp limit max-mails count
>     Limit the number of messages to count for each session. The default is 
> 100.
> smtp limit max-rcpt count
>     Limit the number of recipients to count for each transaction. The default 
> is 1000.
>
> I am puzzled about what consequences it has to set those variables. For
> instance, I thought 'smtp limit max-mails 10' whould mean smtpd would send max
> 10 emails per smtp session with a single server, and queue the rest for later.

I think you misunderstand where these limits are entforced. This are
incomming limits. So when a smtp client (an other mailserver or an user
mail programm) connect to smtpd the limits are enforced.

> I tried set 'smtp limit max-mails 10' and send an email to more than 10
> receivers in To: header, but it seems smtpd sends all emials at once to the
> same host anyway.

Each mail can have multible recipients. When you add addresses to the
To header field your mailprogramm normaly just send one mail with 
multible recipients to smtpd. It might change when you use bcc. So your
check result in one mail with more than 10 recipient (but less then
1000) so smtpd accepted the mail.

The max-mails limit is when over one connection is more then one mail
send. This happens between mail servers when the sender has different
mails for your domain. Then the sender starts a new mail transaction
after the the first mail send.

> Could someone clarify for me what consequences it has for mail delivery when
> the limits are reached?

When the limits are reached smtpd will issue a temporary error
indicating to the sender that he has to slow down. In particular
the error code 452 which is dedicated for this error[0].

I hope this awnsers your questions.

Philipp

Ps: the commit changing the error code from 451 to 452 is not in the
portable repo.

[0] https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.3.1.9

Reply via email to