Comments (16)
Might be an issue on my side; using TEXT
column (UTF-8 default) with SQLite for storing converted mimeTree
as JSON stringified.
from wildduck.
Only seems to happen with a period followed by two spaces and then another character. E.g. "Foo. Yeah. Bar"
from wildduck.
Seems like it's only on our side when fetching. Localized issue, not WildDuck related.
from wildduck.
Re-opening for now, it appears to happen if you do this and transfer between multiple folders. For example, create a draft, send it, and then transfer it from Sent Mail to Inbox, and vice-versa, a few times. The message is stored the same, but it's rendering wrong when being FETCH'd it appears. Not sure exactly what the culprit could be.... 🤦
from wildduck.
Seems like this is directly related http://forums.mozillazine.org/viewtopic.php?p=14792984#p14792984
from wildduck.
@andris9 in conclusion - I feel like this is a WildDuck-specific and Thunderbird-specific issue, When I check the message, it is stored correctly, but the issue above in screenshots with unicode replacement character (?) being inserted only happens when you move a message between folder.
from wildduck.
Another related issue https://bugzilla.mozilla.org/show_bug.cgi?id=1435903 (maybe related to smtp-server
)
from wildduck.
Okay after much research, this appears to be a smtp-server
issue. I've tried setting hide8BITMIME: true
but that hasn't worked yet. Just wanted to update you that this is not WildDuck specific.
from wildduck.
Somewhat at a loss here as to how to fix this @andris9 - not sure if you have any ideas. If you have a Buffer stored with 8-bit encoding and then it gets passed to rebuild
of WildDuck's indexer, it gets sent over FETCH with incorrect encoding (and subsequently gets rendered wrong in email clients, e.g. Thunderbird).
from wildduck.
I'm wondering if it's because we're using compile
vs compileStream
.
const stream = imapHandler.compileStream(data);
session.writeStream.write(stream);
/*
const compiled = imapHandler.compiler(data);
// `compiled` is a 'binary' string
totalBytes += compiled.length;
if (instance?.constructor?.name === 'IMAP') {
session.writeStream.write({ compiled });
} else {
writeStream.push({ compiled });
}
*/
Sorry for all the spam.
from wildduck.
Do we need to store the message using iconv-lite or something instead of storing as a raw buffer? We're not doing anything out of the ordinary, just storing the stream inbound as a buffer (SMTP) and then using existing rebuild()
function from WildDuck. 🤦 🤦
from wildduck.
@andris9 this actually appears to be a core bug in WildDuck!!!!
const stream = imapHandler.compileStream(data);
// eslint-disable-next-line no-await-in-loop
const compiled = await getStream.buffer(stream);
totalBytes += compiled.length;
session.writeStream.write({ compiled: compiled.toString('binary') });
// session.writeStream.write({ compiled });
/*
const compiled = imapHandler.compiler(data);
// `compiled` is a 'binary' string
totalBytes += compiled.length;
if (instance?.constructor?.name === 'IMAP') {
session.writeStream.write({ compiled });
} else {
writeStream.push({ compiled });
}
*/
This code works. Something in imapHandler.compiler
isn't returning the right binary
string. I ended up using compileStream
instead of compiler
and then called it with toString('binary')
. I think it's by default converting to a UTF-8 string somewhere (which is Buffer.toString default). Not exactly sure where.
Another issue I found was this, which most likely needs to be changed as such:
wildduck/imap-core/lib/imap-composer.js
Line 63 in fd98244
- this.push(Buffer.from(compiled + '\r\n', 'binary'));
+ this.push(compiled);
+ this.push('\r\n');
from wildduck.
@andris9 can we please release v1.41.0 to npm? this was a core bug, thank you 🙏
from wildduck.
@andris9 it appears that this is still an issue, using latest v1.41.0 and still having this same encoding issue
from wildduck.
See titanism@a8fbe83#commitcomment-134660563
from wildduck.
Related Issues (20)
- Feature: `onConnect` handler (similar to `smtp-server`)
- Bug: `tls` now supports `dhparam: 'auto'` HOT 4
- Bug: WildDuck does not handle unauthenticated state properly with Thunderbird (and possibly other mail clients) HOT 1
- Bug: Duplicate Message-ID's can be appended to same mailbox path (unlike Gmail which detects Message-ID) HOT 3
- Bug: `CHECK` command not working properly (should not error if authenticated) HOT 5
- Bug: `CLOSE` not allowed now (shouldn't it just return normally even if not selected?) HOT 2
- Bug: Case for `date` for `term.key` missing in `onSearch` function HOT 8
- Docs: `CHARSET` not supported in search (should we add to docs?) HOT 5
- Bug: Messages being saved to drafts folder do not get rendered in mail clients due to ignored message HOT 2
- Bug: mimeTree rebuilding does not join boundaries by a line break delimiter (e.g. `\r\n`) HOT 6
- Mail thread HOT 4
- What are all the steps needed to config WildDuck'a API to use X-Access-Token? HOT 18
- install script is installing wildduck 1.39.14 HOT 1
- Feat: Thoughts on `encryptMessageAsync` also adding an attachment of `public-key.pgp.asc`? HOT 1
- GET /users/{user}/search or.query parameter bug HOT 1
- Bug: Odd edge case bug `TypeError: Cannot set properties of null (setting 'user')` HOT 2
- Updating/Upgrading existing server HOT 2
- SCRAM-SHA-1(-PLUS) + SCRAM-SHA-256(-PLUS) + SCRAM-SHA-512(-PLUS) + SCRAM-SHA3-512(-PLUS) supports HOT 1
- Moving OLD unsecure mechanisms to Historic HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wildduck.