Replies: 2 comments 7 replies
-
Thanks for the detailed analysis. I am working on exactly the same setup and have been struggling to get it working, my suspision of might be happening overlaps with your analysis.
This is my preferred solution. I consider the ability to separate "automated reporting" from "human reporting" essential for the proper operation of a mail service without too much toil |
Beta Was this translation helpful? Give feedback.
-
I agree that this behaviour is not desirable. However, parsing is done on a separate thread to avoid adding latency to email delivery. I suggest that you create a separate email address for reports that is not |
Beta Was this translation helpful? Give feedback.
-
My setup
I'm currently looking at the following setup:
The default address for reporting in Stalwart's DNS records for the domains is
postmaster@<domain>
.Forwarding is disabled, since I'm my main mailbox has a catch-all and I don't want my mailbox to be filled with DMARC and TLS reports.
The problem
RFC 5321 mandates that every mailserver accepts mails to the
postmaster@…
address.I think it is a reasonable expectation to be able to reach a human when sending mail to the
postmaster@
orabuse@
system, if the message is not some sort of automated report.The documentation states that
report.analysis.addresses
is the:And that the
report.analysis.forward
controls:The mention of "report" led me to believe that every email that is not a report would be delivered to the corresponding mailboxes.
This would be the desired behavior (at least for me), as this removes the noise of automated reports, but ensures that all other emails (e.g. manual ones to
postmaster@
) are still delivered.However, with report forwarding disabled, no messages to the report addresses (including the postmaster and abuse mailboxes) are delivered, even those, which are not automated emails.
My proposal is to change the behavior so that only automated mails are not forwarded.
Analysis
Looking at the code, the mails are dropped after analyzing, if forwarding is enabled, and it is determined to be a report (
is_report
istrue
).However,
is_report
only checks whether the mail is for one of the analysis mailboxes.Possible implementation
Since
analyze_report
is (attempting to) parse the incoming emails anyways, it might return abool
to indicate whether an analyzed email is an automated report.The conditions for this could be:
This return value could then be used when receiving the email as an additional condition for not forwarding the email.
Consequently, every email where Stalwart isn't sure that it is an automated one, would be forwarded.
Other solutions / available workarounds
Another solution could be to change the DMARC and TLS reporting addresses in the generated DNS records to specialized addresses (e.g.
dmarc@
,tlsrpt@
, …).In that case, I'd change the defaults used in the DNS records shown for every domain as well.
This can be implemented already today, though the records need to be created by hand.
Beta Was this translation helpful? Give feedback.
All reactions