From: "Shannon Sterz" <s.sterz@proxmox.com>
To: "Nicolas Frey" <n.frey@proxmox.com>, <pve-devel@lists.proxmox.com>
Subject: Re: [PATCH proxmox 1/1] sendmail: add additional header map
Date: Tue, 16 Jun 2026 11:26:17 +0200 [thread overview]
Message-ID: <DJAD6XJVNSDI.1H2UU002C1QID@proxmox.com> (raw)
In-Reply-To: <16fb3b78-3c77-4567-a09d-f4106c372533@proxmox.com>
On Mon Jun 15, 2026 at 4:01 PM CEST, Nicolas Frey wrote:
>
>
> On 6/15/26 3:20 PM, Shannon Sterz wrote:
>> On Mon Jun 15, 2026 at 11:20 AM CEST, Nicolas Frey wrote:
>>> with corresponding methods to add them.
>>>
>>
>> generally i like the idea of allowing callers to specify additional
>> headers, but i wonder if this is a bit too lenient. usually, we try to
>> handle all encoding and formatting for the caller here, so we can deal
>> with being in compliance with all rfcs and mail related conventions here
>> instead of all call-sites.
>>
>
> Yeah I think it would be best to restrict in such a way that the
> caller does not really care about encoding/formatting and it's all
> done on the proxmox-sendmail site. Perhaps I should have sent it as an
> RFC, because I was very unsure how lax we wanna be here/who needs to
> deal with encoding/formatting the headers.
maybe, doesn't make too much of a difference now tho ;)
>> also this would allow setting headers that are set by proxmox-sendmail
>> anyway twice. that's probably not ideal either.
>
> I did have a draft where it just removes those already set somewhere
> else, but that felt a bit clunky, so also not ideal
hm that feels like it could easily lead to misunderstanding by the
caller on what takes priority. i don't think that's ideal either.
>>
>> so imo, we should either:
>>
>> * expose at least the formatting helpers here publically so callers can
>> use them.
>> * allow only a limitted set of headers, maybe we an enum. we can then
>> handle formatting for the caller be seeing which enum type was
>> provided
>>
>> what do you think?
>>
>
> My initial goal was to make it so adding additional headers would not
> need another crate bump in the future. Regardless of that, I think a
> limited set of headers could work pretty well. I'll try the enum
> approach and send a V2 if it looks good, thanks!
fair enough. in that case we could consider a "generic" enum variant
that gives the caller no guarantees for formatting or (de-)duplication
as an escape hatch. in that case it is then at least clear to the caller
that they are talking full responsibility for the "correctness" of
adding such a header.
tho i think starting without such an escape hatch and only adding it
once we need it is probably preferable.
next prev parent reply other threads:[~2026-06-16 9:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 9:20 [PATCH proxmox 1/1] sendmail: add additional header map Nicolas Frey
2026-06-15 13:21 ` Shannon Sterz
2026-06-15 14:01 ` Nicolas Frey
2026-06-16 9:26 ` Shannon Sterz [this message]
2026-06-16 9:54 ` superseded: " Nicolas Frey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DJAD6XJVNSDI.1H2UU002C1QID@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=n.frey@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.