From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Stoiko Ivanov <s.ivanov@proxmox.com>, pmg-devel@lists.proxmox.com
Subject: [pmg-devel] applied: [PATCH pmg-api v2] rulesystem: limit linelength of disclaimer to 998 bytes
Date: Thu, 25 Nov 2021 09:28:58 +0100 [thread overview]
Message-ID: <09c3746c-fd81-1bea-748f-d66548d43c80@proxmox.com> (raw)
In-Reply-To: <20211124210048.78905-1-s.ivanov@proxmox.com>
On 24.11.21 22:00, Stoiko Ivanov wrote:
> As described in
> http://www.postfix.org/postconf.5.html#smtp_line_length_limit
>
> postfix splits lines which are longer by inserting <cr><lf><space> to
> adhere with RFC 5322 (section 2.1.1):
> https://datatracker.ietf.org/doc/html/rfc5322#section-2.1.1
> (or actually section 4.5.3.1.6. where characters are translated to
> octets)
>
> If a longer line is part of the disclaimer pmg-smtp-filter adds it
> without this modification, which breaks DKIM signatures (since the
> body is modified by postfix after the body hash is computed)
>
> regular-expression matching is used instead of length(), because the
> limit is on line-length (and a disclaimer can contain multiple lines)
>
> reported in our community forum:
> https://forum.proxmox.com/threads/.97919/
>
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> v2->v1:
> * incorporated Thomas' feedback - huge thanks!
> * replaced the 2/3 occurences of encode('UTF-8',...) by a temporary varialbe
great that it could roughly stay the same amount of work, the memory scan should
be rather cheap.
> * read up quite a bit on the magic world of encoding)
> * verified that the encoded value is indeed the one we want to compare
> against
>
> src/PMG/RuleDB/Disclaimer.pm | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
>
applied, thanks!
prev parent reply other threads:[~2021-11-25 8:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-24 21:00 [pmg-devel] " Stoiko Ivanov
2021-11-25 8:28 ` Thomas Lamprecht [this message]
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=09c3746c-fd81-1bea-748f-d66548d43c80@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
--cc=s.ivanov@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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal