179 return True |
179 return True |
180 _exists = staticmethod(_exists) |
180 _exists = staticmethod(_exists) |
181 |
181 |
182 def accountExists(dbh, address): |
182 def accountExists(dbh, address): |
183 sql = "SELECT gid FROM users WHERE gid = (SELECT gid FROM domain_name\ |
183 sql = "SELECT gid FROM users WHERE gid = (SELECT gid FROM domain_name\ |
184 WHERE domainname = '%(_domainname)s') AND local_part = '%(_localpart)s'" %\ |
184 WHERE domainname = '%s') AND local_part = '%s'" % (address._domainname, |
185 address.__dict__ |
185 address._localpart) |
186 return VirtualMailManager._exists(dbh, sql) |
186 return VirtualMailManager._exists(dbh, sql) |
187 accountExists = staticmethod(accountExists) |
187 accountExists = staticmethod(accountExists) |
188 |
188 |
189 def aliasExists(dbh, address): |
189 def aliasExists(dbh, address): |
190 sql = "SELECT DISTINCT gid FROM alias WHERE gid = (SELECT gid FROM\ |
190 sql = "SELECT DISTINCT gid FROM alias WHERE gid = (SELECT gid FROM\ |
191 domain_name WHERE domainname = '%(_domainname)s') AND address =\ |
191 domain_name WHERE domainname = '%s') AND address = '%s'" %\ |
192 '%(_localpart)s'" % address.__dict__ |
192 (address._domainname, address._localpart) |
193 return VirtualMailManager._exists(dbh, sql) |
193 return VirtualMailManager._exists(dbh, sql) |
194 aliasExists = staticmethod(aliasExists) |
194 aliasExists = staticmethod(aliasExists) |
195 |
195 |
196 def relocatedExists(dbh, address): |
196 def relocatedExists(dbh, address): |
197 sql = "SELECT gid FROM relocated WHERE gid = (SELECT gid FROM\ |
197 sql = "SELECT gid FROM relocated WHERE gid = (SELECT gid FROM\ |
198 domain_name WHERE domainname = '%(_domainname)s') AND address =\ |
198 domain_name WHERE domainname = '%s') AND address = '%s'" %\ |
199 '%(_localpart)s'" % address.__dict__ |
199 (address._domainname, address._localpart) |
200 return VirtualMailManager._exists(dbh, sql) |
200 return VirtualMailManager._exists(dbh, sql) |
201 relocatedExists = staticmethod(relocatedExists) |
201 relocatedExists = staticmethod(relocatedExists) |
202 |
202 |
203 def _readpass(self): |
203 def _readpass(self): |
204 mismatched = True |
204 mismatched = True |