we have the problem that infected customers start over again to send spam. This happens about 1x per month. We have about 500 Customers in our Network.
We use this script to detect the infected users, and it works perfectly:
Sure. You’re not very clear on what direction traffic is going in, but just as an example the below will block all SMTP traffic to servers other than 192.168.1.10 and 172.16.0.20.
As a general rule in an ISP environment, we block all outbound SMTP unless its destination is our mail servers. This forces users to employ SSL (465) or SMTP-AUTH (TCP 587). Without this rule a user will inevitably get a virus and land one of your IP addresses on an SMTP blacklist. If you NAT customers behind a single IP this could become extremely problematic.
Fewi’s rule suggestion is exactly what you’re looking for.
Most newer mail clients these days already try connecting on the more secure ports if port 25 fails to respond.