SmarterMail Inbound Gateway Config
Question asked by MattyT - 10/27/2026 at 3:04 PM
Unanswered
Hi all,

Over the years I have played around will many mail gateway products, Proxmox, Symantec Mail Gateway, RspamD, SM Backup MX, and a few others whose names I just can't even remember. I've circled back to SmarterMail, and am trying it as an inbound gateway using a free license in "SmarterMail Gateway Mode" using domain forward using web service mode for user verification.

For anyone else whom has implemented this, might anyone have advice about spam filtering configs? Can Spamfoo work on an inbound gateway? I suppose not. 

Will any of the built in spam check scores (DKIM, SPF, Reverse DNS, etc) get added to the message, and then doubled once the mail server receives the message and scores again? I'm really not sure how to configure this thing other than as an MX gateway with no filtering.

Thx,
Matt
kevind Replied
Not sure about Spamfoo, but many of the spam checks (RBL, SPF, DKIM, etc.) get run on the gateway and the score gets passed to the primary server. The primary server doesn't re-do the checks. So it's kind of nice as the inbound gateway offloads processing from the primary server.

Kevin
MattyT Replied
@kevin. >The primary server doesn't re-do the checks. 

Aha. That's really interesting. Not asking you to do my homework for me but do you know if this is documented anywhere? I've read as many docs as I could find and it wasn't very clear. I hate opening tickets over something that isn't a flaw or error but I think that I have enough questions worthy of one. Also, I should probably just point a domain that gets some degree of mail traffic at it, and see what happens.

Thanks for chiming in!
kevind Replied
Not sure if it's documented anywhere. It's just how I recall it working over the years, but maybe things have changed.  Of course some things, like Reverse DNS Lookup, need to get done on the inbound gateway

Good idea to set up a domain for testing. Here's what you could do.  Add a new RBL to the gateway only, then look at the headers of the messages you receive to see if the RBL shows up. That would indicate the scoring is done on the gateway.
Manuel Martins Replied
Hi,

If you want to use Smartmail Free version Spamfoo will never work because Spamfoo is only present in the payed version, as i know the Free version can have Spamfoo because Spamfoo will be a payed add-on on the payed version.

In Smartermail Inbound Gateway there are no Spam Checks because it's not a Local Delivery. The Spam Checks are only made in the Destination Server.

Smartermail Inbound Gateway LOG Example :

