X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=blobdiff_plain;f=ud-forwardlist;h=727cfd9b24e9369fc5448c6ddd1f112a987ecb82;hp=9e5e28add8ff23c4db8458ca0aefc14d0bafd88a;hb=a6fb69805c3999a85c064a96c93417bb1c284c5c;hpb=3ec1386cd62200a1d86fc72168c2aa1fe305bdd8 diff --git a/ud-forwardlist b/ud-forwardlist index 9e5e28a..727cfd9 100755 --- a/ud-forwardlist +++ b/ud-forwardlist @@ -12,12 +12,12 @@ # # It also understand .qmail type files -import string, re, time, getopt, os, sys, pwd, stat; +import re, time, getopt, os, sys, pwd, stat; AddressSplit = re.compile("<(.*)>"); while (1): - File = string.strip(sys.stdin.readline()); + File = sys.stdin.readline().strip() if File == "": break; @@ -32,7 +32,7 @@ while (1): Forward = open(File,"r"); Line = None; while (1): - Line2 = string.strip(Forward.readline()); + Line2 = Forward.readline().strip() if Line2 == "": break; if Line2[0] == '#' or Line2[0] == '\n': @@ -49,7 +49,7 @@ while (1): # Abort for funky things like pipes or directions to mailboxes if Line[0] == '/' or Line[0] == '|' or Line[0] == '.' or Line[-1] == '/' or \ - string.find(Line,'@') == -1: + Line.find('@') == -1: print "Invalid2", File; continue;