public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH common] fix #4162: added `Auto-Submitted` header to email body
@ 2023-08-28  8:51 Gabriel Goller
  2023-08-28  9:20 ` Lukas Wagner
  0 siblings, 1 reply; 5+ messages in thread
From: Gabriel Goller @ 2023-08-28  8:51 UTC (permalink / raw)
  To: pve-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>
---
 src/PVE/Tools.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
index 9ffac12..5b5d72c 100644
--- a/src/PVE/Tools.pm
+++ b/src/PVE/Tools.pm
@@ -1603,6 +1603,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";
-- 
2.39.2





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] [PATCH common] fix #4162: added `Auto-Submitted` header to email body
  2023-08-28  8:51 [pve-devel] [PATCH common] fix #4162: added `Auto-Submitted` header to email body Gabriel Goller
@ 2023-08-28  9:20 ` Lukas Wagner
  2023-08-28  9:30   ` Gabriel Goller
  0 siblings, 1 reply; 5+ messages in thread
From: Lukas Wagner @ 2023-08-28  9:20 UTC (permalink / raw)
  To: Proxmox VE development discussion, Gabriel Goller



On 8/28/23 10:51, Gabriel Goller wrote:
> diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
> index 9ffac12..5b5d72c 100644
> --- a/src/PVE/Tools.pm
> +++ b/src/PVE/Tools.pm
> @@ -1603,6 +1603,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";

Just as a side-note: Since my notification patches have been merged a 
week or two ago, PVE does not actually use PVE::Tools::sendmail any 
more. Instead, it uses the equivalent Rust implementation of that 
function from `proxmox_sys::mail::sendmail`.

It would make sense to include this change there as well, then we have 
all products covered (PMG uses the Perl impl, PBS and PVE use the Rust 
impl).

Apart from that: From briefly skimming through the RFC the change makes 
sense, so consider this:

Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>

-- 
- Lukas




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] [PATCH common] fix #4162: added `Auto-Submitted` header to email body
  2023-08-28  9:20 ` Lukas Wagner
@ 2023-08-28  9:30   ` Gabriel Goller
  2023-08-28  9:33     ` Lukas Wagner
  0 siblings, 1 reply; 5+ messages in thread
From: Gabriel Goller @ 2023-08-28  9:30 UTC (permalink / raw)
  To: Lukas Wagner, Proxmox VE development discussion

On 8/28/23 11:20, Lukas Wagner wrote:
> On 8/28/23 10:51, Gabriel Goller wrote:
>> diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
>> index 9ffac12..5b5d72c 100644
>> --- a/src/PVE/Tools.pm
>> +++ b/src/PVE/Tools.pm
>> @@ -1603,6 +1603,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";
>
> Just as a side-note: Since my notification patches have been merged a 
> week or two ago, PVE does not actually use PVE::Tools::sendmail any 
> more. Instead, it uses the equivalent Rust implementation of that 
> function from `proxmox_sys::mail::sendmail`.
>
> It would make sense to include this change there as well, then we have 
> all products covered (PMG uses the Perl impl, PBS and PVE use the Rust 
> impl).
>
> Apart from that: From briefly skimming through the RFC the change 
> makes sense, so consider this:
>
> Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
>
Already submitted the patch to `proxmox_sys::mail::sendmail` in the 
other mailing list (pbs-devel) :)




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] [PATCH common] fix #4162: added `Auto-Submitted` header to email body
  2023-08-28  9:30   ` Gabriel Goller
@ 2023-08-28  9:33     ` Lukas Wagner
  2023-09-19  7:36       ` Gabriel Goller
  0 siblings, 1 reply; 5+ messages in thread
From: Lukas Wagner @ 2023-08-28  9:33 UTC (permalink / raw)
  To: Gabriel Goller, Proxmox VE development discussion

On 8/28/23 11:30, Gabriel Goller wrote:
>>
> Already submitted the patch to `proxmox_sys::mail::sendmail` in the 
> other mailing list (pbs-devel) :)

Ah yes, I missed that. Nevermind then :)

-- 
- Lukas




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] [PATCH common] fix #4162: added `Auto-Submitted` header to email body
  2023-08-28  9:33     ` Lukas Wagner
@ 2023-09-19  7:36       ` Gabriel Goller
  0 siblings, 0 replies; 5+ messages in thread
From: Gabriel Goller @ 2023-09-19  7:36 UTC (permalink / raw)
  To: Lukas Wagner, Proxmox VE development discussion

Submitted a new patch, missed setting the header on `html` emails.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-19  7:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-28  8:51 [pve-devel] [PATCH common] fix #4162: added `Auto-Submitted` header to email body Gabriel Goller
2023-08-28  9:20 ` Lukas Wagner
2023-08-28  9:30   ` Gabriel Goller
2023-08-28  9:33     ` Lukas Wagner
2023-09-19  7:36       ` Gabriel Goller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal