ISPConfig 3.1.1 - DOVECOT Auth Mod?

Discussion in 'Feature Requests' started by Bruno Paiva, Apr 13, 2018.

  1. Bruno Paiva

    Bruno Paiva New Member

    Hi all,
    I am migrating a old mailserver that uses sendmail as MTA, so the virtualusers of differents domains do authentication as system users, so in the old mailserver the authertication in Dovecot for POP3/IMAP was made only with system username and not [email protected] I use a file "virtusertable" to associate system users to virtual domain users. ex: [email protected] = mail001

    Is there any way in ISPConfig 3.1.1p1, to associate a [email protected] to a "mask name", to make possible in DOVECOT i made the authenticatiion only with username("mask name") and forget the @domain.

    My ideia is to make ISPconfig/Dovecot accept a two type of authentication, the normal one [email protected] and by some kind of "file mask username" where i set a name like "mail001" to real virtualuser "[email protected]".

    Thanks in advance,
     
  2. exynenem

    exynenem New Member

    I have done the same 3 years ago, moving from Sendmail with passwd auth to ISPConfig with Postfix and MySQL as the userdb backend.
    First, I didn't know back in this time how I should maintain the compatibility with the old usernames, but somehow I could figure out a solution that worked quite well for me. However, there might be other ways to reach the same goal...

    This is not step-by-step tutorial, so you'll have to make and set the correct adjustments that suites your environment:

    - create a new column in the ISPConfig mail_user table.
    I've called mine "legacy_mailuser" which I've then populated with my old usernames.

    - adjust the sql statements in the postfix and dovecot cf/conf files where it needs to be done. Most likely you will have to extend the query by using "OR legacy_mailuser" in the critical authentication parts.

    My legacy users can authenticate with their old usernames like user08 or by their email address and new users can only authenticate with their email address.
     
  3. Bruno Paiva

    Bruno Paiva New Member

    Thanks, you are the man ;)
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig supports legacy mail users for 5 or more years now. So no need for any changes in the ISPConfig setup or database, simply activate the custom username field under system > interface config and then enter the old usernames into the username field of the mailboxes.
     
  5. exynenem

    exynenem New Member

    Oh fuck, really?
    Yeh, tried it myself on a non-production server. Works, lol.

    @Bruno Paiva
    I suggest to use till's solution. It certainly would be the easiest solution, unless you don't want that your customers can change their login names by themself. Or is there also an option available to toggle this behaviour on/off? :rolleyes:
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    You might be able to turn it off after importing all the usernames, the usernames will probably keep working, but they are invisible in the ui off course, as the server part always checks ... where login = email or login = username, while username is empty by default.
     
  7. exynenem

    exynenem New Member

    Makes sense ;)
    Time to finish work and get into weekend...
     
  8. Bruno Paiva

    Bruno Paiva New Member

    oh God... So Simple!!!! Till you are the man!! Exynenem thanks again for the idea but i will follow moderator :)
     

Share This Page