Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sent messages not stored on Fastmail #62

Open
floorish opened this issue Apr 23, 2020 · 2 comments
Open

Sent messages not stored on Fastmail #62

floorish opened this issue Apr 23, 2020 · 2 comments

Comments

@floorish
Copy link

Every once in a while DejaLu just stops storing sent messages in the Sent folder using a FastMail account. Gmail accounts work fine.

Not sure what triggers this, but it works fine until suddenly all newly created mail I send isn't stored anymore. The message is not visible in Fastmail (webmail) nor in DejaLu. I need to remove the account from DejaLu, create a new account and it works again. The messages are actually send (SMTP), it's just that no copy is stored (IMAP?).

All previously stored & sent mail is kept, it looks like DejaLu just doesn't copy any new sent message on the server.

(In case this bug is unsolvable:)
Fastmail does have a 'Save a copy when sending through third party email clients' setting, which is disabled by default. When enabled typically two duplicate sent messages are stored (one by DejaLu, one by Fastmail) until the above bug occurs. Is there a posibility to prevent DejaLu from copying sent messages at all, so I can rely on the Fastmail setting instead (which should keep working)?

Thanks, still love using the app daily!

@floorish
Copy link
Author

So the messages are stored in local_message with a pushstate of 1 (need push), with a folder id pointing to the Sent folder. So it looks like the messages are ready to be pushed, but are never pushed.

The corresponding row in message shows a filename which points to an eml in the RawMessage folder. This eml is present and contains the message I sent.

The queue.json is empty: {"queue":[]}

When should these local_messages with pushstate = 1 be sent to the server? Looks like they will be retrieved by MailDB::nextMessageToPush
https://github.com/dinhviethoa/dejalu/blob/a8af53f3f83f5dc86f18a268e8169fe8e26873eb/Sources/Backend/hermes/db/HMMailDB.cpp#L1706

@dinhviethoa any ideas?

@floorish
Copy link
Author

Okay, I think I have an idea what is happening. For some reason there are messages in local_message with a pushstate of 1, but they don't have a linked message.

Not sure why that happens, perhaps because I archived these messages before they were completely sent?

Anyway, in MailDB::filenameForRowID it tries to get the filename for that message, but it is missing (since there is no linked message). So MailDB::nextMessageToPush returns NULL. The other local_messages that do have a connected message are not considered anymore.

Dejalu just stops processing that folderID entirely, so it never reaches the still valid local_messages that need to be pushed. So once there is an invalid local_message no new sent message will be pushed to the server.

When the invalid rows are removed from local_messages manually, the app works correctly again and all messages are pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant