ispconfig email login with user@domain How to

Discussion in 'Tips/Tricks/Mods' started by desmondk, Nov 2, 2006.

  1. shinzou

    shinzou New Member

    thanks for creating this option desmondk! however, I can't get it to work :(

    I've read the other posts and made sure to make the spaces into tabs but can't authenticate with the [email protected] style.

    I commented out the makeuserdb line, so I could edit the userdb file beforehand. I stripped it down to one account for testing purposes, then ran the makeuserdb command.

    Any ideas? Thanks in advance.
     
  2. ciprianz

    ciprianz New Member

    i think it will be easier if this authentification metod will be allowed direct from ispconfig
    for example it would be nice to have in System Config/Isp Manager User Sufix
    then this chat about how to make user auth. with user@domain will not even be here
     
  3. ciprianz

    ciprianz New Member

    ispconfig user@domain

    I was just wondering if the following method (see link)
    http://workaround.org/articles/ispmail-sarge/index.shtml.en
    could be combined with ISP config by adding a new field in table isp_isp_user
    and use that field straight in the configuration of postfix
    If anyone understands what I mean pls try..:)
    I will test it tommorow
    I'm sleepy now
    I'll post tommorow ...
    It must work :D
     
  4. ciprianz

    ciprianz New Member

  5. Daisy

    Daisy New Member

    has there been any talk about how to do this with dovecot yet?
     
  6. falko

    falko Super Moderator Howtoforge Staff

    No, not that I know.
     
  7. ciprianz

    ciprianz New Member

    I haven't been succesuful to use [email protected] aplying any of the ideea found in the forum.
    I would like to use the authentification method provided in Tutorial: ISP-style Email Service with Debian-Sarge and Postfix 2.1
    I was interested in special on
    Step 8: Configure the POP3 / IMAP service
    that will allow authentification based on information found in a table
    as you may see in tutorial we need the following information
    MYSQL_SERVER localhost
    MYSQL_USERNAME provider_admin
    MYSQL_PASSWORD ...
    MYSQL_PORT 0
    MYSQL_DATABASE provider
    MYSQL_USER_TABLE users
    #MYSQL_CRYPT_PWFIELD (comment this out)
    MYSQL_CLEAR_PWFIELD password
    MYSQL_UID_FIELD 5000
    MYSQL_GID_FIELD 5000
    MYSQL_LOGIN_FIELD email
    MYSQL_HOME_FIELD "/home/vmail"
    #MYSQL_NAME_FIELD (comment this out)
    MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')

    some of the fields are missing in our isp_isp_user table
    MYSQL_CLEAR_PWFIELD, MYSQL_UID_FIELD, MYSQL_GID_FIELD, MYSQL_LOGIN_FIELD, MYSQL_HOME_FIELD, MYSQL_MAILDIR_FIELD

    for quick testing I added the fields missing above like this:

    1. Go to ISP Config -> Management - > Form designer -> Edit form
    2. Search for isp - ISP User: [Edit] [Delete]
    3. Click on [Edit]
    4. Choose from Add dropdown menu: Short Textfield and press OK
    5. complete the field according to your needs
    example: to add a field that will contain username
    write to
    Fieldname: username
    Title: Username (courier) (or whatever you want to see when you add new user, I choosed like that because I wanted to know that it is the field added by me for courier-authmysql method
    all the other fields are optional

    I created the following fields with the method described above:
    password, gid, username,usermaildir
    these fields will be used with
    MYSQL_CLEAR_PWFIELD, MYSQL_UID_FIELD, MYSQL_GID_FIELD, MYSQL_LOGIN_FIELD, MYSQL_MAILDIR_FIELD


    Fields explained:
    MYSQL_SERVER, MYSQL_USERNAME, MYSQL_PASSWORD -these are easy: i modified only the MYSQL_USERNAME and MYSQL_PASSWORD, use your own user and password to connect to your mysql server.
    MYSQL_PORT 0 i didnt' modified anything
    MYSQL_DATABASE is the database that contains your ispconfig tables, you specified this database when you have installed your ispconfig, in my case was ispconfig
    MYSQL_USER_TABLE in our case that table should be isp_isp_user
    MYSQL_CLEAR_PWFIELD is the field that contains the user password, altough in isp_isp_user exists user_passwort that fields gets empty for security reason. so you have to create another one: userpassword that should contain the user password
    MYSQL_UID_FIELD -this field could be generated from the isp_isp_user, there is doc_id field that contains the user id in the table but what we need is the user id used in linux, the linux userid is build like this: userid+doc_id where userid it is set in ispconfig under management -> server -> settings -> Other -> "Userid from" . The default value for "Userid from" is 10000 so we could build MYSQL_UID_FIELD like this 10000+doc_id
    MYSQL_GID_FIELD - this is a little bit harder to build from what I see the group id is the same for all user from a Site. so MYSQL_GID_FIELD should be something like this 10000+[WEBID]
    MYSQL_LOGIN_FIELD username
    MYSQL_HOME_FIELD "/var/www/"
    MYSQL_MAILDIR_FIELD usermaildir

    I will continue later, all I said until now was theory, I didn't test it yet.
     
    Last edited: Jan 1, 2007
  8. cotthemh

    cotthemh New Member

    the same with dovecot works nicely

    you can do this very easily with dovecot :

    change ispconfig so that it prefixes with [DOMAIN]_

    then change the line in the /etc/dovecot.conf file

    auth_username_format="%Ld_%Ln"

    next of course make sure all you're userid's are lowercase (otherwise just juse ="%Ld_%n") but the first solution avoids any typos in the login.

    the nice thing is that squirrelmail works like a breeze,

    have fun
     
  9. alex916

    alex916 New Member

    This Mod is very good.
    Thanks Desmondk.
    Is There a way to use this auth also with smtp-aut?

    Alex
     
  10. jerry3687

    jerry3687 New Member

    Log in as a system user

    > Quote:
    > Originally Posted by Rustin
    > To log into ispconfig one would have to use <domain>_<username> I assume?
    >No, only customers, resellers and admin can log into ISPConfig, not system users.

    > Falko

    Hi Falco....

    Actually, an individual email user *CAN* log into ispconfig to maintain his own email account. 2.2.x of ispconfig required.

    To enable this, the Administrator goes in to web configuration and checks "mailuser login".

    Now the email user can log in with his username and password to change his own password, set up autoresponders, antivirus and spam filtering, etc.

    Jerry
     
  11. jerry3687

    jerry3687 New Member

  12. falko

    falko Super Moderator Howtoforge Staff

    I know this (I'm one of the lead developers ;) ). I was referring to the main ISPConfig.
     
  13. Morons

    Morons Member

    urmpi --noclean --wget courier

    I have Just installed Mandriva 2007 Powerpack according to the The Perfect Setup - Mandriva 2007 Free Edition but found courier missing - After messing around I found to many options related to selecting the correct courier version for this. Falko can you perhaps give me the Perfect Answer?:eek:
    Code:
    urmpi --noclean --wget courier  
    ????????
     
  14. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    urpmi --fuzzy courier
    ?
     
  15. Morons

    Morons Member

    Code:
    The following packages contain courier:
    courier-authdaemon
    courier-authlib
    courier-authlib-devel
    courier-authlib-ldap
    courier-authlib-mysql
    courier-authlib-pgsql
    courier-authlib-userdb
    courier-base
    courier-imap
    courier-imap-pop
    courier-pop
    perl-Font-AFM
    perl-PDF-API2
    php-pear-File_PDF
     
  16. falko

    falko Super Moderator Howtoforge Staff

    Please try
    Code:
    urpmi courier-imap-pop
     
  17. Morons

    Morons Member

    Code:
    [root@beta ~]# urpmi --wget --noclean courier-imap-pop courier-imap
    Some requested packages cannot be installed:
    courier-imap-pop-4.1.0-2mdk.i586 (due to unsatisfied courier-imap[== 4.1.0-2mdk])
    Continue installation anyway? (Y/n) y
    The following packages have to be removed for others to be upgraded:
    imap-2004g-2mdv2007.0.i586
     (due to conflicts with courier-imap) (y/N) y
    To satisfy dependencies, the following packages are going to be installed:
    courier-authdaemon-0.58-9mdv2007.0.i586
    courier-authlib-0.58-9mdv2007.0.i586
    courier-base-4.1.1-8mdv2007.0.i586
    courier-imap-4.1.1-8mdv2007.0.i586
    expect-5.43.0-7mdk.i586
    libexpect5.43-5.43.0-7mdk.i586
    Proceed with the installation of the 6 packages? (3 MB) (Y/n)
    It could not install as suggested asking for imap so I included what it asked for literally adding "courier-imap"
    It obvious got rid of the already installed imap-2004g-2mdv2007.0.i586
    I'll post my success or not.
     
  18. Morons

    Morons Member

    [root@beta ~]# which pw2userdb
    which: no pw2userdb in (/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin)

    More stuff seem to be gone! I checked with slocate also
     
  19. falko

    falko Super Moderator Howtoforge Staff

    Maybe now is a good time to switch to an apt-based distribution? ;)

    What's the output of
    Code:
    urpmi --fuzzy pw2userdb
    ?
     
  20. Morons

    Morons Member

    apt-based distribution?

    Sounds like good advice, Plse advise witch apt-based distro are you useing and witch other I need to look at. I assumed that Mandriva is ok as you provide the Perfect Setup for it. I also noted you using apt on some Perfect Mandirva, but changed back to urpmi at the next version.

    P.S. I had to halt my investigation into this method of login [[email protected]] for time constraints but will resume it next week.:cool:
     

Share This Page