]> git.proxmox.com Git - pve-common.git/commitdiff
fix #4162: added `Auto-Submitted` header to email body
authorGabriel Goller <g.goller@proxmox.com>
Tue, 19 Sep 2023 07:35:25 +0000 (09:35 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 6 Nov 2023 17:39:48 +0000 (18:39 +0100)
`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>
src/PVE/Tools.pm

index 569f0cdca0edf96f56c852267b1d34e839a25add..c91e933e0b012e844b53df71172772d1e2a87f16 100644 (file)
@@ -1598,6 +1598,7 @@ sub sendmail {
 
     if (defined($text)) {
        print $mail "Content-Type: text/plain;\n";
+       print $mail "Auto-Submitted: auto-generated;\n";
        print $mail "\tcharset=\"UTF-8\"\n";
        print $mail "Content-Transfer-Encoding: 8bit\n";
        print $mail "\n";
@@ -1613,6 +1614,7 @@ sub sendmail {
 
     if (defined($html)) {
        print $mail "Content-Type: text/html;\n";
+       print $mail "Auto-Submitted: auto-generated;\n";
        print $mail "\tcharset=\"UTF-8\"\n";
        print $mail "Content-Transfer-Encoding: 8bit\n";
        print $mail "\n";