It looks like I've solved this. Each account MUST have a home entry. I have just set this to be the same as the mail entry, and this now works.
Main Topics
Browse All TopicsHi 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
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
gid=6
3. Created foo's maildir by sending him an e-mail. This created the
following:
/var/mail/virtual/somedoma
/var/mail/virtual/somedoma
/var/mail/virtual/somedoma
/var/mail/virtual/somedoma
/var/mail/virtual/somedoma
/var/mail/virtual/somedoma
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
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
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,
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: gheistPosted on 2005-03-26 at 22:20:46ID: 13638474
authmodulelist="authuserdb authpam"
this is case sensitive.