]> git.ipfire.org Git - dbl.git/commitdiff
reports: Improve wording in emails
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Mar 2026 15:07:16 +0000 (15:07 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Mar 2026 15:07:16 +0000 (15:07 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/dbl/reports.py

index 4ef2d6998d13de8b97a890d5bfd1b4a16d042d25..a9bb3576fd4299f65c97bdc5994d5e5752e4b473 100644 (file)
@@ -453,22 +453,40 @@ class Report(sqlmodel.SQLModel, database.BackendMixin, table=True):
                if self.accepted:
                        subject = "[IPFire DBL] %s" % (_("Your report for %s has been accepted") % name)
 
-                       lines = (
-                               _("Hello,"),
-                               "",
-                               _("Thank you for taking the time to report %s to our IPFire DBL service.") % name,
-                               "",
-                               _("We've reviewed your submission and are pleased to inform you that your report has been ACCEPTED."
-                                       " The domain has been added to our blocklist and will now be flagged by systems using our service."),
-                               "",
-                               _("Your contribution helps make the internet safer for everyone."
-                                       " We appreciate your vigilance in identifying and reporting problematic domains."),
-                               "",
-                               _("If you have any questions about this decision, please don't hesitate to reach out."),
-                               "",
-                               _("Best regards,"),
-                               "-%s" % sender,
-                       )
+                       if self.block:
+                               lines = (
+                                       _("Hello,"),
+                                       "",
+                                       _("Thank you for taking the time to report %s to our IPFire DBL service.") % name,
+                                       "",
+                                       _("We've reviewed your submission and are pleased to inform you that your report has been ACCEPTED."
+                                               " The domain has been added to our blocklist and will now be flagged by systems using our service."),
+                                       "",
+                                       _("Your contribution helps make the internet safer for everyone."
+                                               " We appreciate your vigilance in identifying and reporting problematic domains."),
+                                       "",
+                                       _("If you have any questions about this decision, please don't hesitate to reach out."),
+                                       "",
+                                       _("Best regards,"),
+                                       "-%s" % sender,
+                               )
+                       else:
+                               lines = (
+                                       _("Hello,"),
+                                       "",
+                                       _("Thank you for taking the time to submit %s to our IPFire DBL service.") % name,
+                                       "",
+                                       _("We've reviewed your submission and are pleased to inform you that your request has been ACCEPTED."
+                                               " The domain has been removed from our blocklist and will no longer be flagged by systems using our service."),
+                                       "",
+                                       _("Your contribution helps ensure legitimate domains are not incorrectly blocked."
+                                               " We appreciate your effort in helping us maintain an accurate and fair blocklist."),
+                                       "",
+                                       _("If you have any questions about this decision, please don't hesitate to reach out."),
+                                       "",
+                                       _("Best regards,"),
+                                       "-%s" % sender,
+                               )
 
                # DECLINED
                else:
@@ -480,8 +498,8 @@ class Report(sqlmodel.SQLModel, database.BackendMixin, table=True):
                                _("Thank you for taking the time to report %s to our IPFire DBL service.") % name,
                                "",
                                _("We've carefully reviewed your submission."
-                                       " After investigation, we've determined that this domain does not meet our criteria"
-                                       " for inclusion in the blocklist at this time, and your report has been DECLINED."),
+                                       " After investigation, we've determined that your report does not meet our criteria"
+                                       " for our blocklist at this time, and your report has been DECLINED."),
                                "",
                                _("This decision may be due to various factors, such as insufficient evidence of malicious"
                                        " activity, the domain being legitimately used, or the issue having already been resolved."),