Thomas Carrié writes:

On Viernes 24 Diciembre 2010 23:50:14 Sam Varshavchik escribió:
Thomas Carrié writes:
> Hello,
> > My only auth active module is authmysql : > > $ grep ^authmodulelist= /etc/courier/authlib/authdaemonrc
> authmodulelist="authmysql "
> > I have 2 users in my DB > > mysql> select * from courier.users;
> +---------+-------+-----+-----+--------------------+-----------------+---
> ----+
> > | id | clear | uid | gid | home | options |
> | crypt |
> > +---------+-------+-----+-----+--------------------+-----------------+---
> ----+
> > | tcarrie | some | 0 | 12 | /var/vmail/tcarrie | disableshared=0 | > | | mamibb | thing | 0 | 12 | /var/vmail/mamibb |
> | disableshared=0 |       |
> > +---------+-------+-----+-----+--------------------+-----------------+---
> ----+
> > I can succesfully login into the IMAP server using tcarrie and mamibb > > $ grep mamibb /var/log/messages
> Dec 24 16:05:56 localhost imapd: LOGIN, user=mamibb ....
> > But authenumerate returns no rows ! > > In what kind of situation authenumerate is supposed to return rows ?

In the situation where MYSQL_ENUMERATE_CLAUSE is not set correctly in
authmysqlrc.

I have just set the MYSQL_ENUMERATE_CLAUSE like so :

$ grep ^MYSQL_ENUMERATE_CLAUSE /etc/courier/authlib/authmysqlrc
MYSQL_ENUMERATE_CLAUSE select id,uid,gid,home,concat(home,'.maildir') as maildir,options from users;

I still have no row from authenumerate. At my first try, MYSQL_ENUMERATE_CLAUSE was commented and I had the same result

Now I am adding a new user
insert into users (id,home) values ('iii','ooo');

$ authenumerate
iii     8       12      ooo     ooo.maildir

I'm sure that executing "ls -l /ooo.maildir" will tell you that this directory does not exist.

Apart from all your other problems, you also have this one -- the maildir field is broken. The maildir field is only required if each account's maildir is not $HOME/Maildir, the default configuration.

Instead of trying to get a customized, non-default, unusual configuration working, it should be much easier to set up a standard, default layout for mail accounts: just an ordinary home directory, with $HOME/Maildir being the account's maildir. In which case the fifth parameter returned by the enumeration query can be an empty string.

Why is it returning only this user ?

You are the only one who can answer this question, because you are the only one who knows what's in your database, and how your filesystem is laid out.


Attachment: pgpLdDeok96KN.pgp
Description: PGP signature

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Courier-imap mailing list
Courier-imap@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap

Reply via email to