[pmg-devel] [PATCH pmg-api] utils: finalize_report: fix encoding for plain-text parts
Dominik Csapak
d.csapak at proxmox.com
Fri Jan 23 11:46:10 CET 2026
though i didn't test this, the change looks good
and makes sense when reading the MIME::Entity docs and
the linked RFC
Reviewed-by: Dominik Csapak <d.csapak at proxmox.com>
On 1/23/26 10:40 AM, Stoiko Ivanov wrote:
> the syntax for 8-bit encoding in the content-transfer-encoding is
> '8bit' not '8-bit' - see RFC2045:
> https://www.ietf.org/rfc/rfc2045.html#section-6
>
> We did set the correct value when generating bounces in SMTP.pm (the
> only other (non-comment) match for '8-?bit' in the pmg-api sources).
>
> Noticed this while checking why listmonk[0] stumbled on some bounce
> mails - it was the spam-reports in the mailbox.
>
> Minimally tested by comparing the output of:
> `pmgqm send --receiver xxx at test.domain --debug1`
> without and with the patch applied.
>
> [0] application for newsletter mailing lists
> https://github.com/knadh/listmonk
> Reported-by: Christian Ebner <c.ebner at proxmox.com>
> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
> src/PMG/Utils.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/PMG/Utils.pm b/src/PMG/Utils.pm
> index 52b98c01..b9c645eb 100644
> --- a/src/PMG/Utils.pm
> +++ b/src/PMG/Utils.pm
> @@ -1374,7 +1374,7 @@ sub finalize_report {
> $top->attach(
> Data => $plaintext,
> Type => 'text/plain; charset=utf-8',
> - Encoding => '8-bit',
> + Encoding => '8bit',
> );
> }
> if ($html) {
More information about the pmg-devel
mailing list