Removed remaining use of full_address to search for a mailbox.
This commit is contained in:
tonio
2011-01-09 18:44:43 +01:00
parent 8d04197502
commit abd924aea6
3 changed files with 18 additions and 13 deletions
+10
View File
@@ -173,3 +173,13 @@ def crypt_password(password):
if scheme == "md5":
return hashlib.md5(password).hexdigest()
return password
def split_mailbox(mailbox):
parts = mailbox.split('@')
if len(parts) == 2:
address = parts[0]
domain = parts[1]
else:
domain = parts[-1]
address = "@".join(parts[:-1])
return (address, domain)