Solved

courier-imap

Posted on 2006-06-30
9
357 Views
Last Modified: 2010-04-20
Hello all,

Im just trying to set up my courier-imap with mysql authentication. Everything is working when I use 'authpam'. I can send and receive emails with help of postfix. My only problem is user authentication for imap using mysql database so users can access they email.
 select * from passwd;
+---------+-------+----------+--------------+------+------+------+---------+-----------------+-------+---------+
| id        | crypt | clear    | name         | uid  | gid  | home | maildir | defaultdelivery | quota | options |
+---------+-------+----------+--------------+------+------+------+---------+-----------------+-------+---------+
| user1 |       | password | user one | 1000 | 1000 | /home/user1     |         |                 |       |         |
+---------+-------+----------+--------------+------+------+------+---------+-----------------+-------+---------+

 settings in  /etc/courier/authmysqlrc

MYSQL_SERVER            localhost
MYSQL_USERNAME          admin
MYSQL_PASSWORD          password
MYSQL_DATABASE          courier_auth  
I'm sure that this four lines are correct and connection to database is working - 100% sure
MYSQL_USER_TABLE        passwd
#MYSQL_CRYPT_PWFIELD    crypt
MYSQL_CLEAR_PWFIELD     clear    
MYSQL_UID_FIELD         uid
MYSQL_GID_FIELD         gid
MYSQL_MAILDIR_FIELD     $HOME/Maildir

The log file :
Jun 30 16:21:50 service2 imaplogin: LOGIN FAILED, ip=[::ffff:127.0.0.1]

it does not tell much where is a problem however the connection to database is correct because I wil get different error!! So the problem is probably somewhere on id and clear field. I did try login by thinderbird as well as manually using telnet.

Anyone can see what I'm missing here?

thanks
0
Comment
Question by:Luxana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
9 Comments
 
LVL 27

Expert Comment

by:Nopius
ID: 17029027
fix your authmysqlrc, like:
MYSQL_LOGIN_FIELD       id
0
 
LVL 10

Author Comment

by:Luxana
ID: 17055754
Hello Nopius,

Sorry for delay, my MYSQL_LOGIN_FIELD   is set to  'id' I just forgot to mention it in my question. Still did not find out what is the problem.

it seems that the problme is somewhere in authdaemon.
0
 
LVL 10

Author Comment

by:Luxana
ID: 17055810
I did start debugung with courier and I'm getting this error:

imapd: authdaemon: TEMPFAIL - no more modules will be tried

0
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
LVL 27

Expert Comment

by:Nopius
ID: 17056017
Sorry, I have no more ideas
0
 
LVL 10

Author Comment

by:Luxana
ID: 17056039
my either.. I did reasearch on the internet and it seems that there are more peaople which stuck with the same problem. Probably the way where to go is to find out how to debug authdaemon :-)
0
 
LVL 27

Expert Comment

by:Nopius
ID: 17056058
btw my favorite configuration is sendmail+cyrus-imap, not postfix+courier :-)
0
 
LVL 10

Author Comment

by:Luxana
ID: 17119458
hi,

It was a pain but I get it working. The problem is that config files are really sensitive to inappropriate use of TABS and SPACES:-))

 
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 17668329
PAQed with points refunded (500)

DarthMod
Community Support Moderator
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question