[–] 1 point 9 months ago

That explains my problem :/

It’s so heinous that their little oopsies or „genuine effort to combat spam“ basically force self hosters to use their services.

  • source
  • [–] [S] 4 points 9 months ago (4 children)

    Yes indeed! Changing the sender name to Matrix Authentication Service @ <my_homeserver> works, with successful dkim: pass.

    From original source:

    Authentication-Results: mx.google.com;
           dkim=pass [...]
    [...]
    From: "Matrix Authentication Service @ <my_homeserver>" <matrix@matrix.<my_homeserver>>
    Reply-To: "Matrix Authentication Service @ <my_homeserver>" <matrix@matrix.<my_homeserver>>
    

    So sending mails with quoted names that do not have to be quoted leads to DKIM failures at gmail.

    Nice idea!

  • source
  • parent
  • context
  • [–] 1 point 9 months ago*

    That’s the unfortunate reality. Google can force their will on the internet because they own around 35% of all email. And Microsoft owns another ~35%, so if the two decide to change how email works, it’s everyone else who has to conform.

  • source
  • parent
  • context
  • [–] 2 points 9 months ago* (last edited 9 months ago) (2 children)

    Atom is defined as such:

    atext           =       ALPHA / DIGIT / ; Any character except controls,
                            "!" / "#" /     ;  SP, and specials.
                            "$" / "%" /     ;  Used for atoms
                            "&" / "'" /
                            "*" / "+" /
                            "-" / "/" /
                            "=" / "?" /
                            "^" / "_" /
                            "`" / "{" /
                            "|" / "}" /
                            "~"
    
    atom            =       [CFWS] 1*atext [CFWS]
    

    So since atom does not contain white space, there should be no white space. Only comments can separate 1*atom.

    If they wanted to allow separating atoms by a space, it would be written:

    atom *(SP atom)

    Edit: wait, I’m wrong. CFWS includes white space. You’re right.

  • source
  • parent
  • context
  • [–] [S] 1 point 9 months ago (1 child)

    In the same example, the Mary Smith is not the issue, rather the @machine.tld, as is written in the description.

    John Q. Public is an issue because of the dot, not the spaces. The spaces are an issue in jdoe@test . example, as that's actually an address, not a name

  • source
  • parent
  • context
  • [–] [S] 2 points 9 months ago* (5 children)

    I had to think about this for a while, but the standard is only obsoleting folding white space, i.e. white space that wraps lines, such as:

    Subject: This
     is a folded line
    

    which is equivalent to

    Subject: This is a folded line
    

    As I understand it, white space is allowed before and after obsoletion. Or do I understand it wrong?

    Edit:

    I think in the obsoleted language the following would have been allowed for a From: field as well:

    From: John
     Smith <j.smith@example.com>
    
  • source
  • parent
  • context
  • [–] 1 point 9 months ago* (last edited 9 months ago) (2 children)

    The section right below shows that it’s obsolete:

    A.6.1. Obsolete addressing
    
       Note in the below example the lack of quotes around Joe Q. Public,
       the route that appears in the address for Mary Smith, the two commas
       that appear in the "To:" field, and the spaces that appear around the
       "." in the jdoe address.
    
    ----
    From: Joe Q. Public <john.q.public@example.com>
    To: Mary Smith <@machine.tld:mary@example.net>, , jdoe@test   . example
    Date: Tue, 1 Jul 2003 10:52:37 +0200
    Message-ID: <5678.21-Nov-1997@example.com>
    
    Hi everyone.
    ----
    

    And in the spec itself, that syntax is named as “obs-phrase”.

    But yes, though obsolete, it is still legal syntax. So I guess I shouldn’t say it “does not conform to the standard”, but rather “just barely conforms to the standard”.

  • source
  • parent
  • context
  • [–] 2 points 9 months ago* (last edited 9 months ago) (10 children)

    Quotes around the display name in a header certainly conforms to the standard (and in fact, the way Gmail rewrites it does not conform to the standard when it contains a space, but is the obsolete form), and I would expect any decent mail program to leave it alone. Then again, Gmail is not a decent mail program, and hasn’t been for a long time.

    Edit: @w2xel@gehirneimer.de points out below that Gmail’s rewrite does follow the spec, so it is conforming to the standard when white space is in the display name. It’s only when there is a dot (.) that it would be using the obsolete form.

  • source
  • parent
  • context
  • [–] [S] 2 points 9 months ago (11 children)

    Yes, it seems it does that. I assume it has some processing chain involving decode -> process -> encode of the whole mail, and usually that works out and the DKIM check passes. Apparantly, if you send something non-standard the decode and encode are not symmetrical and this happens. IMHO it shouldn't, so I agree. Especially, showing users mails with broken authentication seems broken as well to me.

  • source
  • parent
  • context
  • [–] 5 points 9 months ago (12 children)

    Yeah, I understand how the mail that Gmail receives is not necessarily the mail that the user sent (in regards to headers), and I understand Gmail can add headers (like auth results, spam scores, other sorts of records), but is Gmail really changing the “From” header or other headers included in the DKIM signature?? I would think that would be absolutely unacceptable.

  • source
  • parent
  • context
  • [–] [S] 5 points 9 months ago (13 children)

    Usually, the important parts of the mail, such as subject, sender and contents are protected by DKIM authentication. Unfortunately this is usually not visible to the end-user, i.e. as in my case, where mails fail DKIM, but are still presented in my inbox.

    Mail servers and relays add headers to the mail as it goes, for example their own IPs to trace the mail, or authentication results if authentication happens at various endpoints.

    In the end, the mail as in the gmail postbox is the result of the original mail, and all these additions of the mail relays. In an ideal world only DKIM authenticated would be presented to the end-user, but the world of mail seems to be so broken, that many sending servers just do not apply DKIM/DMARC correctly, and thus many receivers accept broken mail.

  • source
  • parent
  • context
  • [–] [S] 3 points 9 months ago (9 children)

    I think it's technically an encoding bug in lettre, which is used in matrix authentication services: https://github.com/lettre/lettre . As far as I can tell, exim is relaying the messages "correctly" or at least without altering them.

    I.e. lettre should not add quotes for whitespace. But also google shouldn't alter messages before authenticating. In an ideal world, both sides are fixed ^^

  • source
  • parent
  • context
  • view more: ‹ prev next ›