Exemple #1
0
 def update_mailbox_storage(self, storage):
     mysql_helper = MysqlHelper(self.da_ip, self.port, self.db_name,
                                self.db_user, self.db_password)
     sql = "update mailbox set quota_storage='%s' where username='******';" % (
         storage, self.mail_user)
     mysql_helper.update(sql)
     mysql_helper.close()
Exemple #2
0
 def update_admin_password(self, password):
     mysqlhelper = MysqlHelper(self.ip, self.port, self.dbname, self.dbuser,
                               self.dbpassword)
     sql = "update administrator set password = '******' where username='******'" % (
         password, self.username)
     mysqlhelper.update(sql)
     mysqlhelper.close()
Exemple #3
0
 def update_baseid_nfsid(self, **new_da_id):
     list_mail_user = self.mail_user.split('@')
     user_id = list_mail_user[0]
     domain_name = list_mail_user[1]
     mysql_helper = MysqlHelper(self.ip, self.port, self.db_name,
                                self.db_user, self.db_password)
     setsql = ','.join(['%s=%r' % (k, new_da_id[k]) for k in new_da_id])
     sql = "update usersinfo set %s where userid='%s' and domainid=(select domain_id from domain where domain_name='%s')" % (
         setsql, user_id, domain_name)
     mysql_helper.update(sql)