+def CheckForward():
+ global PasswdAttrs
+ for x in PasswdAttrs:
+ if x[1].has_key("emailForward") == 0:
+ continue
+
+ if IsInGroup(x) == 0:
+ x[1].pop("emailForward")
+ continue
+
+ # Do not allow people to try to buffer overflow busted parsers
+ if len(GetAttr(x,"emailForward")) > 200:
+ x[1].pop("emailForward")
+ continue
+
+ # Check the forwarding address
+ if EmailCheck.match(GetAttr(x,"emailForward")) == None:
+ x[1].pop("emailForward")
+