Messages without From field are not trashed
Here UNKNOWN contact should probably be treated as blocked: https://github.com/deltachat/deltachat-core-rust/blob/7bcb03f1eca2114f8a387b03f60abdf31c7e988b/src/dc_receive_imf.rs#L392
Shouldn't this maybe even return an Err since from_field_to_contact_id sole purpose is to get a valid contactId which in fact is impossible without a from-field?
All the call sites of from_field_to_contact_id just propagate the Err up pretty far using ?, which means that fetching any emails will be cancelled and re-tried if we do that.
Also see https://github.com/deltachat/deltachat-core-rust/blob/8feae69fa49745a04ee48b048c610715f4ebcd97/src/receive_imf.rs#L78-L86
Edit: BTW, thanks for going through the old issues :))
Nice, that comment you linked makes it a lot clearer thank you!
We could still return an Err though and map it to an Some(None) in reaceive_imf.rs. It would make clearer that the returned value of from_field_to_contact_id is never used again which wasn't clear for me before. This is totally optional though because the function is not part of any public api and instead only used internally.
Regarding me going through old issues, I looked em through to the last page and still have some issues bookmarked which I will bring up as soon as I finish the other stuff.
Fixed by https://github.com/deltachat/deltachat-core-rust/pull/3667