[2026.10.30] 17:43:08.235 [9405498] Delivery started for XXXXXXX@XXXXXXXX at 17:43:08
[2026.10.30] 17:43:11.238 [9405498] Added to SpamCheckQueue (1 queued; 0/30 processing)
[2026.10.30] 17:43:11.238 [9405498] [SpamCheckQueue] Begin Processing.
[2026.10.30] 17:43:11.240 [9405498] Blocked Sender Checks started.
[2026.10.30] 17:43:11.311 [9405498] Spam Checks started.
[2026.10.30] 17:43:11.312 [9405498] Spam Checks skipped: No local recipients
[2026.10.30] 17:43:11.312 [9405498] Spam Checks completed.
[2026.10.30] 17:43:11.312 [9405498] Removed from SpamCheckQueue (0 queued or processing)
[2026.10.30] 17:43:17.250 [9405498] Added to RemoteDeliveryQueue (1 queued; 0/50 processing)
[2026.10.30] 17:43:17.250 [9405498] [RemoteDeliveryQueue] Begin Processing.
[2026.10.30] 17:43:17.251 [9405498] Sending remote XXXXXXX@XXXXXXXX 
[2026.10.30] 17:43:17.252 [9405498] MXRecord count: '4' for domain 'XXXXX.XXX'
[2026.10.30] 17:43:17.252 [9405498] Attempting MXRecord Host Name: 'mail.ciberloja.com', preference '10', Ip Count: '1'
[2026.10.30] 17:43:17.252 [9405498] Attempting to send to MXRecord 'mail.ciberloja.com' ip: 'YYY.YYY.YY.YY'
[2026.10.30] 17:43:17.252 [9405498] Sending remote mail to: XXXXXXX@XXXXXXXX 
[2026.10.30] 17:43:17.252 [9405498] Initiating connection to YYY.YYY.YY.YY
[2026.10.30] 17:43:17.252 [9405498] Connecting to YYY.YYY.YY.YY (Id: 1)
[2026.10.30] 17:43:17.289 [9405498] Connection to YYY.YYY.YY.YY from YYY.YYY.YY.YY:41906 succeeded (Id: 1)
[2026.10.30] 17:43:17.349 [9405498] RSP: 220 mail.ciberloja.com - Sending unsolicited commercial or bulk e-mail is prohibited.
[2026.10.30] 17:43:17.349 [9405498] CMD: EHLO ns9.ciberloja.com
[2026.10.30] 17:43:17.410 [9405498] RSP: 250-ns5.ciberloja.com Hello [YYY.YYY.YY.YY]
[2026.10.30] 17:43:17.410 [9405498] RSP: 250-SIZE 81920000
[2026.10.30] 17:43:17.410 [9405498] RSP: 250-STARTTLS
[2026.10.30] 17:43:17.410 [9405498] RSP: 250-8BITMIME
[2026.10.30] 17:43:17.410 [9405498] RSP: 250-SMTPUTF8
[2026.10.30] 17:43:17.410 [9405498] RSP: 250-DSN
[2026.10.30] 17:43:17.410 [9405498] RSP: 250 OK
[2026.10.30] 17:43:17.410 [9405498] CMD: STARTTLS
[2026.10.30] 17:43:17.470 [9405498] RSP: 220 Start TLS negotiation
[2026.10.30] 17:43:17.621 [9405498] CMD: EHLO ns9.ciberloja.com
[2026.10.30] 17:43:17.682 [9405498] RSP: 250-ns5.ciberloja.com Hello [YYY.YYY.YY.YY]
[2026.10.30] 17:43:17.682 [9405498] RSP: 250-SIZE 81920000
[2026.10.30] 17:43:17.682 [9405498] RSP: 250-AUTH PLAIN LOGIN CRAM-MD5
[2026.10.30] 17:43:17.682 [9405498] RSP: 250-8BITMIME
[2026.10.30] 17:43:17.682 [9405498] RSP: 250-SMTPUTF8
[2026.10.30] 17:43:17.682 [9405498] RSP: 250-DSN
[2026.10.30] 17:43:17.682 [9405498] RSP: 250 OK
[2026.10.30] 17:43:17.682 [9405498] CMD: MAIL FROM:XXXXXXX@XXXXXXXX  BODY=8BITMIME RET=HDRS ENVID=ac374e9e-479d-432d-824a-5fcffddae122 SIZE=30111
[2026.10.30] 17:43:17.743 [9405498] RSP: 250 OK XXXXXXX@XXXXXXXX  Sender ok
[2026.10.30] 17:43:17.743 [9405498] CMD: RCPT TO: XXXXXXX@XXXXXXXX  NOTIFY=FAILURE
[2026.10.30] 17:43:17.803 [9405498] RSP: 250 OK XXXXXXX@XXXXXXXX  Recipient ok
[2026.10.30] 17:43:17.803 [9405498] CMD: DATA
[2026.10.30] 17:43:17.864 [9405498] RSP: 354 Start mail input; end with <CRLF>.<CRLF>
[2026.10.30] 17:43:18.742 [9405498] RSP: 250 OK
[2026.10.30] 17:43:18.742 [9405498] CMD: QUIT
[2026.10.30] 17:43:18.803 [9405498] RSP: 221 OK
[2026.10.30] 17:43:18.803 [9405498] Attempt to ip, 'YYY.YYY.YY.YY' success: 'True'
[2026.10.30] 17:43:18.804 [9405498] Process delivery status notification step from recipient success. Recipient: [XXXXXXX@XXXXXXXX], Notify: [], LastError: [], RanDomainFilter: [False], RanGlobalFilter: False
[2026.10.30] 17:43:18.804 [9405498] Delivery for XXXXXXX@XXXXXXXX  to XXXXXXX@XXXXXXXX has completed (Delivered)
[2026.10.30] 17:43:18.804 [9405498] Removed from RemoteDeliveryQueue (0 queued or processing)
[2026.10.30] 17:43:20.253 [9405498] Removing Spool message: Killed: False, Failed: False, Finished: True
[2026.10.30] 17:43:20.253 [9405498] Delivery finished for XXXXXXX@XXXXXXXX at 17:43:20    [id:9405498]

Smartermail Destination Server LOG Example :

