[GH-ISSUE #608] Emails do not have a message_id #225

Closed
opened 2026-02-27 08:15:58 +03:00 by kerem · 2 comments
Owner

Originally created by @Masgalor on GitHub (Jun 21, 2023).
Original GitHub issue: https://github.com/lldap/lldap/issues/608

I noticed that password-reset-mails sent from my system have a higher spam score as expected.
This is because the mails are missing the message-id header.

Usually it is up to the originating client to add this header.
But many email-providers add it automatically if it is missing, because those mails would very likely get flagged as spam and lower their trust score.

Anyway it would be a good thing to not rely on the mailserver to "repair" the mails for us.

I can not implement it myself but here is how another project which is also using lettre solved it.
Maybe someone can get a PR going.
https://github.com/dani-garcia/vaultwarden/blob/1.28.1/src/mail.rs#L594-L599

References:
https://en.wikipedia.org/wiki/Message-ID
https://docs.rs/lettre/latest/lettre/message/header/struct.MessageId.html

Originally created by @Masgalor on GitHub (Jun 21, 2023). Original GitHub issue: https://github.com/lldap/lldap/issues/608 I noticed that password-reset-mails sent from my system have a higher spam score as expected. This is because the mails are missing the `message-id header`. Usually it is up to the originating client to add this header. But many email-providers add it automatically if it is missing, because those mails would very likely get flagged as spam and lower their trust score. Anyway it would be a good thing to not rely on the mailserver to "repair" the mails for us. I can not implement it myself but here is how another project which is also using `lettre` solved it. Maybe someone can get a PR going. https://github.com/dani-garcia/vaultwarden/blob/1.28.1/src/mail.rs#L594-L599 References: https://en.wikipedia.org/wiki/Message-ID https://docs.rs/lettre/latest/lettre/message/header/struct.MessageId.html
Author
Owner

@SamantaTarun commented on GitHub (Jun 21, 2023):

I'd like to look into this.

<!-- gh-comment-id:1601809485 --> @SamantaTarun commented on GitHub (Jun 21, 2023): I'd like to look into this.
Author
Owner

@nitnelave commented on GitHub (Jun 22, 2023):

Sounds good! Tell me if you need help. And don't hesitate to join the discord server where you can ask a quick question.

<!-- gh-comment-id:1602055305 --> @nitnelave commented on GitHub (Jun 22, 2023): Sounds good! Tell me if you need help. And don't hesitate to join the discord server where you can ask a quick question.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#225
No description provided.