VirtualMailManager/common.py
changeset 583 a479c38931c4
parent 582 605f8c115711
child 586 cd1200d06700
equal deleted inserted replaced
582:605f8c115711 583:a479c38931c4
   219     queries = []
   219     queries = []
   220     if typelimit & TYPE_ACCOUNT:
   220     if typelimit & TYPE_ACCOUNT:
   221         queries.append('SELECT gid, local_part, %d AS type FROM users'
   221         queries.append('SELECT gid, local_part, %d AS type FROM users'
   222                        % TYPE_ACCOUNT)
   222                        % TYPE_ACCOUNT)
   223     if typelimit & TYPE_ALIAS:
   223     if typelimit & TYPE_ALIAS:
   224         queries.append('SELECT gid, address as local_part, %d AS type '
   224         queries.append('SELECT DISTINCT gid, address as local_part, %d AS type '
   225                        'FROM alias' % TYPE_ALIAS)
   225                        'FROM alias' % TYPE_ALIAS)
   226     if typelimit & TYPE_RELOCATED:
   226     if typelimit & TYPE_RELOCATED:
   227         queries.append('SELECT gid, address as local_part, %d AS type '
   227         queries.append('SELECT gid, address as local_part, %d AS type '
   228                        'FROM relocated' % TYPE_RELOCATED)
   228                        'FROM relocated' % TYPE_RELOCATED)
   229     sql  = "SELECT gid, local_part || '@' || domainname AS address, "
   229     sql  = "SELECT gid, local_part || '@' || domainname AS address, "