[2026.10.30] 17:43:20.622 [51855089] Delivery started for XXXXXXX@XXXXXXXX at 17:43:20
[2026.10.30] 17:43:29.659 [51855089] Added to SpamCheckQueue (1 queued; 0/30 processing)
[2026.10.30] 17:43:29.659 [51855089] [SpamCheckQueue] Begin Processing.
[2026.10.30] 17:43:29.659 [51855089] Blocked Sender Checks started.
[2026.10.30] 17:43:29.660 [51855089] Blocked Sender Checks completed.
[2026.10.30] 17:43:29.745 [51855089] Spam Checks started.
[2026.10.30] 17:43:29.799 [51855089] [MessageSniffer Client] Start Scanning Message. Enabled Services: True, MailFrom: XXXXXXX@XXXXXXXX, SenderIP: YYY.YYY.YY.YY, MessagePath: Z:/Spool/SubSpool8/151855089.eml
[2026.10.30] 17:43:30.924 [51855089] [MessageSniffer Client] Done Scanning Message. MessagePath: Z:/Spool/SubSpool8/151855089.eml Results AS: 0
[2026.10.30] 17:43:31.131 [51855089] Spam Check results: [_DMARC: 0,passed], [REVERSE DNS LOOKUP: 0,Passed], [NULL SENDER: 0,passed], [_MESSAGESNIFFER: 0,code:0], [_INTERNALSPAMASSASSIN: 1,9:3], [_SPF: 0,Pass], [_DKIM: 0,Pass], [_ARC: none], [BACKSCATTER: 0], [BARRACUDA: 0], [SEM - BLACK: 0], [SPAMHAUS: 0], [TRUNCATE: 0], [SPAMCOP: 0], [UCEPROTECT LEVEL 2: 0], [SURRIEL: 0], [UCEPROTECT LEVEL 1: 0], [HOSTKARMA: 0], [URIBL BLACK: 0], [SEM-URI: 0]
[2026.10.30] 17:43:31.131 [51855089] Spam Checks completed.
[2026.10.30] 17:43:31.131 [51855089] Removed from SpamCheckQueue (0 queued or processing)
[2026.10.30] 17:43:32.675 [51855089] Added to LocalDeliveryQueue (1 queued; 0/100 processing)
[2026.10.30] 17:43:32.675 [51855089] [LocalDeliveryQueue] Begin Processing.
[2026.10.30] 17:43:32.906 [51855089] Starting local delivery to XXXXXXX@XXXXXXXX
[2026.10.30] 17:43:32.907 [SpamFoo Client] [51855089] Start Scanning Message. MailFrom: XXXXXXX@XXXXXXXX, SenderIP: YYY.YYY.YY.YY, MessagePath: Z:/Spool/SubSpool8/151855089.eml
[2026.10.30] 17:43:33.436 [SpamFoo Client] [51855089] Done Scanning Message. MessagePath: Z:/Spool/SubSpool8/151855089.eml IsSpam: False, Probability: 49.1 %, Classification: primary, TextScore: 0.14, MetaScore: 0.63, ConfidenceMargin: 0.01, Entropy: 0.69, Disagreement: 0.49, ShouldEscalate: True, Tabs Probabilities: [0.51,0.49,0.00,0.00]
[2026.10.30] 17:43:33.452 [51855089] External Sender: Prepending text to message body.
[2026.10.30] 17:43:33.469 [51855089] Message saved to MailProcessing directory for XXXXXXX@XXXXXXXX. File name: 51855089-1580008-NOID.tmpmsg
[2026.10.30] 17:43:33.470 [51855089] Process delivery status notification step from local recipient success. Recipient: [XXXXXXX@XXXXXXXX], Notify: [failure], Delivered: [True], Forwarded: [False], Deleted: False
[2026.10.30] 17:43:33.470 [51855089] Delivery for XXXXXXX@XXXXXXXX to XXXXXXX@XXXXXXXX has completed (Delivered) Filter: None
[2026.10.30] 17:43:33.470 [51855089] End delivery to XXXXXXX@XXXXXXXX (MessageID: <XXXXXXX@XXXXXXXX>)
[2026.10.30] 17:43:33.470 [51855089] Removed from LocalDeliveryQueue (0 queued or processing)
[2026.10.30] 17:43:35.689 [51855089] Removing Spool message: Killed: False, Failed: False, Finished: True
[2026.10.30] 17:43:35.689 [51855089] Delivery finished for XXXXXXX@XXXXXXXX at 17:43:35    [id:151855089]
MattyT Replied
Hello, Manuel. My results differ significantly from yours:

