Hi all,
I'm having problems with userdb and courier on FreeBSD 5.3. I was trying
to get this all working with Squirrelmail, but for the moment, I am just
trying to test with authtest and by telnetting to port 143 on my
machine.
Firstly, if I try and test a system user, everything works fine. The
problems only occur if I try and test a userdb user.
Here is what I have done so far:
1. Created /usr/local/etc/authlib/use
rdb
2. Created a user named foo in the file somedomain.com by doing the
following:
userdb somedomain.com/foo set \
mail=/var/mail/virtual/som
edomain.co
m/foo shell=/sbin/nologin uid=26 \
gid=6
3. Created foo's maildir by sending him an e-mail. This created the
following:
/var/mail/virtual/somedoma
in.com mailnull:mail 750
/var/mail/virtual/somedoma
in.com/foo
mailnull:mail 750
/var/mail/virtual/somedoma
in.com/foo
/cur mailnull:mail 750
/var/mail/virtual/somedoma
in.com/foo
/new mailnull:mail 750
/var/mail/virtual/somedoma
in.com/foo
/tmp mailnull:mail 750
/var/mail/virtual/somedoma
in.com/foo
/new/messa
gefile.dom
ain \
mailnull:mail 660
4. Assigned the user a password - I have tried both with and without
-md5
userdbpw -md5 | userdb somedomain.com/foo set systempw
then after those tests failed,
userdbpw | userdb somedomain.com/foo set systempw
5. Run makeuserdb after the above step each time
I have also set DEBUG_LOGIN=2 in authdaemonrc and restarted it. I also
have the following line in this file:
authmodulelist="authuserdb
authpam"
When I try the authtest, I get the following:
-su-2.05b# authtest foo
Authentication FAILED: Operation not permitted
I get nothing in /var/log/maillog when I do this.
If I try the same with a system user, I get this on STDOUT:
-su-2.05b# authtest waynep mypass
Authentication succeeded.
Authenticated: waynep (system username: waynep)
Home Directory: /home/waynep
Maildir: (none)
Quota: (none)
Encrypted Password: encrypted password
Cleartext Password: (none)
Options: wbnodsn=1
At the same time, I get the following in /var/log/maillog
Mar 26 20:04:08 freebsd-mail authdaemond: Authenticated:
sysusername=waynep, sysuserid=<null>, sysgroupid=1001,
homedir=/home/waynep, address=waynep, fullname=Wayne Pascoe,
maildir=<null>, quota=<null>, options=<null>
Mar 26 20:04:08 freebsd-mail authdaemond: Authenticated:
clearpasswd=mypass, passwd=encryptedpassword
If I try and telnet to port 143 and login as foo, this is what I get on
STDOUT:
-su-2.05b# telnet localhost 143
Trying ::1...
Connected to localhost.virtual.penguinp
owered.org
.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE
* THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION
* STARTTLS] Courier-IMAP ready. Copyright 1998-2005 Double Precision,
* Inc. See COPYING for distribution information.
a login foo test
a NO Login failed.
I also get this in /var/log/maillog:
Mar 26 20:06:07 freebsd-mail imapd: LOGIN FAILED, user=foo, ip=[::1]
Can anyone advise me what I should try next ? It looks like userdb will
solve my virtualdomain problems, and I'm really keen to get this all up
and running :D
Thanks in advance,