Never ban a trusted relay.

This commit is contained in:
Stuart Gathman
2008-09-09 23:24:56 +00:00
parent 93e9644574
commit f9ed6f7194
2 changed files with 7 additions and 1 deletions
+3
View File
@@ -1,3 +1,6 @@
Add postmaster option or general rcpt list to dsn. Can send dsn to
user and postmaster on the same connection.
Check ESMTP NOTIFY before sending real DSNs. Just use CBV if DSNs are Check ESMTP NOTIFY before sending real DSNs. Just use CBV if DSNs are
not wanted. not wanted.
+4 -1
View File
@@ -1,6 +1,9 @@
#!/usr/bin/env python #!/usr/bin/env python
# A simple milter that has grown quite a bit. # A simple milter that has grown quite a bit.
# $Log$ # $Log$
# Revision 1.128 2008/09/09 23:08:16 customdesigned
# Wasn't reading banned_ips
#
# Revision 1.127 2008/08/25 18:32:22 customdesigned # Revision 1.127 2008/08/25 18:32:22 customdesigned
# Handle missing gossip_node so self tests pass. # Handle missing gossip_node so self tests pass.
# #
@@ -732,7 +735,7 @@ class bmsMilter(Milter.Milter):
def offense(self,inc=1): def offense(self,inc=1):
self.offenses += inc self.offenses += inc
if self.offenses > 3: if self.offenses > 3 and not self.trusted_relay:
try: try:
ip = addr2bin(self.connectip) ip = addr2bin(self.connectip)
if ip not in banned_ips: if ip not in banned_ips: