core icon indicating copy to clipboard operation
core copied to clipboard

Self-adding contact to group during blocking SMTP relay leads to false report that member has been added

Open gerryfrancis opened this issue 4 years ago • 3 comments

  • Operating System (Linux/Mac/Windows/iOS/Android): Android 10 on Fairphone FP2 (Lineage OS 17.1 build QQ3A.200805.001 from 2021-04-09).

  • Delta Chat Version: 1.17.0 (latest nightly build).

  • Expected behavior: When a contact is selected to be added to a group, and the SMTP relay refuses to deliver the system (broadcasting) message, Delta Chat should not inform the user that the contact has been added and is a group member now ("[User] ([email protected]) added by me.").

  • Actual behavior: Delta Chat informs the user that the contact has been added and is a group member now. This information is false. (The permanent SMTP error is displayed in the message details to know that it was never sent to any group member.)

  • Steps to reproduce the problem: Difficult to reproduce, as you need a refusing (blocking) SMTP relay. The reason my mail provider decided to ban me was that I reached the limit of 1,000 mails per day.

  • Screenshots: N/A.

  • Logs: N/A.

gerryfrancis avatar Apr 15 '21 15:04 gerryfrancis

this is a problem when you leave a group but actually the message was rejected by the SMTP server so never sent, but you are no longer in the group locally when actually you are still in the group for all other the members

a situation where you actually want the changes to take effect even if message failed:

adbenitez avatar Apr 15 '21 15:04 adbenitez

@adbenitez In this case, the group is not broken, because the information "new contact added" was never sent. But I can see that contact as a member of that group, which is wrong. As soon as the permanent SMTP error is recognized, the newly added so-called "member" should be kicked out automatically.

gerryfrancis avatar Apr 15 '21 15:04 gerryfrancis

Note that new membership update protocol #4185 has been merged recently.

link2xt avatar Jul 25 '23 13:07 link2xt

As soon as the permanent SMTP error is recognized, the newly added so-called "member" should be kicked out automatically.

With the current approach to group consistency member is not kicked out automatically, but added on other devices as soon as you successfully send messages again to the chat even if the "member added" message is lost.

link2xt avatar Apr 25 '24 09:04 link2xt

I suggest that we close this by merging https://github.com/deltachat/deltachat-core-rust/pull/5498

We don't try to recognize SMTP errors for group membership. Even if SMTP reports success, it is possible that mail is not delivered, and even if there is an SMTP failure, message may be sent to some users and failure may be related to only one recipient.

link2xt avatar Apr 25 '24 09:04 link2xt