X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-mailgate;h=91dcf40a8a7e0b4b132d484444d9d44d622e9b97;hb=8be45fd03d84447c0f75dc77bd94ed4e6580f0f6;hp=a93d7ccda4bb127b90782a7d1f2c2d049947e1f0;hpb=068a588b206be799352a8113e7ac5627500649e2;p=mirror%2Fuserdir-ldap.git diff --git a/ud-mailgate b/ud-mailgate index a93d7cc..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 DoSSH(Line,Attrs) or \ - DoDNS(Line,Attrs,DnRecord) or DoArbChange(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);