242 Create a new dbox instance. |
242 Create a new dbox instance. |
243 Call the instance's create() method, in order to create the INBOX. |
243 Call the instance's create() method, in order to create the INBOX. |
244 For additional mailboxes use the add_boxes() method. |
244 For additional mailboxes use the add_boxes() method. |
245 """ |
245 """ |
246 assert cfg_dget('misc.dovecot_version') >= \ |
246 assert cfg_dget('misc.dovecot_version') >= \ |
247 account.mail_location.dovecot_version |
247 account.mail_location.dovecot_version |
248 super(SingleDbox, self).__init__(account) |
248 super(SingleDbox, self).__init__(account) |
249 |
249 |
250 def _doveadm_create(self, mailboxes, subscribe): |
250 def _doveadm_create(self, mailboxes, subscribe): |
251 """Wrap around Dovecot's doveadm""" |
251 """Wrap around Dovecot's doveadm""" |
252 cmd_args = [cfg_dget('bin.dovecotpw'), 'mailbox', 'create', '-u', |
252 cmd_args = [cfg_dget('bin.doveadm'), 'mailbox', 'create', '-u', |
253 str(self._user.address)] |
253 str(self._user.address)] |
254 if subscribe: |
254 if subscribe: |
255 cmd_args.append('-s') |
255 cmd_args.append('-s') |
256 cmd_args.extend(mailboxes) |
256 cmd_args.extend(mailboxes) |
257 process = Popen(cmd_args, stderr=PIPE) |
257 process = Popen(cmd_args, stderr=PIPE) |