GajShield AntiSpam scans inbound SMTP email at the gateway, filtering spam and unwanted mail before it reaches your mail server — which keeps junk off the server and reduces the load it has to process. This guide covers putting mail traffic through the scanner and adding your own block rules on top of it.
Requires the AntiSpam licence. AntiSpam scanning is a licensed feature — confirm the licence is active before configuring.
AntiSpam scanning operates on the standard SMTP ports: 25, 465 and 587.
Before you begin
| Have ready / check | Detail |
|---|---|
| AntiSpam licence active | Without it, the service won't scan. |
| Mail path through the firewall | The firewall must sit in the path of your SMTP traffic. For inbound protection that usually means MX/public traffic is forwarded to your internal mail server via a destination NAT (DNAT) rule that traverses the firewall. (See How to create firewall rules to access a local server from the internet (DNAT).) |
| Your mail server details | The internal mail server IP/host and the zone it sits in, so the scanning rule matches the right traffic. |
A note on encrypted SMTP. Port 25 is typically cleartext, while 465 (implicit TLS) and 587 (STARTTLS) are usually encrypted. Content-level scanning of the encrypted ports is only possible where the firewall handles/decrypts that TLS — confirm how mail flows in your deployment so you know what is actually being inspected.
Step 1: To scan the mails on SMTP port, the following rule should be created.

Step 2: Once you have added the SMTP rule, install policies by going to
Firewall -> Policies -> Install policies to make it effective. Afterwards, Restart the AntiSpam service by going to Antispam-> Antispam Restart and clicking on
icon

You can also add AntiSpam rules by going to AntiSpam -> AntiSpam rules and clicking on
icon.
To block any mails from particular ID, from, subject or phrase, you can use AntiSpam rules. To add AntiSpam rules, go to AntiSpam -> AntiSpam Rules and click on
icon.

Finally, dont forget to restart the AntiSpam service by going to Antispam-> Antispam Restart and clicking on
icon.
You have successfully configured AntiSpam service on your firewall.
Verify it worked
- Legitimate mail still flows to the mail server (the scanning rule didn't accidentally block delivery).
- AntiSpam logs/reports show messages being scanned, and a count of blocked/spam mail.
- A message matching one of your custom AntiSpam rules is blocked as expected.
Troubleshooting
| Symptom | Likely cause and fix |
|---|---|
| Nothing is being scanned | Licence inactive; the SMTP rule doesn't match the mail path; policy not installed; or the service wasn't restarted. Re-check Steps 1–2. |
| Mail isn't reaching the server at all | The scanning/DNAT rule is mis-scoped or blocking. Confirm the rule's source/destination and that inbound SMTP is forwarded to the mail server. |
| Legitimate mail is being blocked | An over-broad custom AntiSpam rule (a common subject word or phrase). Review AntiSpam → AntiSpam Rules and tighten the match. |
| Rule/rule-change has no effect | Service not restarted after the change. Run AntiSpam → AntiSpam Restart and click the play icon. |
| Mail on 465/587 not inspected | Those ports are encrypted; content scanning depends on the firewall handling that TLS. Confirm your mail flow. |
Attached Files:
How_to_configure_Antispam_on_your_firewall.pdf
Was this article helpful?
Your feedback helps us improve the knowledge base.