equal
deleted
inserted
replaced
194 MailLocation(self._dbh, |
194 MailLocation(self._dbh, |
195 mid=info['maildir']).getMailLocation()) |
195 mid=info['maildir']).getMailLocation()) |
196 info['transport'] = Transport(self._dbh, |
196 info['transport'] = Transport(self._dbh, |
197 tid=info['transport']).getTransport() |
197 tid=info['transport']).getTransport() |
198 return info |
198 return info |
|
199 |
|
200 def getAliases(self): |
|
201 dbc = self._dbh.cursor() |
|
202 dbc.execute("SELECT address ||'@'|| domainname FROM alias, domain_name\ |
|
203 WHERE destination = %s AND domain_name.gid = alias.gid\ |
|
204 AND domain_name.is_primary", str(self._addr)) |
|
205 addresses = dbc.fetchall() |
|
206 dbc.close() |
|
207 aliases = [] |
|
208 if len(addresses) > 0: |
|
209 for alias in addresses: |
|
210 aliases.append(alias[0]) |
|
211 return aliases |
199 |
212 |
200 def delete(self, delalias): |
213 def delete(self, delalias): |
201 if self._uid < 1: |
214 if self._uid < 1: |
202 raise AccE(_(u"The account »%s« doesn't exists.") % self._addr, |
215 raise AccE(_(u"The account »%s« doesn't exists.") % self._addr, |
203 ERR.NO_SUCH_ACCOUNT) |
216 ERR.NO_SUCH_ACCOUNT) |