X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-mailgate;h=91dcf40a8a7e0b4b132d484444d9d44d622e9b97;hb=8be45fd03d84447c0f75dc77bd94ed4e6580f0f6;hp=1e42f4f04263dcf3d7a325f8e49068f1da9d4e5a;hpb=7551db8f6bec556aa7d0246e29b67c91788bb7d3;p=mirror%2Fuserdir-ldap.git diff --git a/ud-mailgate b/ud-mailgate index 1e42f4f..91dcf40 100755 --- a/ud-mailgate +++ b/ud-mailgate @@ -190,8 +190,8 @@ def HandleChange(Reply,DnRecord,Key): Show = 1; Res = "OK"; else: - Res = DoPosition(Line,Attrs) or DoDNS(Line,Attrs,DnRecord) or \ - DoArbChange(Line,Attrs) or DoSSH(Line,Attrs); + Res = DoPosition(Line,Attrs) or DoDNS(Line,Attrs,DnRecord) or \ + DoArbChange(Line,Attrs) or DoSSH(Line,Attrs); except: Res = None; Result = Result + "==> %s: %s\n" %(sys.exc_type,sys.exc_value); @@ -352,6 +352,9 @@ try: if Sender == None: raise Error, "Unable to determine the sender's address"; + if (string.find(GetAttr(Attrs[0],"userPassword"),"*LK*") != -1): + raise Error, "This account is locked"; + # Formulate a reply Date = time.strftime("%a, %d %b %Y %H:%M:%S +0000",time.gmtime(time.time())); Reply = "To: %s\nReply-To: %s\nDate: %s\n" % (Sender,ReplyTo,Date);