From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 11B031FF183 for ; Wed, 8 Oct 2025 10:50:59 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 791C220D8; Wed, 8 Oct 2025 10:51:04 +0200 (CEST) From: Shannon Sterz To: pbs-devel@lists.proxmox.com Date: Wed, 8 Oct 2025 10:50:24 +0200 Message-ID: <20251008085029.63335-3-s.sterz@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251008085029.63335-1-s.sterz@proxmox.com> References: <20251008084906.62427-1-s.sterz@proxmox.com> <20251008085029.63335-1-s.sterz@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1759913401271 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.056 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox 3/4] sendmail: break content disposition headers for attachments X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" this should make it easier to accomodate longer filenames, as line lengths in emails are constraint. Signed-off-by: Shannon Sterz --- proxmox-sendmail/src/lib.rs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/proxmox-sendmail/src/lib.rs b/proxmox-sendmail/src/lib.rs index fb201007..1c5daf0f 100644 --- a/proxmox-sendmail/src/lib.rs +++ b/proxmox-sendmail/src/lib.rs @@ -115,7 +115,7 @@ impl Attachment<'_> { // both `filename` and `filename*` are included for additional compatability let _ = writeln!( attachment, - "Content-Disposition: attachment; filename=\"{encoded_filename}\"; filename*=UTF-8''{}", + "Content-Disposition: attachment; filename=\"{encoded_filename}\";\n\tfilename*=UTF-8''{}", utf8_percent_encode(&self.filename, RFC5987SET) ); @@ -751,7 +751,8 @@ Lorem Ipsum Dolor Sit Amet ------_=_NextPart_001_1732806251 Content-Type: application/octet-stream; name="deadbeef.bin" -Content-Disposition: attachment; filename="deadbeef.bin"; filename*=UTF-8''deadbeef.bin +Content-Disposition: attachment; filename="deadbeef.bin"; + filename*=UTF-8''deadbeef.bin Content-Transfer-Encoding: base64 3q2+796tvu/erb7v3q3erb7v3q2+796tvu/erd6tvu/erb7v3q2+796t3q2+796tvu/erb7v @@ -820,14 +821,16 @@ Content-Transfer-Encoding: 7bit ------_=_NextPart_002_1732806251-- ------_=_NextPart_001_1732806251 Content-Type: application/octet-stream; name="deadbeef.bin" -Content-Disposition: attachment; filename="deadbeef.bin"; filename*=UTF-8''deadbeef.bin +Content-Disposition: attachment; filename="deadbeef.bin"; + filename*=UTF-8''deadbeef.bin Content-Transfer-Encoding: base64 3q2+796tvu/erb7v3q3erb7v3q2+796tvu/erd6tvu/erb7v3q2+796t3q2+796tvu/erb7v 3q2+796tvu8= ------_=_NextPart_001_1732806251 Content-Type: image/bmp; name="=?utf-8?B?8J+QhPCfkoAuYmlu?=" -Content-Disposition: attachment; filename="=?utf-8?B?8J+QhPCfkoAuYmlu?="; filename*=UTF-8''%F0%9F%90%84%F0%9F%92%80.bin +Content-Disposition: attachment; filename="=?utf-8?B?8J+QhPCfkoAuYmlu?="; + filename*=UTF-8''%F0%9F%90%84%F0%9F%92%80.bin Content-Transfer-Encoding: base64 3q2+796tvu/erb7v3q3erb7v3q2+796tvu/erd6tvu/erb7v3q2+796t3q2+796tvu/erb7v @@ -936,14 +939,16 @@ SXBzdW0gRMO2bG9yIFNpdCBBbWV0Cgk8L3ByZT4KPC9ib2R5PjwvaHRtbD4= ------_=_NextPart_002_1732806251-- ------_=_NextPart_001_1732806251 Content-Type: application/octet-stream; name="deadbeef.bin" -Content-Disposition: attachment; filename="deadbeef.bin"; filename*=UTF-8''deadbeef.bin +Content-Disposition: attachment; filename="deadbeef.bin"; + filename*=UTF-8''deadbeef.bin Content-Transfer-Encoding: base64 3q2+796tvu/erb7v3q3erb7v3q2+796tvu/erd6tvu/erb7v3q2+796t3q2+796tvu/erb7v 3q2+796tvu8= ------_=_NextPart_001_1732806251 Content-Type: image/bmp; name="=?utf-8?B?8J+QhPCfkoAuYmlu?=" -Content-Disposition: attachment; filename="=?utf-8?B?8J+QhPCfkoAuYmlu?="; filename*=UTF-8''%F0%9F%90%84%F0%9F%92%80.bin +Content-Disposition: attachment; filename="=?utf-8?B?8J+QhPCfkoAuYmlu?="; + filename*=UTF-8''%F0%9F%90%84%F0%9F%92%80.bin Content-Transfer-Encoding: base64 3q2+796tvu/erb7v3q3erb7v3q2+796tvu/erd6tvu/erb7v3q2+796t3q2+796tvu/erb7v -- 2.47.3 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel