How can I limit the amount of messages SendMail will recieve in a single incoming connection?

Posted by Mike B on Server Fault See other posts from Server Fault or by Mike B
Published on 2014-05-28T21:24:49Z Indexed on 2014/05/28 21:31 UTC
Read the original article Hit count: 108

Filed under:
|
|

Is there a way to limit how many messages can be received by SendMail in a given SMTP session?

I have a SendMail server and an upstream application server is trying to send dozens (potentially hundreds) of messages to it in a single SMTP session (ehlo... mail from... rcpt to... data... rset... mail from... etc). This is causing resource strain on the box since the traffic isn't effectively load balanced. I'd like to implement a policy to have sendmail only allow up to X number of messages in a given SMTP session after which it will require the remote host to reconnect again.

I noticed that there's a confCONNECTION_RATE_THROTTLE option but that seems to protect more against multiple connections occurring at once - not a single connection sending a bunch of emails.

© Server Fault or respective owner

Related posts about email

Related posts about smtp