VirtualMailManager/account.py
changeset 613 7b3494f1a2ef
parent 611 8e9b0046bc8f
child 614 1ec3497a6733
--- 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()