Hello,
We use an outgoing gateway for filtering/analysis of outgoing mails but we had to disable it.
When an outgoing gateway is used automatic forwarding fails (it doesn't even try to connect to the gateway).
Here is the delivery log of the auto forwarding attempt to an external e-mail address through a gateway:
I think the "interresting" part is:
[2019.12.23] 23:12:06.248 [41016] Object reference not set to an instance of an object.
[2019.12.23] at MailService.RelayServer.RemoteDeliverySession.SendBatchedEmails(List`1 batchList, Domain senderDomain)
Full log:
[2019.12.23] 23:12:03.233 [57003] Delivery started for forwarder@domain.tld at 23:12:03
[2019.12.23] 23:12:06.248 [57003] Added to SpamCheckQueue (1 queued; 0/60 processing)
[2019.12.23] 23:12:06.248 [57003] [SpamCheckQueue] Begin Processing.
[2019.12.23] 23:12:06.248 [41016] Added to RemoteDeliveryQueue (1 queued; 0/100 processing)
[2019.12.23] 23:12:06.248 [41016] [RemoteDeliveryQueue] Begin Processing.
[2019.12.23] 23:12:06.248 [41016] Sending remote mail for forwarder@domain.tld
[2019.12.23] 23:12:06.248 [57003] Starting Spam Checks.
[2019.12.23] 23:12:06.248 [41016] Spam check results:
[2019.12.23] 23:12:06.248 [41016] Object reference not set to an instance of an object.
[2019.12.23] at MailService.RelayServer.RemoteDeliverySession.SendBatchedEmails(List`1 batchList, Domain senderDomain)
[2019.12.23] 23:12:06.248 [41016] Removed from RemoteDeliveryQueue (0 queued or processing)
[2019.12.23] 23:12:06.405 [57003] Spam check results: [_CUSTOMRULES: MG-01: 2;]
[2019.12.23] 23:12:06.405 [57003] Spam Checks completed.
[2019.12.23] 23:12:06.405 [57003] Removed from SpamCheckQueue (0 queued or processing)
[2019.12.23] 23:12:09.258 [57003] Added to LocalDeliveryQueue (1 queued; 0/60 processing)
[2019.12.23] 23:12:09.258 [57003] [LocalDeliveryQueue] Begin Processing.
[2019.12.23] 23:12:09.274 [57003] Starting local delivery to remote.recipient@domain.tld
[2019.12.23] 23:12:09.399 [57003] Delivery for forwarder@domain.tld to remote.recipient@domain.tld has completed (Forwarded Delivered) Filter: None
[2019.12.23] 23:12:09.399 [57003] End delivery toremote.recipient@domain.tld (MessageID: <ema6906bd5-9f1c-4a28-83bb-9452f56bb0d6@joshua>)
[2019.12.23] 23:12:09.415 [57003] Removed from LocalDeliveryQueue (0 queued or processing)
---
Additionnaly, and this is a bug we have a ticket open for since 2-3 months, when using an outgoing gateway, smatermail always appends NOTIFY=NEVER to the RCPT TO lines, and therefore the gateway won't send back any NDR if the mail can't be delivered to it's final destination.
This is a huge problem because our customers don't get NDR when they send mail to bug adresses or if it failed for any other reason.