Like Sam said, you can't run a domain in both hosted and locals. However, I wanted something similar so here's what I do:

I list domain.com in hosteddomains and use userdb to create all my accounts, user1, user2, etc.

I list mail.domain.com in locals and have my local users in /etc/passwd, user1, user2, etc.

The trick is to set the homedir, uid and gid of the users in userdb (or whatever your auth system is) to be the same as what it is in /etc/passwd. You really have two mail accounts this way, but they end up in the same mailbox. Depending upon how your auth is set up it also probably means setting two passwords.

I can now pick whether new accounts are effectively virtual or local.

On Jul 25, 2004, at 11:32 AM, Andrei Iordache wrote:

Hello list,

It is a while now since I'm trying to figure out how to have both local and
virtual users in the same domain namespaces. I am hosting 6 domains and I
have several users, few of them local. It is ok if the local users receive
mail @all.the.6.domains.i.host. But most of the users are NOT local and I
cannot seem to figure out how to setup courier this so it will accept mail
for [EMAIL PROTECTED] AND [EMAIL PROTECTED] (and the same for
domain-2, domain-3... domain-6)in the same time.


I added all 6 domains to esmtpacceptmailfor.dir and run makeacceptmailfor.

Now, If I add the 6 domains to locals, I can only receive mail for the local
users. If on the other hand I put them in hosteddomains (and run
makehosteddomains and restart courier, just to be sure), I cannot receive
mail for local users anymore. I cannot have the 6 domains both in locals and
hosteddomains because locals take precedence and hosteddomains is never
checked. Right ?


I use authdaemonrc, with authcustom, authcram, authuserdb and authpam
modules. It is working correctly.

The local users are in /etc/passwd. The virtual users are in the userdb
file, I run makeuserdb whenever I change that file (I even restart courier),
and the e-mail is received correctly as long as I have the domains listed in
hosteddomains (but not in locals). But how can I make that bot are checked ?
Or something ? Because I am trying NOT to have to create domains of the type
virtual.domain1.tld for the virtual users, they will not be in the same
namespace as the local users.


I have read the manuals, I have searched the list, I have searched the web,
I used courier for 2 years now, I have overcame on my own many problems with
compilation and configuration, I thought I am fairly familiar with it. But
this is something I just don't seem to figure it out. What am I missing ?


Thanks for looking


------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users



------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to