mrisher / smtp-sts

SMTP Strict Transport Security
Apache License 2.0
35 stars 19 forks source link

Reporting "loops" #191

Closed aykevl closed 6 years ago

aykevl commented 7 years ago

I think mail servers that send reports (TLSRPT) can get stuck in a loop when not implemented properly.

Consider this:

This is mostly an implementation issue, so I don't know whether it needs to be mentioned in the specification. But I just realized this is a possibility and don't know whether this has been considered before.

I'm not sure how this works for DMARC. It has potentially the same issue, but AFAICT only when both servers implement report sending (A sends a report to B, B sends a report to A, A sends a report to B, etc.).

abrotman commented 6 years ago

In the draft, we do mention that TLSRPT reports should be sent ignoring TLS-related requirements (Section 3) and presumably not reported. Alternately, the reports would potentially stop being sent when the original failure scenario is resolved, and regular mail and reports can be delivered using TLS.

Though I do see your point, and I'd agree that is likely an implementation issue. Thoughts? Should we add anything?

aykevl commented 6 years ago

The way I understand the spec, reports are always sent regardless of whether there is a TLS failure. So this will not stop a loop.

I think it depends on whether such reporting mails are generally sent using the same mail server as all other mail (except for the TLS requirement, e.g. using REQUIRETLS) or a separate mail server. I don't know which is more likely and I don't know about the current situation with DMARC so I find it hard to say whether it is necessary.

Possible text (in bold):

  • In the case of mailto, reports should be submitted to the specified email address ([@!RFC6068]). When sending failure reports via SMTP, sending MTAs MUST deliver reports despite any TLS-related failures and SHOULD NOT include this SMTP session in the next report. This may mean that the reports are delivered in the clear. Additionally, reports sent via SMTP MUST contain a valid DKIM [@!RFC6376] signature by the reporting domain. Reports lacking such a signature MUST be ignored by the recipient. DKIM signatures must not use the "l=" attribute to limit the body length used in the signature.
danmarg commented 6 years ago

It's worth noting that when reports are delivered via HTTP this issue does not exist. But I think the recommended text works well.

abrotman commented 6 years ago

Added to the draft