Is there a way I can implement a layer 7 firewall rule to match a specific e-mail address?
I’m having a problem with SPAM, but disabling the account on the mail server just results in massive log files. I’d like to shut down all transmissions as soon as that e-mail address is discovered. I can manage the bulk of the rule, but I don’t know jack about the layer 7\regex matching.
A mail server is perfectly able to, and is designed to handle this type of spam problems. This is not the proper place to get help with mailserver settings, though. You should have documentation and manufacture support with your mail server.
You obviously did not even read this thread at all. He is NOT asking how to block email websites!!! He is asking how to reduce spam by stopping people with CERTAIN EMAILS from sending to his mailserver!!!
It’s actually a user account that has been compromised. I disabled the account, but instead I get several gigs of rejected logins each day. The SPAM problem has stopped, but the server is under high load just rejecting logins.
If your mailserver is under load because of that, then it is improperly configured. You should set the mailserver to “fail” the account. This means that the server does not even accept the messages to that account. It immediately rejects them based on the address instead of accepting the message and then dropping it.
Again, you need to consult your mailserver support.
I’m not sure you understand the load. I am getting over a million messages a day. That’s a lot. That’s a ton of rejection.
As recommended elsewhere, I am looking into Fail2ban to automate this process using the mail server’s firewall. I just figured a quick and easy firewall script could have been had, but people insist on the run-around.
So, if you insist on using the mikrotik to try and do this, then simply type that email address into the L7 and set the rule to drop. Of course, this will still hit your mailserver up until the remote server sends this email address in the header…
I will be putting in that particular compromised user’s address. The firewall will start blacklisting the IPs of the various machines on the botnet to prevent them from attempting to login to the mail server repeatedly.
Now:
PC on botnet attempts to authenticate to my SMTP server.
The account is in “maintenance mode”, so it is rejected.
Bunch of log data is written pertaining to the rejection.
Goto: 1.
Future:
PC on botnet attempts to authenticate to my SMTP server.
Router sees the username of the attempted authentication through layer 7.
Router adds IP to a blacklist, shutting down present connection, possibly some bit of log entry.
PC cannot goto 1 because the router blocks the communication before it ever gets there, saving gigs upon gigs of logs.
The logs rotate on schedule, but what’s the point in filling them up with junk? I don’t need any logs of the spammers failed sessions. All of this literally useless garbage just gets in the way.
Tell you what. Instead of disposing of my trash as I do now, I’ll bring it over and dump it in your living room on the floor. Only, I’ll tell 45k other people to do the same. Do you let it pile up and clear it on a given schedule or do you lock your door?