VMM/account: Fixed account's transport check.
Make sure that 'virtual:' isn't used as transport when the mailbox-format
is set to mdbox or sdbox.
--- a/VirtualMailManager/account.py Wed Sep 12 19:19:05 2012 +0000
+++ b/VirtualMailManager/account.py Sat Sep 15 17:31:34 2012 +0000
@@ -124,11 +124,12 @@
'mbfmt': maillocation.mbformat,
'version': version_str(maillocation.dovecot_version)},
INVALID_MAIL_LOCATION)
- if self._transport and not maillocation.postfix and \
- self._transport.transport.lower() in ('virtual:', 'virtual'):
+ transport = self._transport or self._domain.transport
+ if not maillocation.postfix and \
+ transport.transport.lower() in ('virtual:', 'virtual'):
raise AErr(_(u"Invalid transport '%(transport)s' for mailbox "
u"format '%(mbfmt)s'.") %
- {'transport': self._transport,
+ {'transport': transport,
'mbfmt': maillocation.mbformat}, INVALID_MAIL_LOCATION)
self._mail = maillocation
self._set_uid()