Ekleog / kannader

A highly configurable async SMTP server written in Rust
GNU Affero General Public License v3.0
61 stars 4 forks source link

Allow configuration to change the message #110

Open Ekleog opened 3 years ago

Ekleog commented 3 years ago

Idea: in the queue-stored user metadata, store Vec<Range | String>, where Range means “reuse a data range from the source message” and String “use this constant data”.

Then, when re-emitting the message, this will allow sending changed data.

The point of this scheme compared to just editing the message directly on-disk is, it works well when there are multiple recipients that each need their own changes, in that it avoids copying the whole message for each recipient (though, in exchange, it does have to store the constant data for each recipient, which means that when the message should be modified in the same way for many recipients it may end up consuming more disk space).