diff --git a/backend/.cvsignore b/backend/.cvsignore new file mode 100644 index 0000000..52e4e61 --- /dev/null +++ b/backend/.cvsignore @@ -0,0 +1,2 @@ +*.pyc +*.pyo diff --git a/backend/gvadm.preferences b/backend/gvadm.preferences new file mode 100644 index 0000000..b9986c0 --- /dev/null +++ b/backend/gvadm.preferences @@ -0,0 +1,4 @@ +USERPREFIX="usr" +EXIMCONFDIR="etc/exim/" +VIRTUALDOMDIR=EXIMCONFDIR+"virtual/" +POPHOMEDIR="home/mail/" diff --git a/backend/gvadm.py b/backend/gvadm.py new file mode 100644 index 0000000..36a6acd --- /dev/null +++ b/backend/gvadm.py @@ -0,0 +1,2 @@ +import mailtools + diff --git a/backend/mailtools.py b/backend/mailtools.py index 1371f4d..a310d52 100755 --- a/backend/mailtools.py +++ b/backend/mailtools.py @@ -2,9 +2,7 @@ import os, string -USERPREFIX="usr" -EXIMCONFDIR="etc/exim/" -VIRTUALDOMDIR=EXIMCONFDIR+"virtual/" +execfile('gvadm.preferences') # if [ -n $USERPREFIX ]; then # USERPREFIX="usr" @@ -29,6 +27,10 @@ VIRTUALDOMDIR=EXIMCONFDIR+"virtual/" # echo "Herzlich willkommen auf dem GNU-Viech" | mail -s "Willkommen auf dem GNU-Viech" ${NEWUSER} # echo added new pop3 user $NEWUSER with password $NEWPASS +def createpopaccount(domainname, sysuser): + """Creates a pop3/imap account for given domain and system user""" + "addpopuser sysusrp" + def readaliasfile(domainname): """reads the aliasfile for the given domain and returns a dictionary object with the aliases @@ -62,10 +64,6 @@ def writealiasfile(domainname, aliases): else: print "no write access to directory "+VIRTUALDOMDIR+"." -def createpopaccount(domainname, sysuser): - """Creates a pop3/imap account for given domain and system user""" - "addpopuser sysusrp" - def setmailalias(domainname, alias, target): """sets a mail alias for given domain which directs the MTA to the given target