From: ska on
nos...(a)notreal.com wrote:
> My question is, is there a way of configuring sendmail so that after
> "X" number of emails from a given client in "Y" number of hours, it
> refuses to accept anymore emails from that client or IP address?

Besides the milter Carl mentioned you will find others, I guess.

I use MIMEDefang for this purpose. As long as you can identify your
clients, say SMTP AUTH, IP,or HELO string, you can code it in
MIMEDefang, which is a milter based on Perl.

-ska
From: nospam on
In article <e8db1da8-5f9c-4a6f-82fa-dbd4c9c62c90
@w31g2000yqb.googlegroups.com>, skg(a)mail.inf.fh-brs.de says...
> nos...(a)notreal.com wrote:
> > My question is, is there a way of configuring sendmail so that after
> > "X" number of emails from a given client in "Y" number of hours, it
> > refuses to accept anymore emails from that client or IP address?
>
> Besides the milter Carl mentioned you will find others, I guess.
>
> I use MIMEDefang for this purpose. As long as you can identify your
> clients, say SMTP AUTH, IP,or HELO string, you can code it in
> MIMEDefang, which is a milter based on Perl.
>
> -ska
>
Thanks to you and Carl for taking the time to respond. I have setup
milters before with sendmail (clamav, dk, and dkim) but none of them
seemed as involved as the two you and Carl referenced. I might get one
of them to work the way I wanted after hours of slogging it out with my
limited experience with Perl, but it seems like taking a sledgehammer to
open a peanut.

I think before I go to such extremes I will try write a bash script that
runs every 5 to 15 minutes that examines the maillog for the present day
and counts the number of "from" mails for each potential ip address and
if the limit is exceeded, appends a line to the access file, creates an
updated access.db, and then restarts sendmail.

Yes, I know it is not as efficient as a milter, and a few more mails
might get out before it the user is halted, but in 11 years I have only
had this happen once so the need is not the great. In addition the
server for the most part is idling at less than 5% so a little more load
is not going to be a problem.

Thanks again to both of you for taking the time to respond. It is
appreciated.