You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "hung (Jira)" <se...@james.apache.org> on 2024/11/15 02:54:00 UTC

[jira] [Resolved] (JAMES-4086) Mailet for folding long lines

     [ https://issues.apache.org/jira/browse/JAMES-4086?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

hung resolved JAMES-4086.
-------------------------
    Resolution: Fixed

> Mailet for folding long lines
> -----------------------------
>
>                 Key: JAMES-4086
>                 URL: https://issues.apache.org/jira/browse/JAMES-4086
>             Project: James Server
>          Issue Type: Improvement
>            Reporter: hung
>            Priority: Major
>          Time Spent: 4h 40m
>  Remaining Estimate: 0h
>
> *Why?*
> Some email clients (Outlook!) can generate some arbitrary long lines. For instance a loooong discussions with many References can have a References line exceeding 1000 characters.
> {color:red}References: <CA...@mail.gmail.com> <PR...@PR0P264MB3356.FRAP264.PROD.OUTLOOK.COM>
>  <PR...@PR0P264MB3356.FRAP264.PROD.OUTLOOK.COM> <MW...@MWHPR0801MB3691.namprd08.prod.outlook.com> <SN...@SN4PR0801MB3696.namprd08.prod.outlook.com> <PR...@PR0P264MB3356.FRAP264.PROD.OUTLOOK.COM> <SN...@SN4PR0801MB3696.namprd08.prod.outlook.com> <PR...@PR0P264MB3356.FRAP264.PROD.OUTLOOK.COM> <PR...@PR0P264MB3356.FRAP264.PROD.OUTLOOK.COM> <SN...@SN4PR0801MB3696.namprd08.prod.outlook.com> <CY...@CYXPR08MB9017.namprd08.prod.outlook.com> <PA...@PA4PR07MB7101.eurprd07.prod.outlook.com> <CYXPR08MB90173
>  4D5BD04714BD6A
> 		04551F9602@CYXPR08MB9017.namprd08.prod.outlook.com> <PA...@PA4PR07MB7101.eurprd07.prod.outlook.com>  <04...@avocat.fr>{color}
> The issue is that RFC5322 mandates not exceeding 998 characters per lines so postfix is configured by default to fold such long lines!
> We do protect the references header as per our DKIM signing:
> {color:red}DKIM-Signature: a=rsa-sha256; b=wRnnh7MWRU2Rly2nVeoKaao+UOlG87Cs0MRD614YE3TokZsaGVqMZQVYgqWQ+9XzBqzF0tp7Zt+907TEBSTIHAcShikJuiv0Sl5fjrgzpaJrkPtYe51MmPfkSY6USXmdOsdXhZBhVdBJ5M+r4LaZL0LYYKJZVn1re4khGsalvXo=; s=s2; d=avocat.fr; v=1; bh=2AjlhSVg7EzuioM7CZqg3hz0OtP3/dOlGrqo3PYe9eg=; h=from : reply-to : subject : date : to : cc : resent-date : resent-from : resent-sender : resent-to : resent-cc : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive;{color}
> And doing such folding after the signature indeed breaks the DKIM signature.
> Some domains do not interprete well our p=quarantine policy and just reject the mails:
> {color:red}Diagnostic-Code: smtp; 550 5.7.0 Email quarantined per DMARC policy{color}
> Thus we would need to fold headers correctly prior to forwarding the mails to Postfix.
> *How?*
> Write a FoldLongLines mailet defaulting to 998 chars (like postfix)
> It would fold headers that exceed this length.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org