Courier-auth username syntax

Discussion in 'Installation/Configuration' started by syduck, Jun 6, 2011.

  1. syduck

    syduck New Member

    Hi,

    I have a The Perfect Server - CentOS installed.
    I am migrating users over, the thing is all the mail usernames on the old server are user+domain.com.

    So to make it easyer for my users I am wondering if theres a way to allow mail authentication with the default '[email protected]' as well as 'user+domain.com'.

    Ive been playing with the authmysqlrc and MYSQL_SELECT_CLAUSE but cant seem to get it right.

    Any insight would be appreciated, Thanks!
     
  2. syduck

    syduck New Member

    Solved

    Hey guys,

    After fooling around with it for a couple of hours I've figured it out.

    I edited /etc/authlib/authmysqlrc

    added:

    MYSQL_SELECT_CLAUSE SELECT email,password,"",uid,gid,homedir,maildir,quota,"",concat('disableimap=',disableimap,',disablepop3=',disablepop3) FROM mail_user WHERE email = '$(local_part)@$(domain)' or email2 = '$(local_part)'

    Then added email2 column to the mail_user table in the dbispconfig database and filled the rows with the user+domain.com usernames.

    tested with multiple accounts using both types of usernames in outlook.
     

Share This Page