Commits

Zhang Huangbin committed 6e8eb07

Small performance improvement: return DUNNO if sender address is shorter than 6 characters.

  • Participants
  • Parent commits 96c2a52

Comments (0)

Files changed (1)

File src/iredapd.py

 
     def handle_data(self, map):
         if 'sender' in map.keys() and 'recipient' in map.keys():
+            if len(map['sender']) < 6:
+                # Not a valid email address.
+                return 'DUNNO'
+
             # Get plugin module name and convert plugin list to python list type.
             self.plugins = cfg.get('mysql', 'plugins', '')
             self.plugins = [v.strip() for v in self.plugins.split(',')]