[ale] Fwd: postfix+sasl-auth+courier-imap+mysql

Hernan Arteta HArteta at teleandina.net
Wed Dec 18 15:30:01 EST 2002


Hi,
after a long time looking for a "howto" make this combo (postfix+sasl-
auth+courier-imap+mysqlwork), postfix can 
relay mail from authorized user looking in mysql DB, the problems start 
with courier-imap and mysql I saw a lot of posted messages about this 
issue but anything works for me.
I'm using 
RH7.2 updated on RH network
Postfix 1.1.11 (Tuomo Soini)
Cyrus-SASL 1.5.27 (Tuomo Soini)
Courier-IMAP installed from a RPM, this was maked following instructions 
founded in the source courier-imap-1.6.1.tar.bz2 (courier-imap-1.6.1-
1.7.2.i386.rpm and courier-imap-mysql-1.6.1-1.7.2.i386.rpm).

config files in /usr/lib/courier-imap/etc/
authdaemonrc
##NAME: authmodulelist:0
#
# The authentication modules that are linked into authdaemond.  The
# default list is installed.  You may selectively disable modules simply
# by removing them from the following list.  The available modules you
# can use are: authcustom authcram authuserdb authldap authpgsql 
authmysql authpam

authmodulelist="authmysql"

##NAME: authmodulelistorig:1
#
# This setting is used by Courier's webadmin module, and should be left
# alone

authmodulelistorig="authcustom authcram authuserdb authldap authpgsql 
authmysql authpam"

##NAME: daemons:0
#
# The number of daemon processes that are started.  authdaemon is 
typically
# installed where authentication modules are relatively expensive: such
# as authldap, or authmysql, so it's better to have a number of them 
running.
# PLEASE NOTE:  Some platforms may experience a problem if there's more 
than
# one daemon.  Specifically, SystemV derived platforms that use TLI with
# socket emulation.  I'm suspicious of TLI's ability to handle multiple
# processes accepting connections on the same filesystem domain socket.
#
# You may need to increase daemons if as your system load increases.  
Symptoms
# include sporadic authentication failures.  If you start getting
# authentication failures, increase daemons.  However, the default of 5
# SHOULD be sufficient.  Bumping up daemon count is only a short-term
# solution.  The permanent solution is to add more resources: RAM, faster
# disks, faster CPUs...

daemons=5

##NAME: version:0
#
# When you have multiple versions of authdaemond.* installed, authdaemond
# just picks the first one it finds.  Set "version" to override that.
# For example:  version=authdaemond.plain

version="authdaemond.mysql"

##NAME: authdaemonvar:0
#
# authdaemonvar is here, but is not used directly by authdaemond.  It's
# used by various configuration and build scripts, so don't touch it!

authdaemonvar=/var/run/authdaemon.courier-imap



authmysqlrc
MYSQL_SERVER		localhost
MYSQL_USERNAME		login
MYSQL_PASSWORD		password
MYSQL_SOCKET		/var/lib/mysql/mysql.sock
MYSQL_PORT		3306
MYSQL_DATABASE          maildb
MYSQL_USER_TABLE        users
MYSQL_CRYPT_PWFIELD     crypt
MYSQL_CLEAR_PWFIELD     clear
MYSQL_UID_FIELD         uid
MYSQL_GID_FIELD         gid
MYSQL_LOGIN_FIELD       id
MYSQL_HOME_FIELD        home
MYSQL_NAME_FIELD        name
MYSQL_MAILDIR_FIELD     maildir
MYSQL_WHERE_CLAUSE      imapok=1 AND bool1=1 AND bool2=1


trace from /var/log/maillog
Dec 18 13:40:48 localhost pop3d: Connection, ip=[::ffff:127.0.0.1]
Dec 18 13:40:57 localhost pop3d: LOGIN: DEBUG: ip=[::ffff:127.0.0.1], 
command=USER
Dec 18 13:41:02 localhost pop3d: LOGIN: DEBUG: ip=[::ffff:127.0.0.1], 
command=PASS
Dec 18 13:41:02 localhost pop3d: LOGIN: DEBUG: ip=[::ffff:127.0.0.1], 
username="username"
Dec 18 13:41:02 localhost pop3d: LOGIN: DEBUG: ip=[::ffff:127.0.0.1], 
password="password"
Dec 18 13:41:02 localhost pop3d: Usage: /usr/lib/courier-
imap/libexec/authlib/authdaemond.mysql start|stop|restart


no trace in /var/log/mysql.log

-mysql daemon is started because I can authenticate users for relay mail 
from DB

Maybe some one out there have this working and can help me.
Thanks

Hernan


_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list