Mail gateways sit at the front of an email infrastructure to screen incoming messages through a series of security checks before they reach internal mail servers. These checks include deny and allow lists, SPF, DKIM, DMARC, anti-malware, and spam filtering, with a cumulative scoring system that determines whether a message is delivered, quarantined, or dropped.
Mail Gateways
One of the things that we'll want to implement on our mail system is some sort of gateway.
There are a lot of different names that are associated with these mail gateways. Just think of something that's coming into your network, and before it gets sent on to the rest of the mail system, we want some level of protection. So we want a mail gateway to help bridge that gap and protect the front end of our mail system.
There are many different types of implementations, but most likely we want this at the front of our network, the first thing that it comes into. Essentially this first MTA that it hits, that's what we want to be our mail gateway.
All mail gateways usually process things a little differently, but essentially they go through a series of checks. First of all, they check a deny list and see if it's something that needs to be denied, or an allow list, and then something that could be expedited and not go through any other checks. Then it would go through something like the SPF records, the DKIM, the DMARC, the anti-malware, anti-spam — and the list can go on. So there are a lot of these different checks that it goes through to see if it's going to accept it or not.
One of the checks that it'll go through is some sort of spam list check. When it goes through the spam list check, this could be a third party, somebody that you actually hire, or some sort of open sources out there that keep track of what these spam senders are out there. So it can help perform some checks on this mail that's going through here to make sure that it is legitimate.
Another thing that happens through this process is some sort of spam rating. As it goes through here, it might fail the SPF — but remember, there's that soft fail. What does that soft fail mean? How can you have a soft fail? The thing is that at that point in time it might be given some sort of rating, like two points. There's been a strike against it. Maybe it gets another strike against it, and then another strike. So as it goes along, it will gather up these strikes, and then when it hits the anti-spam here, what it'll do is decide, okay, there's enough against this that we think it might be labeled as spam.
So maybe it labels it as spam but still sends it to the end user. Or maybe it's so wrong that it puts it in quarantine and that user has to go and release it. Or maybe it drops it altogether. As part of this check, there's a rating system that happens to see if this should be sent through or not.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →