disable emailadress for loginname in mailsystem?

Discussion in 'ISPConfig 3 Priority Support' started by chico11mbit, Aug 2, 2016.

  1. chico11mbit

    chico11mbit Member HowtoForge Supporter

    Hi,
    when i enable "Allow custom login name" in Interface/Main Config/Mail i am able to login with the custom login name i use and also with the emailadress. Is it possible to disable the login with the emailadress and only allow the custom login name?

    often i have the problem that users use there emailadresses and email logins in forums and other internet-portals for their user accounts there.
    So if these are hacked the hackers can login to the email accounts here and send spam. i think with disabling the login with the emailadress i can prevent that issue.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    As long as the customer does not use the same password for the forum and his mail account, then the mail account can not be hacked. Disabling login by email address requires to change the sql queries in the dovecot sql configuration file.
     
  3. chico11mbit

    chico11mbit Member HowtoForge Supporter

    yeah. That's the security problem with some users. Is it easy to disable the login by email-adress?
    the queries are:
    Code:
    password_query = SELECT password FROM mail_user WHERE (login = '%u' OR email = '%u') AND disable%Ls = 'n' AND server_id = '1'
    user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND disable%Ls = 'n' AND server_id = '1'
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Replace:

    (login = '%u' OR email = '%u')

    in both queries with:

    login = '%u'
     

Share This Page