On 18 April 2017 at 09:32, Alexander Burger <a...@software-lab.de> wrote:
> Hi Rowan,
>
> > mailing-list configuration - for some reason none of the recent emails
> > to the list from geo got through to me, but everyone else's did (I
> > read the thread on the list's web-archive OK, but it got me wondering
> > if any other emails never got through). Because the list-software
>
> Indeed something must be wrong with the mailing list. We observe rejected 
> mails
> rather often :(
> ..[snip]..
> In fact, everyone of us has the source of the PicoLisp mailing list server. It
> is in the PicoLisp distribution, e.g. in /usr/share/picolisp/misc/mailing, or
> locally in misc/mailing.

I just had a glance at the source and noticed one thing so will
mention it now, and will try to look/test more thoroughly later for
anything else. On lines 28-30 there is the "header folding" logic:

> (while (= ";" (last (last L)))
>  (char)  # Skip TAB
>  (conc L (trim (split (line) " "))) )

which only folds the next line of a multiline header if the existing
line ends with ";" and then chomps a single leading char, yet as far
as I understand it, RFC822 supports [A] folding based on (single or
multiple) leading TABs or spaces, [B] even if the preceding line
doesn't end with a ";" :

 https://tools.ietf.org/html/rfc822#section-3.2 (and see token-def in
section 3.3)

Looking through the source of various emails I've received from other
gmail/google-apps users I noticed they often have a mix of
multiline-header-continuations with leading SPACEs (multiple) and some
with leading TABs, and several are just folded on space without the
trailing ";" so it seems this isn't a theoretical edge-case...

Obviously chomping only one of multiple leading spaces/tabs probably
doesn't matter (other than for readability of mail-source), but only
matching the fold on a trailing ";" certainly does. I suspect that is
causing recipients' SMTP servers (and/or your own Postfix on
localhost) to reject my emails because I have SPF/DKIM configured on
outgoing emails, and those long headers often get folded on space
(without trailing ";"), which I guess short-circuits the header
processing and forwards the remainder of the headers as "the body". If
either the SPF or DKIM headers end up included in the final outgoing
mail they will cause a validation failure (SPF due to wrong sender,
and DKIM due to modified content).

-- 
Rowan Thorpe
http://twitter.com/rowanthorpe
"There is a great difference between worry and concern. A
worried person sees a problem, and a concerned person solves a
problem." - Harold Stephens
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to