man/{,de/}man5: added a note about how to use default settings.
man/de/man5: s/Abschnitt*/Sektion*/g
# -*- coding: UTF-8 -*-# Copyright (c) 2008 - 2010, Pascal Volk# See COPYING for distribution information."""Virtual Mail Manager's EmailAddress class to handle e-mail addresses."""from__main__importre,ERRfromExceptionsimportVMMEmailAddressExceptionasVMMEAEimportVirtualMailManagerasVMMRE_LOCALPART="""[^\w!#$%&'\*\+-\.\/=?^_`{\|}~]"""classEmailAddress(object):__slots__=('_localpart','_domainname')def__init__(self,address):self._localpart=Noneself._domainname=Noneself.__chkAddress(address)def__eq__(self,other):ifisinstance(other,self.__class__):returnself._localpart==other._localpart\andself._domainname==other._domainnamereturnNotImplementeddef__ne__(self,other):ifisinstance(other,self.__class__):returnself._localpart!=other._localpart\orself._domainname!=other._domainnamereturnNotImplementeddef__repr__(self):return"EmailAddress('%s@%s')"%(self._localpart,self._domainname)def__str__(self):return"%s@%s"%(self._localpart,self._domainname)def__chkAddress(self,address):try:localpart,domain=address.split('@')exceptValueError:raiseVMMEAE(_(u"Missing '@' sign in e-mail address “%s”.")%address,ERR.INVALID_ADDRESS)exceptAttributeError:raiseVMMEAE(_(u"“%s” doesn't look like an e-mail address.")%address,ERR.INVALID_ADDRESS)iflen(domain)>0:domain=VMM.VirtualMailManager.chkDomainname(domain)else:raiseVMMEAE(_(u"Missing domain name after “%s@”.")%localpart,ERR.DOMAIN_NO_NAME)localpart=self.__chkLocalpart(localpart)self._localpart,self._domainname=localpart,domaindef__chkLocalpart(self,localpart):"""Validates the local-part of an e-mail address. Arguments: localpart -- local-part of the e-mail address that should be validated (str) """iflen(localpart)<1:raiseVMMEAE(_(u'No local-part specified.'),ERR.LOCALPART_INVALID)iflen(localpart)>64:raiseVMMEAE(_(u'The local-part “%s” is too long')%localpart,ERR.LOCALPART_TOO_LONG)ic=set(re.findall(RE_LOCALPART,localpart))iflen(ic):ichrs=''forcinic:ichrs+=u"“%s” "%craiseVMMEAE(_(u"The local-part “%(lpart)s” contains invalid\ characters: %(ichrs)s")%{'lpart':localpart,'ichrs':ichrs},ERR.LOCALPART_INVALID)returnlocalpart