We have a number of hosted clients on one of our servers.
One client in particular, which has four active mailboxes is repeatedly getting just one (and always the same one) mailbox infected so that hundreds of spam messages are being sent from the mailbox. This causes the IP address we route mail via on this server to get blacklisted and then we have to set up a new IP address for mail again.
We've carried out extensive investigation into this numerous times now and it is definitely something locally at the client's end that is getting attacked/hacked. Changing the password for the mailbox instantly resolves the problem which is also indicative of this.
Only problem is, this keeps happening - a month after the password has been changed, issue happens again.
Without real time mail log monitoring or similar, I'm unsure of a method that we can really identify this happening before it's too late.
Can anyone suggest something for CentOS that will detect and block outgoing spam before it gets out of hand - or any other solutions for that matter?
Thanks in advance.
As discussed in the comments, you have a couple options:
1) Figure out a way to throttle outbound emails with your mail server,
2) Fire the client. :-)
I'm using Policyd but only to limit number of emails per sender IP and SASL username (30-50 emails per hour is more than enough for normal usage)
You could try to use Postfix session count and request rate control daemon http://www.postfix.org/anvil.8.html or use some additional policy server - http://postfwd.org
I don't know exactly how it works, but may be Parallels Premium Outbound Antispam can help you?
http://download1.parallels.com/Plesk/PP11/11.0/Doc/en-US/online/plesk-administrator-guide/index.htm?fileName=71441.htm