Here's what I'd like to do for virtual accounts.  The setup is easy, getting
courier to work with it is where I have questions.

I want to create virtual mail accounts so that the id for each account is
unique, tied to the domain name under which the virtual account will be
used.  I'm using authmysql and authpam, the former being checked first.  

I can set up a virtual mailbox account so that the id field in the mysql
passwd table contains user@domain, so POP logins will be unique, and the
'home' field will be set to something like /home/virtmail/domain/user, which
uniquely defines the mailbox.  This works fine for POP access, but won't
work for esmtp, which gives me a "User unknown" in response to rcpt to:
<user@domain>.  If I set the ID field to "user" instead of "user@domain"
there's no problem with esmtp, and mail is delivered to the right mailbox,
but my user namespace no longer has any association with the domain, so I
couldn't have virtual mailboxes for "bob@domain1" and "bob@domain2" at the
same time.  I can alias "user" to something else like "user_domain" with a
.courier file, which is what I'm doing with qmail, but for various reasons
I'd like to avoid this.

Could I, for instance, include a domain_name field in the mysql passwd table
and set up MYSQL_SELECT_CLAUSE to be something like

select id,crypt,uid,gid,clear,home,maildir,quota,name from passwd where 
    id="$(local_part)" and domain_name="$(domain)"

Would this work for both for esmtp's rcpt to: <user@domain> to uniquely
establish the existence and identity of a mailbox and also for POP service
logging in with "user user@domain"?  Would sqwebmail be happy with this?

I guess I just need to try it, but I though Sam or someone else might have
gone down this road and could give me some tips which would save some time.

-- 
Lindsay Haisley       | "Everything works    |     PGP public key
FMP Computer Services |       if you let it" |      available at
512-259-1190          |    (The Roadie)      | <http://www.fmp.com/pubkeys>
http://www.fmp.com    |                      |

_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to