* [pbs-devel] [PATCH proxmox v2] fix #4162: sys: added `auto-submitted` header to email body
@ 2023-09-08 13:06 Gabriel Goller
2023-09-18 14:41 ` [pbs-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Goller @ 2023-09-08 13:06 UTC (permalink / raw)
To: pbs-devel
`Auto-Submitted` is defined in the rfc 5436 [1] and describes how
an automatic response (f.e. ooo replies, etc.) should behave on the
emails. When using `Auto-Submitted: auto-generated` (or any value
other than `none`) automatic replies won't be triggered.
[1]: https://www.rfc-editor.org/rfc/rfc3834.html
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
update v2:
- added doc comment
- included the header in text and html emails
proxmox-sys/src/email.rs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/proxmox-sys/src/email.rs b/proxmox-sys/src/email.rs
index da910d4..8b3a1b6 100644
--- a/proxmox-sys/src/email.rs
+++ b/proxmox-sys/src/email.rs
@@ -7,6 +7,8 @@ use anyhow::{bail, Error};
/// Sends multi-part mail with text and/or html to a list of recipients
///
+/// Includes the header `Auto-Submitted: auto-generated`, so that auto-replies
+/// (i.e. OOO replies) won't trigger.
/// ``sendmail`` is used for sending the mail.
pub fn sendmail(
mailto: &[&str],
@@ -69,6 +71,7 @@ pub fn sendmail(
body.push_str("This is a multi-part message in MIME format.\n");
let _ = write!(body, "\n--{}\n", boundary);
}
+ body.push_str("Auto-Submitted: auto-generated;\n");
if let Some(text) = text {
body.push_str("Content-Type: text/plain;\n");
body.push_str("\tcharset=\"UTF-8\"\n");
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pbs-devel] applied: [PATCH proxmox v2] fix #4162: sys: added `auto-submitted` header to email body
2023-09-08 13:06 [pbs-devel] [PATCH proxmox v2] fix #4162: sys: added `auto-submitted` header to email body Gabriel Goller
@ 2023-09-18 14:41 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2023-09-18 14:41 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Gabriel Goller
Am 08/09/2023 um 15:06 schrieb Gabriel Goller:
> `Auto-Submitted` is defined in the rfc 5436 [1] and describes how
> an automatic response (f.e. ooo replies, etc.) should behave on the
> emails. When using `Auto-Submitted: auto-generated` (or any value
> other than `none`) automatic replies won't be triggered.
>
> [1]: https://www.rfc-editor.org/rfc/rfc3834.html
>
> Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
> ---
>
> update v2:
> - added doc comment
> - included the header in text and html emails
>
> proxmox-sys/src/email.rs | 3 +++
> 1 file changed, 3 insertions(+)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-18 14:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-08 13:06 [pbs-devel] [PATCH proxmox v2] fix #4162: sys: added `auto-submitted` header to email body Gabriel Goller
2023-09-18 14:41 ` [pbs-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal