comparison make-tld-conf.py @ 291:9f0d9fcb58dd stable-6-0-42

Never add auto-whitelist entries for outgoing mail from localhost
author Carl Byington <carl@five-ten-sg.com>
date Sat, 28 Jun 2014 17:01:56 -0700
parents 6497944a9bd9
children 3a3b0cbcaf6e
comparison
equal deleted inserted replaced
290:bb69fdc3acaa 291:9f0d9fcb58dd
3 import os, sys, time 3 import os, sys, time
4 4
5 def cmd(c): 5 def cmd(c):
6 return os.popen(c).read().rstrip('\n') 6 return os.popen(c).read().rstrip('\n')
7 7
8 8 url = 'https://publicsuffix.org/list/effective_tld_names.dat'
9 c = 'curl http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1 2>/dev/null' 9 c = 'curl %s 2>/dev/null' % url
10 content = cmd(c) 10 content = cmd(c)
11 f=open('tld.conf','w') 11 f=open('tld.conf','w')
12 f.write(time.strftime("// generated by make-tld-conf.py on %Y-%m-%d %H:%M:%S\n\n")) 12 f.write(time.strftime("// generated by make-tld-conf.py on %Y-%m-%d %H:%M:%S\n\n"))
13 for x in content.split('\n'): 13 for x in content.split('\n'):
14 if (x == '') or (x[:2] == '//'): f.write('%s\n' % x) 14 if (x == '') or (x[:2] == '//'): f.write('%s\n' % x)