Self-adding contact to group during blocking SMTP relay leads to false report that member has been added
-
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.
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:
- you are [email protected] and there is [email protected]
- [email protected] deleted his account or it was just an alias and got changed
- you remove [email protected] from the group, since [email protected] is in your same server, SMTP server immediately rejects to send the message
- if DC reverts the group change in this case, the group will be broken forever for you, only people from other servers will be able to remove [email protected] and in the meantime you can't send any message to the group.
@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.
Note that new membership update protocol #4185 has been merged recently.
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.
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.