Skip to content
Permalink
Browse files

lowercase the username input for emailaddy

lowercase the username input so the email address is valid for dovecot mail delivery. Fix confirmed bug referenced:
https://forums.cyberpanel.net/discussion/2345/creating-new-email-account-fail#latest
  • Loading branch information
whattheserver committed Oct 25, 2019
1 parent 7f37916 commit efcdbef792ad9852bc05b8a953d7877a17d46298
Showing with 3 additions and 3 deletions.
  1. +3 −3 mailServer/mailserverManager.py
@@ -89,7 +89,7 @@ def submitEmailCreation(self):

data = json.loads(self.request.body)
domainName = data['domain']
userName = data['username']
userName = data['username'].lower()
password = data['passwordByPass']


@@ -102,7 +102,7 @@ def submitEmailCreation(self):

## Create email entry

result = mailUtilities.createEmailAccount(domainName, userName, password)
result = mailUtilities.createEmailAccount(domainName, userName.lower(), password)

if result[0] == 1:
data_ret = {'status': 1, 'createEmailStatus': 1, 'error_message': "None"}
@@ -679,4 +679,4 @@ def installStatusOpenDKIM(self):
except BaseException, msg:
final_dic = {'abort': 1, 'installed': 0, 'error_message': str(msg)}
final_json = json.dumps(final_dic)
return HttpResponse(final_json)
return HttpResponse(final_json)

0 comments on commit efcdbef

Please sign in to comment.
You can’t perform that action at this time.