Some emails do not arrive without a trace

Issue Description

I’m desperate, need Stalwart operational ASAP. Emails from some senders (for example Gmail) vanish without a trace, never reaching the server.

Expected Behavior

Mails from gmail.com arrive.

Actual Behavior

No error message in Gmail, no trace in inbound logs, mail is nowhere.

Stalwart Version

v0.16.x

Installation Method

Binary (Linux)

Database Backend

RocksDB

Blob Storage

RocksDB

Search Engine

Internal

Directory Backend

Internal

Additional Context

I pass every possible test tool. All kinds of records are in the DNS and correct, even TLSA. Mails from some servers arrive normally.

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

Just based on experience, if your certificate renewed recently. It’s possible your TLSA records are out of date.

Did you verify the hashes match up with current server certificates?

TLSA is made by Stalwart and passes checks. Anyway I’d expect Gmail to report delivery problems - it didn’t yet. Also nothing comes knocking at port 25.

RIP Stalwart, back to Soverin to lick my wounds. Need working email on vacations. I think lot of the blame is on bad choice of hosting provider.

We can’t help much without logs.

Yeah but there were no logs. In the night day’s worth of emails from Gmail arrived. One from another server didn’t, but maybe it just gave up quickly. Not sure what helped, I ripped away all IPv6 infra but maybe the DANE thing is to blame. It needed time to settle (though record propagation was already good yesterday, but maybe Gmail caches things).

Ooops, new emails from Google also go to purgatory and vanish only to maybe reappear after 20 hours. Those that arrive late have normal logs, as if the attempt only happened at that time for the first time.

edit: and now my outbound queue started showing incoming emails? Basically both queues are the same.

If nothing is reaching port 25 there’s no trace for us to read, so the missing mail is almost certainly a reachability problem rather than something inside Stalwart. The two usual suspects, both consistent with mail arriving again after you pulled IPv6: an AAAA record pointing at an address the server isn’t actually listening on (DANE-enforcing senders like Gmail will keep trying the broken target and defer), and a stale DANE TLSA record after a certificate renewal, which makes those same senders silently fail. Worth confirming the TLSA hash matches the cert currently being served, and either fixing the IPv6 listener or removing AAAA entirely.

On the “outbound queue is showing incoming emails” note: that’s expected and unrelated to the delivery problem. A received message that’s delivered to a local mailbox passes through the outbound delivery layer, so it appears in both the inbound and outbound delivery views. It’s the same view-labeling issue I’m already tracking separately; it doesn’t mean the queues are corrupted or that mail is being misrouted.

If you do get a sender stuck again, the queue state for that message plus any connection trace (or confirmation there’s genuinely none) would let me say more.

Will have to try with some less important domain again one day. It’s really hard to switch main mail when you depend on that mail (because you need to destroy DNS config for current provider to even start testing new one). That added to the stress big time.

The strangest part was when the mails finally arrived and I sent new one expecting immediate delivery but it got stuck in the same way.

All the online checks for DNS records were working so I didn’t expect such big problems. Next time I will make sure inbound ipv6 (outbound was definitely ok) works before even starting with Stalwart.