* 'VirtualMailManager/Exceptions.py'
- Renamed class VMMDomainAliasException -> VMMAliasDomainException
- 'VirtualMailManager/AliasDomain.py'
- Renamed file from 'VirtualMailManager/DomainAlias.py'
- Renamed class DomainAlias -> AliasDomain
- 'VirtualMailManager/VirtualMailManager.py'
- 'vmm'
- Adjusted to change of class name (AliasDomain)
* 'po/de.po'
* 'po/vmm.pot'
- updated
--- a/VirtualMailManager/Account.py Fri Aug 22 16:25:15 2008 +0000
+++ b/VirtualMailManager/Account.py Fri Aug 22 20:00:50 2008 +0000
@@ -13,7 +13,7 @@
__revision__ = 'rev '+'$Rev$'.split()[1]
__date__ = '$Date$'.split()[1]
-from Exceptions import VMMAccountException
+from Exceptions import VMMAccountException as AccE
from Domain import Domain
from Transport import Transport
from MailLocation import MailLocation
@@ -36,9 +36,8 @@
self._setAddr()
self._exists()
if self._isAlias():
- raise VMMAccountException(
- _(u"There is already an alias with the address »%s«.") % address,
- ERR.ALIAS_EXISTS)
+ raise AccE(_(u"There is already an alias with the address »%s«.") %\
+ address, ERR.ALIAS_EXISTS)
def _exists(self):
dbc = self._dbh.cursor()
@@ -69,7 +68,7 @@
dom = Domain(self._dbh, d)
self._gid = dom.getID()
if self._gid == 0:
- raise VMMAccountException(_(u"Domain »%s« doesn't exist.") % d,
+ raise AccE(_(u"The domain »%s« doesn't exist yet.") % d,
ERR.NO_SUCH_DOMAIN)
self._base = dom.getDir()
self._tid = dom.getTransportID()
@@ -88,11 +87,11 @@
if not isinstance(state, bool):
return False
if not service in ['smtp', 'pop3', 'imap', 'managesieve', 'all', None]:
- raise VMMAccountException(_(u"Unknown service »%s«.") % service,
- ERR.UNKNOWN_SERVICE)
+ raise AccE(_(u"Unknown service »%s«.") % service,
+ ERR.UNKNOWN_SERVICE)
if self._uid < 1:
- raise VMMAccountException(_(u"The account »%s« doesn't exists.") %
- self._addr, ERR.NO_SUCH_ACCOUNT)
+ raise AccE(_(u"The account »%s« doesn't exists.") % self._addr,
+ ERR.NO_SUCH_ACCOUNT)
dbc = self._dbh.cursor()
if service in ['smtp', 'pop3', 'imap', 'managesieve']:
dbc.execute(
@@ -143,13 +142,13 @@
self._dbh.commit()
dbc.close()
else:
- raise VMMAccountException(_(u'The account »%s« already exists.') %
- self._addr, ERR.ACCOUNT_EXISTS)
+ raise AccE(_(u'The account »%s« already exists.') % self._addr,
+ ERR.ACCOUNT_EXISTS)
def modify(self, what, value):
if self._uid == 0:
- raise VMMAccountException(_(u"The account »%s« doesn't exists.") %
- self._addr, ERR.NO_SUCH_ACCOUNT)
+ raise AccE(_(u"The account »%s« doesn't exists.") % self._addr,
+ ERR.NO_SUCH_ACCOUNT)
if what not in ['name', 'password', 'transport']:
return False
dbc = self._dbh.cursor()
@@ -175,8 +174,8 @@
info = dbc.fetchone()
dbc.close()
if info is None:
- raise VMMAccountException(_(u"The account »%s« doesn't exists.") %
- self._addr, ERR.NO_SUCH_ACCOUNT)
+ raise AccE(_(u"The account »%s« doesn't exists.") % self._addr,
+ ERR.NO_SUCH_ACCOUNT)
else:
keys = ['name', 'uid', 'gid', 'maildir', 'transport', 'smtp',
'pop3', 'imap', 'managesieve']
@@ -203,19 +202,17 @@
self._dbh.commit()
dbc.close()
else:
- raise VMMAccountException(_(u"The account »%s« doesn't exists.") %
- self._addr, ERR.NO_SUCH_ACCOUNT)
+ raise AccE(_(u"The account »%s« doesn't exists.") % self._addr,
+ ERR.NO_SUCH_ACCOUNT)
def getAccountByID(uid, dbh):
try:
uid = long(uid)
except ValueError:
- raise VMMAccountException(_(u'uid must be an int/long.'),
- ERR.INVALID_AGUMENT)
+ raise AccE(_(u'uid must be an int/long.'), ERR.INVALID_AGUMENT)
if uid < 1:
- raise VMMAccountException(_(u'uid must be greater than 0.'),
- ERR.INVALID_AGUMENT)
+ raise AccE(_(u'uid must be greater than 0.'), ERR.INVALID_AGUMENT)
dbc = dbh.cursor()
dbc.execute("SELECT local_part||'@'|| domain_name.domainname AS address,\
uid, users.gid FROM users LEFT JOIN domain_name ON (domain_name.gid \
@@ -223,9 +220,8 @@
info = dbc.fetchone()
dbc.close()
if info is None:
- raise VMMAccountException(
- _(u"There is no account with the UID »%d«.") % uid,
- ERR.NO_SUCH_ACCOUNT)
+ raise AccE(_(u"There is no account with the UID »%d«.") % uid,
+ ERR.NO_SUCH_ACCOUNT)
keys = ['address', 'uid', 'gid']
info = dict(zip(keys, info))
return info
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VirtualMailManager/AliasDomain.py Fri Aug 22 20:00:50 2008 +0000
@@ -0,0 +1,87 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+# Copyright 2008 VEB IT
+# See COPYING for distribution information.
+# $Id$
+
+"""Virtual Mail Manager's AliasDomain class to manage alias domains."""
+
+from constants.VERSION import VERSION
+
+__author__ = 'Pascal Volk <p.volk@veb-it.de>'
+__version__ = VERSION
+__revision__ = 'rev '+'$Rev$'.split()[1]
+__date__ = '$Date$'.split()[1]
+
+from Exceptions import VMMAliasDomainException as VADE
+import constants.ERROR as ERR
+import VirtualMailManager as VMM
+
+class AliasDomain:
+ """Class to manage e-mail alias domains."""
+ def __init__(self, dbh, domainname, targetDomain=None):
+ self._dbh = dbh
+ self.__name = VMM.VirtualMailManager.chkDomainname(domainname)
+ self.__gid = 0
+ self._domain = targetDomain
+ self._exists()
+
+ def _exists(self):
+ dbc = self._dbh.cursor()
+ dbc.execute('SELECT gid, is_primary FROM domain_name WHERE domainname\
+ = %s', self.__name)
+ alias = dbc.fetchone()
+ dbc.close()
+ if alias is not None:
+ self.__gid, primary = alias
+ if primary:
+ raise VADE(_(u"The domain »%s« is a primary domain.") %
+ self.__name, ERR.DOMAIN_ALIAS_ISDOMAIN)
+
+ def save(self):
+ if self.__gid > 0:
+ raise VADE(_(u'The alias domain »%s« already exists.') %self.__name,
+ ERR.DOMAIN_ALIAS_EXISTS)
+ if self._domain is None:
+ raise VADE(_(u'No destination domain for alias domain denoted.'),
+ ERR.DOMAIN_ALIAS_NO_DOMDEST)
+ if self._domain._id < 1:
+ raise VADE (_(u"The target domain »%s« doesn't exist yet.") %
+ self._domain._name, ERR.NO_SUCH_DOMAIN)
+ dbc = self._dbh.cursor()
+ dbc.execute('INSERT INTO domain_name (domainname, gid, is_primary)\
+ VALUES (%s, %s, FALSE)', self.__name, self._domain._id)
+ self._dbh.commit()
+ dbc.close()
+
+
+ def info(self):
+ if self.__gid > 0:
+ dbc = self._dbh.cursor()
+ dbc.execute('SELECT domainname FROM domain_name WHERE gid = %s\
+ AND is_primary', self.__gid)
+ domain = dbc.fetchone()
+ dbc.close()
+ if domain is not None:
+ return {'alias': self.__name, 'domain': domain[0]}
+ else:# an almost unlikely case, isn't it?
+ raise VADE(
+ _(u'There is no primary domain for the alias domain »%s«.')\
+ % self.__name, ERR.NO_SUCH_DOMAIN)
+ else:
+ raise VADE(
+ _(u"The alias domain »%s« doesn't exist yet.") % self.__name,
+ ERR.NO_SUCH_DOMAIN_ALIAS)
+
+ def delete(self):
+ if self.__gid > 0:
+ dbc = self._dbh.cursor()
+ dbc.execute('DELETE FROM domain_name WHERE domainname = %s \
+ AND NOT is_primary', self.__name)
+ if dbc.rowcount > 0:
+ self._dbh.commit()
+ else:
+ raise VADE(
+ _(u"The alias domain »%s« doesn't exist yet.") % self.__name,
+ ERR.NO_SUCH_DOMAIN_ALIAS)
+
--- a/VirtualMailManager/DomainAlias.py Fri Aug 22 16:25:15 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Copyright 2008 VEB IT
-# See COPYING for distribution information.
-# $Id$
-
-"""Virtual Mail Manager's DomainAlias class to manage alias domains."""
-
-from constants.VERSION import VERSION
-
-__author__ = 'Pascal Volk <p.volk@veb-it.de>'
-__version__ = VERSION
-__revision__ = 'rev '+'$Rev$'.split()[1]
-__date__ = '$Date$'.split()[1]
-
-from Exceptions import VMMDomainAliasException as VDAE
-import constants.ERROR as ERR
-import VirtualMailManager as VMM
-
-class DomainAlias:
- """Class to manage e-mail alias domains."""
- def __init__(self, dbh, domainname, targetDomain=None):
- self._dbh = dbh
- self.__name = VMM.VirtualMailManager.chkDomainname(domainname)
- self.__gid = 0
- self._domain = targetDomain
- self._exists()
-
- def _exists(self):
- dbc = self._dbh.cursor()
- dbc.execute('SELECT gid, is_primary FROM domain_name WHERE domainname\
- = %s', self.__name)
- alias = dbc.fetchone()
- dbc.close()
- if alias is not None:
- self.__gid, primary = alias
- if primary:
- raise VDAE(_(u"The domain »%s« is a primary domain.") %
- self.__name, ERR.DOMAIN_ALIAS_ISDOMAIN)
-
- def save(self):
- if self.__gid > 0:
- raise VDAE(_(u'The domain alias »%s« already exists.') %self.__name,
- ERR.DOMAIN_ALIAS_EXISTS)
- if self._domain is None:
- raise VDAE(_(u'No destination domain for alias domain denoted.'),
- ERR.DOMAIN_ALIAS_NO_DOMDEST)
- if self._domain._id < 1:
- raise VDAE (_(u"The target domain »%s« doesn't exist yet.") %
- self._domain._name, ERR.NO_SUCH_DOMAIN)
- dbc = self._dbh.cursor()
- dbc.execute('INSERT INTO domain_name (domainname, gid, is_primary)\
- VALUES (%s, %s, FALSE)', self.__name, self._domain._id)
- self._dbh.commit()
- dbc.close()
-
-
- def info(self):
- if self.__gid > 0:
- dbc = self._dbh.cursor()
- dbc.execute('SELECT domainname FROM domain_name WHERE gid = %s\
- AND is_primary', self.__gid)
- domain = dbc.fetchone()
- dbc.close()
- if domain is not None:
- return _(u"The domain alias »%(alias)s« belongs to »%(dom)s«.")\
- % {'alias': self.__name, 'dom': domain[0]}
- else:# an almost unlikely case, isn't it?
- raise VDAE(
- _(u'There is no primary domain for the domain alias »%s«.')\
- % self.__name, ERR.NO_SUCH_DOMAIN)
- else:
- raise VDAE(
- _(u"The domain alias »%s« doesn't exist yet.") % self.__name,
- ERR.NO_SUCH_DOMAIN_ALIAS)
-
- def delete(self):
- if self.__gid > 0:
- dbc = self._dbh.cursor()
- dbc.execute('DELETE FROM domain_name WHERE domainname = %s \
- AND NOT is_primary', self.__name)
- if dbc.rowcount > 0:
- self._dbh.commit()
- else:
- raise VDAE(
- _(u"The domain alias »%s« doesn't exist yet.") % self.__name,
- ERR.NO_SUCH_DOMAIN_ALIAS)
-
--- a/VirtualMailManager/Exceptions.py Fri Aug 22 16:25:15 2008 +0000
+++ b/VirtualMailManager/Exceptions.py Fri Aug 22 20:00:50 2008 +0000
@@ -47,8 +47,8 @@
def __init__(self, msg, code):
VMMException.__init__(self, msg, code)
-class VMMDomainAliasException(VMMException):
- """Exception class for DomainAlias exceptions"""
+class VMMAliasDomainException(VMMException):
+ """Exception class for AliasDomain exceptions"""
def __init__(self, msg, code):
VMMException.__init__(self, msg, code)
--- a/VirtualMailManager/VirtualMailManager.py Fri Aug 22 16:25:15 2008 +0000
+++ b/VirtualMailManager/VirtualMailManager.py Fri Aug 22 20:00:50 2008 +0000
@@ -29,7 +29,7 @@
from Account import Account
from Alias import Alias
from Domain import Domain
-from DomainAlias import DomainAlias
+from AliasDomain import AliasDomain
SALTCHARS = './0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
RE_ASCII_CHARS = """^[\x20-\x7E]*$"""
@@ -496,31 +496,31 @@
raise VMMDomainException(_(u'Invalid argument: »%s«') % detailed,
ERR.INVALID_OPTION)
- def domainAliasAdd(self, aliasname, domainname):
- """Adds an alias name to the domain.
+ def aliasDomainAdd(self, aliasname, domainname):
+ """Adds an alias domain to the domain.
Keyword arguments:
- aliasname -- the alias name of the domain (str)
+ aliasname -- the name of the alias domain (str)
domainname -- name of the target domain (str)
"""
dom = self.__getDomain(domainname)
- domAlias = DomainAlias(self.__dbh, aliasname, dom)
- domAlias.save()
+ aliasDom = AliasDomain(self.__dbh, aliasname, dom)
+ aliasDom.save()
- def domainAliasInfo(self, aliasname):
+ def aliasDomainInfo(self, aliasname):
self.__dbConnect()
- domAlias = DomainAlias(self.__dbh, aliasname, None)
- return domAlias.info()
+ aliasDom = AliasDomain(self.__dbh, aliasname, None)
+ return aliasDom.info()
- def domainAliasDelete(self, aliasname):
- """Deletes the specified alias name.
+ def aliasDomainDelete(self, aliasname):
+ """Deletes the specified alias domain.
Keyword arguments:
- aliasname -- the alias name of the domain (str)
+ aliasname -- the name of the alias domain (str)
"""
self.__dbConnect()
- domAlias = DomainAlias(self.__dbh, aliasname, None)
- domAlias.delete()
+ aliasDom = AliasDomain(self.__dbh, aliasname, None)
+ aliasDom.delete()
def domainList(self, pattern=None):
from Domain import search
--- a/po/de.po Fri Aug 22 16:25:15 2008 +0000
+++ b/po/de.po Fri Aug 22 20:00:50 2008 +0000
@@ -6,8 +6,8 @@
msgstr ""
"Project-Id-Version: vmm 0.5\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-08-22 03:32+0200\n"
-"PO-Revision-Date: 2008-08-22 03:33+0200\n"
+"POT-Creation-Date: 2008-08-22 21:37+0200\n"
+"PO-Revision-Date: 2008-08-22 21:57+0200\n"
"Last-Translator: Pascal Volk <p.volk@veb-it.de>\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
@@ -15,49 +15,51 @@
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: VirtualMailManager/Account.py:40
+#: VirtualMailManager/Account.py:39
#, python-format
msgid "There is already an alias with the address »%s«."
msgstr "Es existiert bereits ein Alias mit der Adresse »%s«."
-#: VirtualMailManager/Account.py:72
+#: VirtualMailManager/Account.py:71 VirtualMailManager/Alias.py:72
+#: VirtualMailManager/Domain.py:155 VirtualMailManager/Domain.py:179
+#: VirtualMailManager/Domain.py:209
#, python-format
-msgid "Domain »%s« doesn't exist."
-msgstr "Die Domain »%s« existiert nicht."
+msgid "The domain »%s« doesn't exist yet."
+msgstr "Die Domain »%s« existiert noch nicht."
-#: VirtualMailManager/Account.py:91
+#: VirtualMailManager/Account.py:90
#, python-format
msgid "Unknown service »%s«."
msgstr "Unbekannter Service »%s«."
-#: VirtualMailManager/Account.py:94 VirtualMailManager/Account.py:151
-#: VirtualMailManager/Account.py:178 VirtualMailManager/Account.py:206
+#: VirtualMailManager/Account.py:93 VirtualMailManager/Account.py:150
+#: VirtualMailManager/Account.py:177 VirtualMailManager/Account.py:205
#, python-format
msgid "The account »%s« doesn't exists."
msgstr "Der Account »%s« existiert nicht."
-#: VirtualMailManager/Account.py:146
+#: VirtualMailManager/Account.py:145
#, python-format
msgid "The account »%s« already exists."
msgstr "Der Account »%s« existiert bereits."
-#: VirtualMailManager/Account.py:186
+#: VirtualMailManager/Account.py:185
msgid "enabled"
msgstr "aktiviert"
-#: VirtualMailManager/Account.py:188
+#: VirtualMailManager/Account.py:187
msgid "disabled"
msgstr "deaktiviert"
-#: VirtualMailManager/Account.py:214
+#: VirtualMailManager/Account.py:213
msgid "uid must be an int/long."
msgstr "Die UID muss eine Ganzzahl sein."
-#: VirtualMailManager/Account.py:217
+#: VirtualMailManager/Account.py:215
msgid "uid must be greater than 0."
msgstr "Die UID muss größer als 0 sein."
-#: VirtualMailManager/Account.py:227
+#: VirtualMailManager/Account.py:223
#, python-format
msgid "There is no account with the UID »%d«."
msgstr "Es existiert kein Account mit der UID »%d«."
@@ -71,12 +73,6 @@
msgid "There is already an account with address »%s«."
msgstr "Es gibt bereits einen Account mit der Adresse »%s«."
-#: VirtualMailManager/Alias.py:72 VirtualMailManager/Domain.py:155
-#: VirtualMailManager/Domain.py:179 VirtualMailManager/Domain.py:209
-#, python-format
-msgid "The domain »%s« doesn't exist yet."
-msgstr "Die Domain »%s« existiert noch nicht."
-
#: VirtualMailManager/Alias.py:77
msgid "No destination address for alias denoted."
msgstr "Keine Ziel-Adresse für den Alias angegeben."
@@ -91,6 +87,35 @@
msgid "The alias »%s« doesn't exists."
msgstr "Der Alias »%s« existiert nicht."
+#: VirtualMailManager/AliasDomain.py:38
+#, python-format
+msgid "The domain »%s« is a primary domain."
+msgstr "Die Domain »%s« ist eine primäre Domain."
+
+#: VirtualMailManager/AliasDomain.py:43
+#, python-format
+msgid "The alias domain »%s« already exists."
+msgstr "Die Alias-Domain »%s« existiert bereits."
+
+#: VirtualMailManager/AliasDomain.py:46
+msgid "No destination domain for alias domain denoted."
+msgstr "Keine Ziel-Domain für die Alias-Domain angegeben."
+
+#: VirtualMailManager/AliasDomain.py:49
+#, python-format
+msgid "The target domain »%s« doesn't exist yet."
+msgstr "Die Ziel-Domain »%s« existiert noch nicht."
+
+#: VirtualMailManager/AliasDomain.py:69
+#, python-format
+msgid "There is no primary domain for the alias domain »%s«."
+msgstr "Es gibt keine primäre Domain für die Alias-Domain »%s«."
+
+#: VirtualMailManager/AliasDomain.py:73 VirtualMailManager/AliasDomain.py:85
+#, python-format
+msgid "The alias domain »%s« doesn't exist yet."
+msgstr "Die Alias-Domain »%s« existiert noch nicht."
+
#: VirtualMailManager/Config.py:101
#, python-format
msgid "missing section: %s\n"
@@ -128,40 +153,6 @@
msgid "The domain »%s« already exists."
msgstr "Die Domain »%s« existiert bereits."
-#: VirtualMailManager/DomainAlias.py:38
-#, python-format
-msgid "The domain »%s« is a primary domain."
-msgstr "Die Domain »%s« ist eine primäre Domain."
-
-#: VirtualMailManager/DomainAlias.py:43
-#, python-format
-msgid "The domain alias »%s« already exists."
-msgstr "Der Domain-Alias »%s« existiert bereits."
-
-#: VirtualMailManager/DomainAlias.py:46
-msgid "No destination domain for alias domain denoted."
-msgstr "Keine Ziel-Domain für die Alias-Domain angegeben."
-
-#: VirtualMailManager/DomainAlias.py:49
-#, python-format
-msgid "The target domain »%s« doesn't exist yet."
-msgstr "Die Ziel-Domain »%s« existiert noch nicht."
-
-#: VirtualMailManager/DomainAlias.py:66
-#, python-format
-msgid "The domain alias »%(alias)s« belongs to »%(dom)s«."
-msgstr "Der Domain-Alias »%(alias)s« gehört zu »%(dom)s«."
-
-#: VirtualMailManager/DomainAlias.py:70
-#, python-format
-msgid "There is no primary domain for the domain alias »%s«."
-msgstr "Es gibt keine primäre Domain für den Domain-Alias »%s«."
-
-#: VirtualMailManager/DomainAlias.py:74 VirtualMailManager/DomainAlias.py:86
-#, python-format
-msgid "The domain alias »%s« doesn't exist yet."
-msgstr "Der Domain-Alias »%s« existiert noch nicht."
-
#: VirtualMailManager/MailLocation.py:34
msgid "Either mid or maillocation must be specified."
msgstr "Entweder mid oder maillocation muss angegeben werden."
@@ -368,7 +359,7 @@
" kurz lang\n"
" Unterbefehl Objekt args (* = optional)\n"
-#: vmm:75 vmm:86 vmm:412
+#: vmm:75 vmm:86 vmm:422
msgid "Error"
msgstr "Fehler"
@@ -380,7 +371,7 @@
msgid "Available"
msgstr "Verfügbare"
-#: vmm:121 vmm:200
+#: vmm:121 vmm:211
msgid "alias domains"
msgstr "Alias-Domains"
@@ -394,8 +385,8 @@
#: vmm:137
#, python-format
-msgid "\tMail for %s goes to:"
-msgstr "\tE-Mails für %s gehen an:"
+msgid "\tMail for %s will be redirected to:"
+msgstr "\tE-Mails für %s werden weitergeleitet an:"
#: vmm:155
msgid "Available domains"
@@ -405,90 +396,103 @@
msgid "Matching domains"
msgstr "Übereinstimmende Domains"
-#: vmm:178 vmm:186 vmm:194
+#: vmm:171
+msgid "Alias domain information"
+msgstr "Alias-Domain Informationen"
+
+#: vmm:177
+#, python-format
+msgid ""
+"\tThe alias domain %(alias)s belongs to:\n"
+"\t * %(domain)s"
+msgstr ""
+"\tDie Alias-Domain »%(alias)s« gehört zu:\n"
+"\t * %(domain)s."
+
+#: vmm:189 vmm:197 vmm:205
msgid "Missing domain name."
msgstr "Kein Domain-Name angegeben."
-#: vmm:196 vmm:199
+#: vmm:207 vmm:210
msgid "Domain"
msgstr "Domain"
-#: vmm:201
+#: vmm:212
msgid "accounts"
msgstr "Accounts"
-#: vmm:202
+#: vmm:213
msgid "aliases"
msgstr "Aliase"
-#: vmm:206
+#: vmm:217
msgid "Missing domain name and new transport."
msgstr "Domain-Name und neuer Transport fehlen."
-#: vmm:208
+#: vmm:219
msgid "Missing new transport."
msgstr "Neuer Transport fehlt."
-#: vmm:217
+#: vmm:228
msgid "Missing alias domain name and target domain name."
msgstr "Domain-Namen für Alias- und Ziel-Domain fehlen."
-#: vmm:219
+#: vmm:230
msgid "Missing target domain name."
msgstr "Keine Ziel-Domain angegeben."
-#: vmm:225 vmm:232
+#: vmm:236 vmm:242
msgid "Missing alias domain name."
msgstr "Keine Alias-Domain angegeben."
-#: vmm:238 vmm:247 vmm:253 vmm:277 vmm:285 vmm:293
+#: vmm:248 vmm:257 vmm:263 vmm:287 vmm:295 vmm:303
msgid "Missing e-mail address."
msgstr "E-Mail-Adresse fehlt."
-#: vmm:261
+#: vmm:271
msgid "Missing e-mail address and users name."
msgstr "E-Mail-Adresse und der Name des Benutzers fehlen."
-#: vmm:263
+#: vmm:273
msgid "Missing users name."
msgstr "Name des Benutzers fehlt."
-#: vmm:269
+#: vmm:279
msgid "Missing e-mail address and transport."
msgstr "E-Mail-Adresse und Transport fehlen."
-#: vmm:271
+#: vmm:281
msgid "Missing transport."
msgstr "Transport fehlt."
-#: vmm:302
+#: vmm:312
msgid "Missing alias address and destination."
msgstr "Alias- und Ziel-Adresse fehlen."
-#: vmm:308 vmm:314
+#: vmm:318 vmm:324
msgid "Missing alias address"
msgstr "Alias-Adresse fehlt."
-#: vmm:322
+#: vmm:332
msgid "Missing userid"
msgstr "Keine UID angegeben."
-#: vmm:335
+#: vmm:345
msgid "Warnings:"
msgstr "Warnungen:"
-#: vmm:340
+#: vmm:350
msgid "version"
msgstr "Version"
-#: vmm:341
+#: vmm:351
msgid "from"
msgstr "vom"
-#: vmm:407
+#: vmm:417
msgid "Unknown subcommand"
msgstr "Unbekannter Unterbefehl"
-#: vmm:410
+#: vmm:420
msgid "Ouch"
msgstr "Autsch"
--- a/po/vmm.pot Fri Aug 22 16:25:15 2008 +0000
+++ b/po/vmm.pot Fri Aug 22 20:00:50 2008 +0000
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: vmm 0.5\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-08-22 03:32+0200\n"
+"POT-Creation-Date: 2008-08-22 21:37+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,49 +16,51 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: VirtualMailManager/Account.py:40
+#: VirtualMailManager/Account.py:39
#, python-format
msgid "There is already an alias with the address »%s«."
msgstr ""
-#: VirtualMailManager/Account.py:72
+#: VirtualMailManager/Account.py:71 VirtualMailManager/Alias.py:72
+#: VirtualMailManager/Domain.py:155 VirtualMailManager/Domain.py:179
+#: VirtualMailManager/Domain.py:209
#, python-format
-msgid "Domain »%s« doesn't exist."
+msgid "The domain »%s« doesn't exist yet."
msgstr ""
-#: VirtualMailManager/Account.py:91
+#: VirtualMailManager/Account.py:90
#, python-format
msgid "Unknown service »%s«."
msgstr ""
-#: VirtualMailManager/Account.py:94 VirtualMailManager/Account.py:151
-#: VirtualMailManager/Account.py:178 VirtualMailManager/Account.py:206
+#: VirtualMailManager/Account.py:93 VirtualMailManager/Account.py:150
+#: VirtualMailManager/Account.py:177 VirtualMailManager/Account.py:205
#, python-format
msgid "The account »%s« doesn't exists."
msgstr ""
-#: VirtualMailManager/Account.py:146
+#: VirtualMailManager/Account.py:145
#, python-format
msgid "The account »%s« already exists."
msgstr ""
-#: VirtualMailManager/Account.py:186
+#: VirtualMailManager/Account.py:185
msgid "enabled"
msgstr ""
-#: VirtualMailManager/Account.py:188
+#: VirtualMailManager/Account.py:187
msgid "disabled"
msgstr ""
-#: VirtualMailManager/Account.py:214
+#: VirtualMailManager/Account.py:213
msgid "uid must be an int/long."
msgstr ""
-#: VirtualMailManager/Account.py:217
+#: VirtualMailManager/Account.py:215
msgid "uid must be greater than 0."
msgstr ""
-#: VirtualMailManager/Account.py:227
+#: VirtualMailManager/Account.py:223
#, python-format
msgid "There is no account with the UID »%d«."
msgstr ""
@@ -72,12 +74,6 @@
msgid "There is already an account with address »%s«."
msgstr ""
-#: VirtualMailManager/Alias.py:72 VirtualMailManager/Domain.py:155
-#: VirtualMailManager/Domain.py:179 VirtualMailManager/Domain.py:209
-#, python-format
-msgid "The domain »%s« doesn't exist yet."
-msgstr ""
-
#: VirtualMailManager/Alias.py:77
msgid "No destination address for alias denoted."
msgstr ""
@@ -92,6 +88,35 @@
msgid "The alias »%s« doesn't exists."
msgstr ""
+#: VirtualMailManager/AliasDomain.py:38
+#, python-format
+msgid "The domain »%s« is a primary domain."
+msgstr ""
+
+#: VirtualMailManager/AliasDomain.py:43
+#, python-format
+msgid "The alias domain »%s« already exists."
+msgstr ""
+
+#: VirtualMailManager/AliasDomain.py:46
+msgid "No destination domain for alias domain denoted."
+msgstr ""
+
+#: VirtualMailManager/AliasDomain.py:49
+#, python-format
+msgid "The target domain »%s« doesn't exist yet."
+msgstr ""
+
+#: VirtualMailManager/AliasDomain.py:69
+#, python-format
+msgid "There is no primary domain for the alias domain »%s«."
+msgstr ""
+
+#: VirtualMailManager/AliasDomain.py:73 VirtualMailManager/AliasDomain.py:85
+#, python-format
+msgid "The alias domain »%s« doesn't exist yet."
+msgstr ""
+
#: VirtualMailManager/Config.py:101
#, python-format
msgid "missing section: %s\n"
@@ -129,40 +154,6 @@
msgid "The domain »%s« already exists."
msgstr ""
-#: VirtualMailManager/DomainAlias.py:38
-#, python-format
-msgid "The domain »%s« is a primary domain."
-msgstr ""
-
-#: VirtualMailManager/DomainAlias.py:43
-#, python-format
-msgid "The domain alias »%s« already exists."
-msgstr ""
-
-#: VirtualMailManager/DomainAlias.py:46
-msgid "No destination domain for alias domain denoted."
-msgstr ""
-
-#: VirtualMailManager/DomainAlias.py:49
-#, python-format
-msgid "The target domain »%s« doesn't exist yet."
-msgstr ""
-
-#: VirtualMailManager/DomainAlias.py:66
-#, python-format
-msgid "The domain alias »%(alias)s« belongs to »%(dom)s«."
-msgstr ""
-
-#: VirtualMailManager/DomainAlias.py:70
-#, python-format
-msgid "There is no primary domain for the domain alias »%s«."
-msgstr ""
-
-#: VirtualMailManager/DomainAlias.py:74 VirtualMailManager/DomainAlias.py:86
-#, python-format
-msgid "The domain alias »%s« doesn't exist yet."
-msgstr ""
-
#: VirtualMailManager/MailLocation.py:34
msgid "Either mid or maillocation must be specified."
msgstr ""
@@ -350,7 +341,7 @@
" subcommand object args (* = optional)\n"
msgstr ""
-#: vmm:75 vmm:86 vmm:412
+#: vmm:75 vmm:86 vmm:422
msgid "Error"
msgstr ""
@@ -362,7 +353,7 @@
msgid "Available"
msgstr ""
-#: vmm:121 vmm:200
+#: vmm:121 vmm:211
msgid "alias domains"
msgstr ""
@@ -376,7 +367,7 @@
#: vmm:137
#, python-format
-msgid "\tMail for %s goes to:"
+msgid "\tMail for %s will be redirected to:"
msgstr ""
#: vmm:155
@@ -387,90 +378,101 @@
msgid "Matching domains"
msgstr ""
-#: vmm:178 vmm:186 vmm:194
+#: vmm:171
+msgid "Alias domain information"
+msgstr ""
+
+#: vmm:177
+#, python-format
+msgid ""
+"\tThe alias domain %(alias)s belongs to:\n"
+"\t * %(domain)s"
+msgstr ""
+
+#: vmm:189 vmm:197 vmm:205
msgid "Missing domain name."
msgstr ""
-#: vmm:196 vmm:199
+#: vmm:207 vmm:210
msgid "Domain"
msgstr ""
-#: vmm:201
+#: vmm:212
msgid "accounts"
msgstr ""
-#: vmm:202
+#: vmm:213
msgid "aliases"
msgstr ""
-#: vmm:206
+#: vmm:217
msgid "Missing domain name and new transport."
msgstr ""
-#: vmm:208
+#: vmm:219
msgid "Missing new transport."
msgstr ""
-#: vmm:217
+#: vmm:228
msgid "Missing alias domain name and target domain name."
msgstr ""
-#: vmm:219
+#: vmm:230
msgid "Missing target domain name."
msgstr ""
-#: vmm:225 vmm:232
+#: vmm:236 vmm:242
msgid "Missing alias domain name."
msgstr ""
-#: vmm:238 vmm:247 vmm:253 vmm:277 vmm:285 vmm:293
+#: vmm:248 vmm:257 vmm:263 vmm:287 vmm:295 vmm:303
msgid "Missing e-mail address."
msgstr ""
-#: vmm:261
+#: vmm:271
msgid "Missing e-mail address and users name."
msgstr ""
-#: vmm:263
+#: vmm:273
msgid "Missing users name."
msgstr ""
-#: vmm:269
+#: vmm:279
msgid "Missing e-mail address and transport."
msgstr ""
-#: vmm:271
+#: vmm:281
msgid "Missing transport."
msgstr ""
-#: vmm:302
+#: vmm:312
msgid "Missing alias address and destination."
msgstr ""
-#: vmm:308 vmm:314
+#: vmm:318 vmm:324
msgid "Missing alias address"
msgstr ""
-#: vmm:322
+#: vmm:332
msgid "Missing userid"
msgstr ""
-#: vmm:335
+#: vmm:345
msgid "Warnings:"
msgstr ""
-#: vmm:340
+#: vmm:350
msgid "version"
msgstr ""
-#: vmm:341
+#: vmm:351
msgid "from"
msgstr ""
-#: vmm:407
+#: vmm:417
msgid "Unknown subcommand"
msgstr ""
-#: vmm:410
+#: vmm:420
msgid "Ouch"
msgstr ""
--- a/vmm Fri Aug 22 16:25:15 2008 +0000
+++ b/vmm Fri Aug 22 20:00:50 2008 +0000
@@ -48,9 +48,9 @@
di domaininfo domain.tld detailed*
dt domaintransport domain.tld transport force*
dd domaindelete domain.tld delalias*|deluser*|delall*
- daa domainaliasadd aliasdomain.tld domain.tld
- dai domainaliasinfo aliasdomain.tld
- dad domainaliasdelete aliasdomain.tld
+ ada aliasdomainadd aliasdomain.tld domain.tld
+ adi aliasdomaininfo aliasdomain.tld
+ add aliasdomaindelete aliasdomain.tld
ua useradd user@domain.tld password*
ui userinfo user@domain.tld du*
un username user@domain.tld 'Users Name'
@@ -134,10 +134,10 @@
def _printAliases(alias, targets):
msg = _('Alias information')
w_std('%s\n%s' % (msg, '-'*len(msg)))
- w_std(_('\tMail for %s goes to:') % alias)
+ w_std(_('\tMail for %s will be redirected to:') % alias)
if len(targets) > 0:
for target in targets:
- w_std('\t -> %s' % target)
+ w_std('\t * %s' % target)
else:
w_std(_('\tNone'))
print
@@ -167,6 +167,17 @@
w_std(_formatDom(alias, main=False))
print
+def _printAliasDomInfo(info):
+ msg = _('Alias domain information')
+ for k in ['alias', 'domain']:
+ if info[k].startswith('xn--'):
+ info[k] = "%s (%s)" % (info[k], vmm.ace2idna(info[k]))
+ w_std('%s\n%s' % (msg, '-'*len(msg)))
+ w_std(
+ _('\tThe alias domain %(alias)s belongs to:\n\t * %(domain)s')%info)
+ print
+
+
def configure():
if need_setup or len(argv) < 3:
vmm.configure()
@@ -211,27 +222,26 @@
else:
vmm.domainTransport(argv[2].lower(), argv[3], argv[4])
-def domain_alias_add():
+def alias_domain_add():
if argc < 3:
usage(EXIT.MISSING_ARGS,
_(u'Missing alias domain name and target domain name.'))
elif argc < 4:
usage(EXIT.MISSING_ARGS, _(u'Missing target domain name.'))
else:
- vmm.domainAliasAdd(argv[2].lower(), argv[3].lower())
+ vmm.aliasDomainAdd(argv[2].lower(), argv[3].lower())
-def domain_alias_info():
+def alias_domain_info():
if argc < 3:
usage(EXIT.MISSING_ARGS, _(u'Missing alias domain name.'))
else:
- info = vmm.domainAliasInfo(argv[2].lower())
- w_std(info+'\n')
+ _printAliasDomInfo(vmm.aliasDomainInfo(argv[2].lower()))
-def domain_alias_delete():
+def alias_domain_delete():
if argc < 3:
usage(EXIT.MISSING_ARGS, _(u'Missing alias domain name.'))
else:
- vmm.domainAliasDelete(argv[2].lower())
+ vmm.aliasDomainDelete(argv[2].lower())
def user_add():
if argc < 3:
@@ -366,12 +376,12 @@
domain_transport()
elif argv[1] in ['dd', 'domaindelete']:
domain_delete()
- elif argv[1] in ['daa', 'domainaliasadd']:
- domain_alias_add()
- elif argv[1] in ['dai', 'domainaliasinfo']:
- domain_alias_info()
- elif argv[1] in ['dad', 'domainaliasdelete']:
- domain_alias_delete()
+ elif argv[1] in ['ada', 'aliasdomainadd']:
+ alias_domain_add()
+ elif argv[1] in ['adi', 'aliasdomaininfo']:
+ alias_domain_info()
+ elif argv[1] in ['add', 'aliasdomaindelete']:
+ alias_domain_delete()
elif argv[1] in ['ua', 'useradd']:
user_add()
elif argv[1] in ['ui', 'userinfo']: