eximconf: tag/reject mail matching specific suspicious content
[mirror/dsa-puppet.git] / modules / exim / templates / eximconf.erb
index eb28176..3d5b570 100644 (file)
@@ -1068,6 +1068,30 @@ check_message:
           condition       = ${if !eq {$acl_m_prf}{PopconMail}}
          message         = Your mailer is not RFC 2047 compliant: message rejected
 
+  discard condition      = ${if eq {$acl_m_prf}{blackhole}}
+          condition      = ${if bool_lax{$acl_m_defopt}}
+          condition      = ${if or {\
+                                    {match {$message_body}{Wenn Sie zuk&uuml;nftig keine weiteren Informationen erhalten m&ouml;chten, <br />unwissentlich oder unbeabsichtigt in den Verteiler aufgenommen wurden,}} \
+                                   }\
+                            }
+          log_message    = Discarded suspicious content for $recipients
+
+  deny    condition      = ${if !eq {$acl_m_prf}{markup}}
+          condition      = ${if bool_lax{$acl_m_defopt}}
+          condition      = ${if or {\
+                                    {match {$message_body}{Wenn Sie zuk&uuml;nftig keine weiteren Informationen erhalten m&ouml;chten, <br />unwissentlich oder unbeabsichtigt in den Verteiler aufgenommen wurden,}} \
+                                   }\
+                            }
+          message        = Rejected due to suspicious content
+
+  warn    condition      = ${if eq {$acl_m_prf}{markup}}
+          condition      = ${if bool_lax{$acl_m_defopt}}
+          condition      = ${if or {\
+                                    {match {$message_body}{Wenn Sie zuk&uuml;nftig keine weiteren Informationen erhalten m&ouml;chten, <br />unwissentlich oder unbeabsichtigt in den Verteiler aufgenommen wurden,}} \
+                                   }\
+                            }
+          add_header     = X-debian-content-warning: yes
+
 <%- if has_variable?("clamd") && @clamd -%>
   discard condition       = ${if eq {$acl_m_prf}{blackhole}}
           malware         = */defer_ok