10 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Multible Mail Dom...
FromSent OnAttachments
tp...@netmaster.dkJun 21, 2007 12:47 am 
Sam VarshavchikJun 21, 2007 3:58 am 
tp...@netmaster.dkJun 21, 2007 5:15 am 
ScottJun 21, 2007 8:32 am 
Jeff JansenJun 21, 2007 7:50 pm 
tp...@netmaster.dkJun 22, 2007 12:26 am 
Jeff JansenJun 22, 2007 3:25 am 
tp...@netmaster.dkJun 22, 2007 3:40 am 
Jeff JansenJun 22, 2007 8:23 am 
tp...@netmaster.dkJun 24, 2007 11:07 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Multible Mail DomainsActions...
From:tp...@netmaster.dk (tp@netmaster.dk)
Date:Jun 22, 2007 12:26:12 am
List:net.sourceforge.lists.courier-users

Jeff Jansen writes:

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

tp@netmaster.dk wrote:

Now I have a dropdown in sqwebmail with the domains listed in logindomainlist. When I login the selected domain is appended to the username. I can see that in the message log file on the linux box. But it seems to be an invalid userid. I am not able to login. If I don''t have the file logindomainlist I login with only user name (no domain) and then I login ok. As I see it users are authenticated against system accounts and that works fine for me until now that I host multiple mail domains.

System accounts are in your "local" domain, which means you log in using *only* the user name, not the user with the domain name. But the additional domains that you want to host can either be 'local domains' or 'hosted domains'. It's up to you. But if you want to use system accounts for the other domains as well, then they will be 'locals' by default, which means that the users will log in without the domain.

Check out the difference between 'locals' and 'hosteddomains' in the courier man page. Regardless of what the domain name is, if it's listed in the 'locals' file (in your courier 'etc' directory) then only the user name is used for authentication. If the domain is in the 'hosteddomains' file, then the entire username including the domain is used for authentication.

So if your box is called 'domain1.com' and now you want to also host 'domain2.com', then you could simply put 'domain1.com' and 'domain2.com' into the 'locals' file. Now it doesn't matter whether mail is sent to "use@domain1.com" or "use@domain2.com", because courier is going to remove the whole domain and just deliver mail to "user1". And when this user logs in, then they will log in as "user1", with no domain. (This assumes, of course, that you have DNS, etc. set up to deliver mail for these domains to your server.)

This is an easy way to do it, but it means that you can NOT have separate accounts "use@domain1.com" and "use@domain2.com", since they would both deliver to 'user1'. If you want to have the same username at different domains, then you need to use either 'hosteddomains' and some sort of database backend to store the user information (since they will no longer be system users on the box), or aliases so that 'use@domain1.com' gets delivered to system user 'user1' and 'use@domain2.com' gets delivered to system user 'user1.d2' or some such. Courier can use many different database backends, from a flat file 'userdb' which is easy to setup but doesn't scale well, to relational dbs like MySQL, all the way to LDAP.

HTH

Jeff Jansen -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGezj9GfIHDMaiC9cRAjtNAJ4kfOTgY/UnUOAVwrAanAK3j/XKWACfc80m 7+uSxyIFGikWk9/C6rOTM1I= =7qNW -----END PGP SIGNATURE-----

Jeff - thanks a lot

Great explanation.

A few questions left.

I only have a locals file – I don’t have a hosteddomain file. In my locals file I have the 3 domains I host.

I have a logindomainlist file with the 3 domains I host. This way sqwebmail login dialog page shows a dropdown to select domain.

When a user uses brings up sqwebmail login dialog page and enters a userid and selects a domain from the dropdown I can see from the system log that the user is trying to log in to a system account that includes the domain name. How is that possible as I don’t have a hosteddomain file?

You suggest that I can alias ‘use@domain1.com’ to a system accout ‘user’ How can I do that?

Thanks!

Thomas Seilund