Login failed on Virtual Users And Domains With Postfix, Courier, MySQL And Squirrels I have followed the plugin at http://howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-fedora-10. Unfortunately I keep on getting such errors: Code: Apr 23 21:57:40 dns2 imapd: Connection, ip=[::ffff:127.0.0.1] Apr 23 21:57:40 dns2 imapd: LOGIN FAILED, [email protected], ip=[::ffff:127.0.0.1] Apr 23 21:57:45 dns2 imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=50, sent=332 Apr 23 21:59:01 dns2 imapd: Connection, ip=[::ffff:127.0.0.1] Apr 23 21:59:01 dns2 imapd: LOGIN FAILED, [email protected], ip=[::ffff:127.0.0.1] Apr 23 21:59:06 dns2 imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=54, sent=332 Apr 23 21:59:38 dns2 pop3d: Connection, ip=[::ffff:85.92.131.100] Apr 23 21:59:38 dns2 pop3d: LOGIN FAILED, [email protected], ip=[::ffff:85.92.131.100] Apr 23 21:59:43 dns2 pop3d: Disconnected, ip=[::ffff:85.92.131.100] Apr 23 22:07:02 dns2 postfix/qmgr[26601]: 2D454570116: from=<[email protected]>, size=500, nrcpt=2 (queue active) Apr 23 22:07:02 dns2 postfix/smtp[2544]: connect to mail.mydomain.eu[93.105.102.15]:25: Connection refused Apr 23 22:07:02 dns2 postfix/smtp[2543]: connect to dns2.mydomain.nl[93.105.102.15]:25: Connection refused Apr 23 22:07:03 dns2 postfix/smtp[2544]: 2D454570116: to=<[email protected]>, relay=none, delay=1274, delays=1274/0.03/0/0, dsn=4.4.1, status=deferred (connect to mail.mydomain.eu[93.105.102.15]:25: Connection refused) Apr 23 22:07:04 dns2 postfix/smtp[2543]: 2D454570116: to=<[email protected]>, relay=none, delay=1274, delays=1274/0.03/0.02/0, dsn=4.4.1, status=deferred (connect to dns2.mydomain.nl[93.105.102.15]:25: Connection refused) [[email protected] log]# I have tried both IMAP and Squirrelmail, both respond, but give login failed.
Code: [[email protected] log]# authtest [email protected] secret Authentication FAILED: Operation not permitted
No lines written in /var/log/messages and /var/log/secure. Code: [[email protected] log]# tail audit/audit.log type=USER_TTY msg=audit(1240562610.125:770919): user pid=15156 uid=0 auid=0 msg='history | grep auth' type=USER_TTY msg=audit(1240562613.909:770920): user pid=15156 uid=0 auid=0 msg='authtest [email protected] secret' type=USER_TTY msg=audit(1240562617.446:770921): user pid=15156 uid=0 auid=0 msg='tail messages' type=USER_TTY msg=audit(1240562622.965:770922): user pid=15156 uid=0 auid=0 msg='tail maillog' type=USER_TTY msg=audit(1240562630.118:770923): user pid=15156 uid=0 auid=0 msg='tail audit/audit.log
Would you please see if you did step #10 from the HowTo? Especially if you added the authmodulelist and changed the MYSQL_PASSWORD to whatever you use? Paul
Thanks for your response, it's seriously appreciated. I don't think I forgot anything from step 10 when I look back at the instructions, but I must've certainly done something wrong, as it doesn't properly work. Code: [[email protected] ~]# grep authmodule /etc/authlib/authdaemonrc ##NAME: authmodulelist:2 #authmodulelist="authuserdb authpam authpgsql authldap authcustom authpipe" authmodulelist="authmysql" ##NAME: authmodulelistorig:3 authmodulelistorig="authuserdb authpam authpgsql authldap authcustom authpipe" [[email protected] ~]# Code: [[email protected] authlib]# cat /etc/authlib/authmysqlrc MYSQL_SERVER localhost MYSQL_USERNAME mail_admin MYSQL_PASSWORD mail_admin_password MYSQL_PORT 0 MYSQL_DATABASE mail MYSQL_USER_TABLE users MYSQL_CRYPT_PWFIELD password #MYSQL_CLEAR_PWFIELD password MYSQL_UID_FIELD 5000 MYSQL_GID_FIELD 5000 MYSQL_LOGIN_FIELD email MYSQL_HOME_FIELD "/home/vmail" MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') #MYSQL_NAME_FIELD MYSQL_QUOTA_FIELD quota [[email protected] authlib]# Code: [[email protected] authlib]# mysql -umail_admin -pmail_admin_password Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8314 Server version: 5.1.34 MySQL Community Server (GPL) by Remi Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> quit Bye [[email protected] authlib]# Code: [[email protected] authlib]# chkconfig --levels 235 courier-imap on [[email protected] authlib]# /etc/init.d/courier-authlib restart Stopping Courier authentication services: authdaemond Starting Courier authentication services: authdaemond [[email protected] authlib]# /etc/init.d/courier-imap restart Stopping Courier-IMAP server: imap imap-ssl pop3 pop3-ssl Starting Courier-IMAP server: imap imap-ssl pop3 pop3-ssl [[email protected] authlib]# I would honestly love to have this set-up working! Update: The logs show information, at last! Code: Apr 24 20:47:39 dns2 authdaemond: stopping authdaemond children Apr 24 20:47:40 dns2 authdaemond: modules="authmysql", daemons=5 Apr 24 20:47:40 dns2 authdaemond: Installing libauthmysql Apr 24 20:47:40 dns2 authdaemond: libauthmysql.so: cannot open shared object file: No such file or directory Troubleshooting... Code: [[email protected] log]# locate mysql | grep courier /home/dennis/rpm/BUILD/courier-authlib-0.62.1/README.authmysql.html /home/dennis/rpm/BUILD/courier-authlib-0.62.1/README.authmysql.myownquery /home/dennis/rpm/BUILD/courier-authlib-0.62.1/authmysql.c /home/dennis/rpm/BUILD/courier-authlib-0.62.1/authmysql.h /home/dennis/rpm/BUILD/courier-authlib-0.62.1/authmysqllib.c /home/dennis/rpm/BUILD/courier-authlib-0.62.1/authmysqlrc /home/dennis/rpm/BUILD/courier-authlib-0.62.1/authmysqlrc.h /home/dennis/rpm/BUILD/courier-authlib-0.62.1/configfiles.mysql /home/dennis/rpm/BUILD/courier-authlib-0.62.1/preauthmysql.c /home/dennis/rpm/BUILD/courier-authlib-0.62.1/.deps/authmysql.Plo /home/dennis/rpm/BUILD/courier-authlib-0.62.1/.deps/authmysqllib.Plo /home/dennis/rpm/BUILD/courier-authlib-0.62.1/.deps/preauthmysql.Plo /home/dennis/rpm/RPMS/i386/courier-authlib-mysql-0.62.1-1.i386.rpm /usr/share/doc/courier-authlib-0.62.1/README.authmysql.html /usr/share/doc/courier-authlib-0.62.1/README.authmysql.myownquery [[email protected] log]# [[email protected] log]# rpm -qa | grep auth authconfig-5.3.21-5.el5 courier-authlib-devel-0.62.1-1 courier-authlib-0.62.1-1 courier-authlib-mysql-0.62.1-1 [[email protected] log]# [[email protected] log]# locate libauthmysql.s [[email protected] log]# locate libauthmysql.so rpm: no packages given for install [[email protected] log]# rpm -Uvh --force /home/dennis/rpm/RPMS/i386/courier-authlib-mysql-0.62.1-1.i386.rpm Preparing... ########################################### [100%] 1:courier-authlib-mysql ########################################### [100%] [[email protected] log]# Uhm...
ok.. so what's your status now? Hint: the locate-database is usually updated once a week or possibly daily, so any added files could take a while before they show up. The "find" command always lists current files, but takes longer. Would you please find the libauthmysql.so and run the ldd command on it? You should get output, stating which libraries are (dynamically) linked in this file. Perhaps that gives a hint where to look.. Code: [email protected]:/usr/lib/courier-authlib$ ldd libauthuserdb.so linux-gate.so.1 => (0xffffe000) libcourierauthcommon.so.0 => /usr/lib/courier-authlib/libcourierauthcommon.so.0 (0xb7f04000) libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7ecf000) libgdbm.so.3 => /usr/lib/libgdbm.so.3 (0xb7ec9000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d98000) libcourierauth.so.0 => /usr/lib/courier-authlib/libcourierauth.so.0 (0xb7d8e000) /lib/ld-linux.so.2 (0x80000000) [email protected]:/usr/lib/courier-authlib$ Paul
Unfortunately no improvement as of yet. Code: [[email protected] ~]# updatedb [[email protected] ~]# locate libauthmysql.so [[email protected] ~]# rpm -qa | grep courier | grep mysql courier-authlib-mysql-0.62.1-1 [[email protected] ~]# By rebuilding the rpm's using this howto I have been able to get the .so files installed. However still fails for authtest: Code: [[email protected] log]# authtest [email protected] secret Authentication FAILED: Operation not permitted [[email protected] log]# cat maillog [[email protected] log]# locate libauthmysql.so /home/derk/rpm/BUILD/courier-authlib-0.62.1/.libs/libauthmysql.so /home/derk/rpm/BUILD/courier-authlib-0.62.1/.libs/libauthmysql.soT /usr/lib/courier-authlib/libauthmysql.so /usr/lib/courier-authlib/libauthmysql.so.0 [[email protected] log]#
I have no idea what's wrong. Did you compare your configuration with the one from the tutorial? Maybe you made a typo somewhere?
I did compare the configurations. I will ask a freelancer to look at it or I might uninstall it and install a VMWare Virtual Machine and just use Plesk for hosting the e-mail using qmail.