mail-server
mail-server copied to clipboard
[bug]: BCC not working as expected
What happened?
I sent a JMAP request that looked something like:
{
"using": [
"urn:ietf:params:jmap:core",
"urn:ietf:params:jmap:mail",
"urn:ietf:params:jmap:submission"
],
"methodCalls": [
[
"Email/set",
{
"accountId": "d",
"create": {
"draft": {
"from": [
{
"email": "[removed]",
"name": ""
}
],
"to": [
{
"email": "brandon@[domain1]",
"name": ""
}
],
"cc": [
{
"email": "brandon@[domain2]",
"name": ""
}
],
"bcc": [
{
"email": "brandon@[domain3]",
"name": ""
}
],
"subject": "Test11",
"keywords": {
"$draft": true,
"$seen": true
},
"mailboxIds": {
"d": true
},
"bodyValues": {
"body": {
"value": "Test22"
}
},
"bodyStructure": {
"type": "text/plain",
"partId": "body"
}
}
}
},
"c1"
],
[
"EmailSubmission/set",
{
"accountId": "d",
"create": {
"sentEmail": {
"emailId": "#draft",
"identityId": "a"
}
},
"onSuccessUpdateEmail": {
"#sentEmail": {
"keywords/$draft": null,
"keywords/$seen": true,
"mailboxIds/d": null,
"mailboxIds/e": true
}
}
},
"c2"
]
]
}
and getting a normal, successful response.
The problem I'm seeing is that all recipients (which are unrelated email addresses on different, unconnected accounts), are seeing the BCC recipient:
This is what the To: account saw:
This is what the CC'd account saw:
This is what the BCC'd account saw:
Basically, they all saw the same thing, though I'd expect both the To and CC accounts to not see the BCC'd account.
How can we reproduce the problem?
Reproduction is described in the JMAP request above, I don't think there's anything special about my usage of BCC.
I think the relevant part of the JMAP spec is:
The server MUST remove any Bcc header field present on the message during delivery.
Version
v0.6.x or lower
What database are you using?
PostgreSQL
What blob storage are you using?
S3-compatible
Where is your directory located?
Internal
What operating system are you using?
Docker
Relevant log output
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct