]> www.infradead.org Git - users/dwmw2/eximconf.git/commitdiff
Add to known_resenders even if the retry comes from an already known resender resenders
authorDavid Woodhouse <dwmw@amazon.co.uk>
Mon, 23 May 2022 10:48:41 +0000 (11:48 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Mon, 23 May 2022 10:48:41 +0000 (11:48 +0100)
Untested.

include/acl-greylist-sqlite

index d3ac8e8d9825da8cc8b9d17ef851c27333b5e5ce..4ca290282bf766b47f003e63dbb6f152e2825981 100644 (file)
@@ -52,11 +52,13 @@ greylist_mail:
   accept hosts = :
   accept authenticated = *
 
-  # Secondly, there's _absolutely_ no point in greylisting mail from
-  # hosts which are known to resend their mail. Just accept it.
-  accept condition = ${lookup sqlite {GREYDB SELECT host from resenders \
+  # There's _absolutely_ no point in greylisting mail from hosts which are
+  # known to resend their email. Clear the 'acl_m_greylistreasons' variable
+  # so that the mail isn't treated as suspicious.
+  warn condition = ${lookup sqlite {GREYDB SELECT host from resenders \
                               WHERE helo='${quote_sqlite:$sender_helo_name}' \
                               AND host='$sender_host_address';} {1}}
+       set acl_m_greylistreasons =
 
   # Generate a hashed 'identity' for the mail, as described above.
   warn set acl_m_greyident = ${hash{20}{62}{$sender_address$recipients$h_message-id:}}
@@ -68,7 +70,8 @@ greylist_mail:
                                WHERE id='${quote_sqlite:$acl_m_greyident}';}{$value}}
 
 
-  # If there's absolutely nothing suspicious about the email, accept it. BUT...
+  # If there's absolutely nothing suspicious about the email (or if it came from
+  # a known resender so we wiped the reasons), accept it. BUT...
   accept condition = ${if eq {$acl_m_greylistreasons}{} {1}}
          condition = ${if eq {$acl_m_greyexpiry}{} {1}}