X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=blobdiff_plain;f=ud-echelon;fp=ud-echelon;h=1bd90cacc8f1bda7e7654f732db4ad98e4c3c708;hp=2c0f984dddb1e466f62bedbd9c5bac12ccff63ad;hb=b00b7eec003232f689b194f8d2ab7d03c74cc78d;hpb=04828a224154b398e86c5d4800735ebe24658c74 diff --git a/ud-echelon b/ud-echelon index 2c0f984..1bd90ca 100755 --- a/ud-echelon +++ b/ud-echelon @@ -14,7 +14,7 @@ Debug = None; def TryGPG(email): # Try to get a pgp text try: - Msg = GetClearSig(email); + Msg = GetClearSig(email, lax_multipart=True); except: # Log an exception.. but continue. This is to deal with 'sort of' # PGP-MIME things @@ -113,10 +113,8 @@ try: User = TryMatcher(email); # Get any mailing list information - if 'X-Mailing-List' in email: - List = email['X-Mailing-List'] - else: - List = "-"; + List = email['X-Mailing-List'] + if not List: List = "-"; # Tada, write a log message if User != None: @@ -129,7 +127,7 @@ try: else: print Rec; else: - User = ("-","UKN",email("From")); + User = ("-","UKN",email["From"]); Msg = "[%s] \"%s\" \"%s\" \"%s\""%(Now,User[2],List,MsgID); MainLog.write("%s %s %s\n"%(User[0],User[1],Msg));