[2026.10.30] 00:43:46.979 [22658384] Delivery started for 13443-13862-2754-1840-<redacted>.com@mail.joyllif.shop at 12:43:46 AM
[2026.10.30] 00:43:49.988 [22658384] Added to SpamCheckQueue (1 queued; 0/30 processing)
[2026.10.30] 00:43:49.988 [22658384] [SpamCheckQueue] Begin Processing.
[2026.10.30] 00:43:49.989 [22658384] Blocked Sender Checks started.
[2026.10.30] 00:43:50.048 [22658384] Spam Checks started.
[2026.10.30] 00:43:50.212 [22658384] Finished running spam checks. Time (non-rbls): 99ms, Time (URIBL/RBLS): 62ms
[2026.10.30] 00:43:50.213 [22658384] Spam Check results: [REVERSE DNS LOOKUP: 0,Passed], [SEM - BLACK: 10], [SPAMHAUS: 10], [SPAMCOP: 5], [BACKSCATTER: 0], [TRUNCATE: 0], [SURRIEL: 10], [UCEPROTECT LEVEL 1: 5], [BARRACUDA: 5], [UCEPROTECT LEVEL 2: 0], [HOSTKARMA: 0], [_DMARC: 0,none], [NULL SENDER: 0,passed], [_INTERNALSPAMASSASSIN: 5.3:8], [_SPF: 15,None], [_DKIM: 5,None], [_ARC: none], [URIBL BLACK: 0], [SEM-URI: 0]
[2026.10.30] 00:43:50.213 [22658384] Spam Checks completed.
[2026.10.30] 00:43:50.213 [22658384] Removed from SpamCheckQueue (0 queued or processing)
[2026.10.30] 00:43:56.012 [22658384] Added to RemoteDeliveryQueue (0 queued; 1/50 processing)
[2026.10.30] 00:43:56.012 [22658384] [RemoteDeliveryQueue] Begin Processing.
[2026.10.30] 00:43:56.013 [22658384] Sending remote mail from 13443-13862-2754-1840-<redacted>.com@mail.joyllif.shop
[2026.10.30] 00:43:56.013 [22658384] This message is not being delivered to <redacted>.com due to an inbound gateway's spam settings. Weight: 73
[2026.10.30] 00:43:56.015 [22658384] Process delivery status notification step from recipient success. Recipient: [<redacted>], Notify: [], LastError: [550 This message cannot be delivered as it was marked as spam.], RanDomainFilter: [False], RanGlobalFilter: False
[2026.10.30] 00:43:56.015 [22658384] Delivery for 13443-13862-2754-1840-<redacted>.com@mail.joyllif.shop to <redacted>.com has completed (Bounced)
[2026.10.30] 00:43:56.015 [22658384] Removed from RemoteDeliveryQueue (0 queued or processing)
[2026.10.30] 00:43:59.021 [22658384] Removing Spool message: Killed: False, Failed: False, Finished: True
[2026.10.30] 00:43:59.021 [22658384] Delivery finished for 13443-13862-2754-1840-<redacted>.com@mail.joyllif.shop at 12:43:59 AM    [id:22658384]

But, as you wrote, I don't see any Spamfoo scoring in there.
Manuel Martins Replied
Hi MattyT,

I have "Spam Checks" disabled on the Inbound Gateway Backup MX, don't remeber why... in the past I opted to put that option Off...

I'm going to try with "Spam Check" ON and then let you know the results.
Douglas Foster Replied
Spam Filtering works well on an incoming gateway.   Outbound SMTP filtering checks can be applied to the messages, including Quarantine disposition.  .  To my mind, it is also the best place to perform most spam checks, because there is a huge difference in trust and risk between messages from random senders on the internet and messages from authenticated local users.   

Local users are presumed trustworthy when given an account.  They are also auditable and accountable for how they use that account.   Rogue users and compromised accounts may occur, but they are very difficult to detect in real time when they occur.   I consider it so difficult that I do not perform any spam filtering on my post office server.

Using Spamfoo on an incoming gateway has minor technical considerations and significant administrative issues.    In the normal configuration, Spamfoo blocks nothing, but instead folder routes messages to one of two folders.  The user has delegated responsibility for producing feedback data, but the feedback only affects that user, so judgements have limited effect whether correct or incorrect.   (Cumulative feedback does eventually affect the global model.)   It is possible to use Spamfoo to enforce a filtering policy at the domain or system level, and use its results to quarantine or block suspicious messages.   For this to work, you need someone with authority, expertise, data, and time to make judgements about blocked messages that should have been allowed and allowed messages that should have been blocked.   Those judgements are only useful if they can be matched to original EML files so that the EML can be sent to Spamfoo as feedback.   The API calls are pretty simple, but the feedback collection process is tricky.  It can be done and I have done it. 

Reply to Thread

Enter the verification text