I installed OX on Centos 5, with cyrus, mysql and sendmail. I have pam with mysql working. Cyrus works with virtualdomains set to yes, but it is not clear how to set up open exchange to login with virtual domains.
Did I miss something on the configuration of OX?
to understand your problem better, please describe what you are aiming for, how the system should look after it is done. Basically OX does not care about the domain backend and E-Mail specific stuff, we're acting like a smtp/imap client in many ways.
The question is realated to same user name in two different domains. For instance if I have email@example.com and firstname.lastname@example.org, while these are two different people the username is the same.
The current OX that I have working without virtual domains, the username is john. When I add virtual domains, then I have two john usernames but are actually two different users. How would I change the login at OX to email@example.com to authenticate in place of the username john how it authenticates now. Do I just change my OX account creation to have the firstname.lastname@example.org as the username?
this can be done by using contexts. A context is a separate area in which users, resources, groups exist. One OX Server can manage a unlimited amount of contexts so you can have "john" in context 1 as well as a "john" in context 2. Please read the documentation at http://www.open-xchange.com/oxpedia#DocsAndExamples to get a better understanding of what contexts are. However - typically you have the login look like a E-Mail address with that virtual domain. Instead of using a login like john@1, john@2 (where the number is the context identifier), loginmappings can be set for each context leading to a login like email@example.com, firstname.lastname@example.org. In the end, you just need to configure different E-Mail accounts for both "john" users at the different contexts.
Thanks I was able to create a context and login as email@example.com.
/opt/open-xchange/sbin/createuser -c 2 -A myoxadmin -P xxx -u myuser \
-d "My Test User" -g Test -s User -p xxx -e firstname.lastname@example.org \
--imaplogin myuser --imapserver 127.0.0.1 --smtpserver 127.0.0.1
My only problem now is I get sslauthd errors when trying to autheticate to cyrus. I added the -r flag to saslauthd and log file indicates it is passing the realm. Is there another change that needs to be made for authentication?
Dec 29 14:51:56 popmail saslauthd: do_auth : auth failure: [email@example.com] [service=pop] [realm=mydomain.com] [mech=pam] [reason=PAM auth error]
Sorry wanted to start with:
I was able to create a context and login as firstname.lastname@example.org
I further found that it mght be related to pam_mysql. Each context builds a new database. The pam_mysql only selects from one database. My default database is oxdatabase_6. My context 2 database is oxdatabase_6_9. Is there a way to configure pam_mysql to select from multiple databases?
/etc/pam.d/imap , pop, sieve, smtp
auth optional pam_mysql.so host=/var/run/mysqld/mysqld.sock user=openexchange passwd=xxx db=oxdatabase_6 [table=login2user LEFT JOIN user ON login2user.id=user.id AND login2user.cid=user.cid] [where=user.cid=1] usercolumn=login2user.uid passwdcolumn=user.userPassword crypt=1
account required pam_mysql.so host=/var/run/mysqld/mysqld.sock user=openexchange passwd=xxx db=oxdatabase_6 [table=login2user LEFT JOIN user ON login2user.id=user.id AND login2user.cid=user.cid] [where=user.cid=1] usercolumn=login2user.uid passwdcolumn=user.userPassword crypt=1
Why is your OX building a new database schema per context? Did you set a maxctx size of 1 for the registerdatabase command? It is not required to set up a new db for each context, having 200-1000 contexts in one database is okay depending on the setup.
Thank you for the response. There was nothing specific in the setup instructions regarding maxctx.
I looked in the installtion document and did not find any details regarding setting the maxctx. Is that to mean that all contexts will be in the same database?
Could you explain how that setting is changed. Will I need to delete the installtion and start over with the maxctx changed?
From the installtion guide here is the command:
/opt/open-xchange/sbin/registerdatabase -A oxadminmaster -P admin_master_password \
-n oxdatabase -p db_password -m true
I found the database created during install and registered it. It was oxdatabase_6. I also used oxadminmaster and my password.