Jan Dittberner
f24de13a6f
- remove duplicate foreign key definitions from tables.py - use _saltchars in passwordutils.py git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@240 a67ec6bc-e5d5-0310-a910-815c51eb3124
11 lines
551 B
Python
11 lines
551 B
Python
from passwordutils import *
|
|
import sys
|
|
|
|
for line in sys.stdin.read().splitlines():
|
|
parts = line.split()
|
|
(email, domain) = parts[0].split("@")
|
|
username = parts[1][0:5]
|
|
pwtuple = get_pw_tuple()
|
|
print "INSERT INTO mailpassword (id, clearpass, cryptpass, uid, gid, home, spamcheck) VALUES ('%s', '%s', '%s', %d, %d, '/home/mail/%s/%s', 'false');" % (parts[1], pwtuple[0], pwtuple[1], int(parts[2]), 119, username, parts[1])
|
|
print "INSERT INTO mailaddress (domainid, email, target) VALUES (%d, '%s', '%s');" % (int(parts[3]), email, parts[1])
|
|
|