unable to send email to self #2705
Replies: 3 comments 5 replies
-
|
This looks like a configuration issue. Set the log level to |
Beta Was this translation helpful? Give feedback.
-
|
This is not a configuration issue — it's a bug in the message deduplication logic during local delivery. Root CauseWhen sending an email to yourself via JMAP (
At step 4, if !cache
.in_mailboxes(&[INBOX_ID, JUNK_ID])
.any(|m| thread_result.duplicate_ids.contains(&m.document_id))
{
// silently drops the message as "duplicate"
}Since the existing copy is in Sent (not Inbox or Junk), the condition is true and the message is silently dropped. The email never reaches the Inbox. This is why IMAP/SMTP works: Thunderbird copies to Sent after delivery via SMTP submission, so the Message-ID doesn't exist yet during FixThe dedup check should also consider Sent and Drafts mailboxes. If the duplicate exists only in Sent or Drafts, it's a legitimate self-send and should proceed to deliver to Inbox. I have a working fix with a regression test on my fork: Changes:
Happy to open a PR if you'd like to review the code. |
Beta Was this translation helpful? Give feedback.
-
|
@mdecimus I have the fix ready on our fork ( Could you enable PR permissions for the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
When send an email to self (your own id / current account's id ) using JMAP the email doesn't arrive in the inbox. When same is tried with IMAP/SMTP it is successful. I tried thunderbird and it worked, but failed with tmail-web and root-fr/jmap-webmail.
Expected Behavior
Should receive the email.
Actual Behavior
No response
Reproduction Steps
No response
Relevant Log Output
Stalwart Version
v0.15.x
Installation Method
Binary (Linux)
Database Backend
RocksDB
Blob Storage
RocksDB
Search Engine
Internal
Directory Backend
Internal
Additional Context
No response
I acknowledge that:
traceand included relevant log output if applicable.Beta Was this translation helpful? Give feedback.
All reactions