You can set something similar up with fail2ban using the supplied postfix filter assuming you are running fail2ban,
In /etc/fail2ban/jail.conf add something like the following...
enabled = true
filter = postfix
action = hostsdeny
logpath = /var/log/maillog
maxretry = 3
bantime = 900
findtime = 900
then restart fail2ban
service fail2ban restart
This will block access to all services on your server for 15 minutes to anyone who tries to send mail to 3 unknown recipients within a 15 minute period.
Obviously you can tweak the settings to suit your own preferences.
Don't forget to change the email address for notifications and maybe add known safe IPs to the
ignoreip = 127.0.0.1
value near the top of the file.