Fail2ban seems to work for me.
Set these:
fail2ban=service
BanTime=1800
FindTime=900
I set the /etc/fail2ban/jail.conf template for qpsmtpd to max 3 retries
Copied this to a custom template:
/etc/e-smith/templates/etc
fail2ban/jail.conf/30Service20qpsmtpd
Then changed this
my $max = $maxretry*3;
To this
my $max = 3;
So we get this:
Cat /etc/fail2ban/jail.conf
Blah....
[qpsmtpd]
enabled = true
filter = qpsmtpd
logpath = /var/log/*qpsmtpd/current
maxretry = 3
Blah
So more than 3 attempts get picked up (choose your own values)
Add the regex and signal-event fail2ban-conf
Obviously YMMV and it may need tweaking. It may be better to separate qpsmtpd and sqpsmtpd so you can have different settings. Currently the ban mail tells me it's qpsmtpd when it could be actually a ban from sqpsmtpd. I'll look at it more when home.