vmm
changeset 115 21f264a88ab2
parent 113 e35755191ff3
child 133 2d5c4745efec
equal deleted inserted replaced
114:e671210b04b8 115:21f264a88ab2
    83             VMME.VMMConfigException), e:
    83             VMME.VMMConfigException), e:
    84         w_err(e.code(), "%s: %s\n" % (_('Error'), e.msg()))
    84         w_err(e.code(), "%s: %s\n" % (_('Error'), e.msg()))
    85 
    85 
    86 def _getOrder():
    86 def _getOrder():
    87     order = ()
    87     order = ()
       
    88     if vmm.cfgGetInt('misc', 'dovecotvers') > 11:
       
    89         sieve_name = 'sieve'
       
    90     else:
       
    91         sieve_name = 'managesieve'
    88     if argv[1] in ['di', 'domaininfo']:
    92     if argv[1] in ['di', 'domaininfo']:
    89         order = (('domainname', 0), ('gid', 1), ('transport', 0),
    93         order = (('domainname', 0), ('gid', 1), ('transport', 0),
    90                 ('domaindir', 0), ('aliasdomains', 0), ('accounts', 0),
    94                 ('domaindir', 0), ('aliasdomains', 0), ('accounts', 0),
    91                 ('aliases', 0), ('relocated', 0))
    95                 ('aliases', 0), ('relocated', 0))
    92     elif argv[1] in ['ui', 'userinfo']:
    96     elif argv[1] in ['ui', 'userinfo']:
    93         if argc == 4 and argv[3] != 'aliases'\
    97         if argc == 4 and argv[3] != 'aliases'\
    94         or vmm.cfgGetBoolean('maildir', 'diskusage'):
    98         or vmm.cfgGetBoolean('maildir', 'diskusage'):
    95             order = (('address', 0), ('name', 0), ('uid', 1), ('gid', 1),
    99             order = (('address', 0), ('name', 0), ('uid', 1), ('gid', 1),
    96                     ('transport', 0), ('maildir', 0), ('disk usage', 0),
   100                     ('transport', 0), ('maildir', 0), ('disk usage', 0),
    97                     ('smtp', 1), ('pop3', 1), ('imap', 1), ('sieve', 1))
   101                     ('smtp', 1), ('pop3', 1), ('imap', 1), (sieve_name, 1))
    98         else:
   102         else:
    99             order = (('address', 0), ('name', 0), ('uid', 1), ('gid', 1),
   103             order = (('address', 0), ('name', 0), ('uid', 1), ('gid', 1),
   100                     ('transport', 0), ('maildir', 0), ('smtp', 1), ('pop3', 1),
   104                     ('transport', 0), ('maildir', 0), ('smtp', 1), ('pop3', 1),
   101                     ('imap', 1), ('sieve', 1))
   105                     ('imap', 1), (sieve_name, 1))
   102     elif argv[1] in ['gu', 'getuser']:
   106     elif argv[1] in ['gu', 'getuser']:
   103         order = (('uid', 1), ('gid', 1), ('address', 0))
   107         order = (('uid', 1), ('gid', 1), ('address', 0))
   104     return order
   108     return order
   105 
   109 
   106 def _printInfo(info, title):
   110 def _printInfo(info, title):