[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: courier-imap auth



On Thu, Dec 19, 2002 at 03:43:31PM -0600, Alex Howansky wrote:
> > Does your suggestion work with the PostgreSQL Courier-IMAP module as well?
> 
> Ah shoot, sorry, I was thinking of two different machines -- one with UW-IMAP
> and PgSQL, and the other with Courier and MySQL. Oops. Nevermind. :)
You should create a VIEW in postgres, which creates a table looking like the
table courier-imap expects.

CREATE VIEW imap AS (
                      SELECT passwd.uid,
                             passwd.gid,
                             passwd.home,
                             passwd.password,
                             passwd.hardquota,
                             (passwd.login || '@' || passwd.virtual_host) AS id
                       FROM passwd
                     );

Greetz,
Michael.