Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 23rd April 2009, 22:12
dennis00 dennis00 is offline
Junior Member
 
Join Date: Apr 2009
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
Default Login failed on Virtual Users And Domains With Postfix, Courier, MySQL And Squirrels

I have followed the plugin at http://howtoforge.com/virtual-users-...mail-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, user=info@mydomain.eu, 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, user=sales@example.com, 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, user=info@mydomain.eu, 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=<root@dns2.mydomain.nl>, 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=<info@mydomain.eu>, 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=<EOT@dns2.mydomain.nl>, 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)
[root@dns2 log]#
I have tried both IMAP and Squirrelmail, both respond, but give login failed.

Last edited by dennis00; 25th April 2009 at 13:38.
Reply With Quote
Sponsored Links
  #2  
Old 23rd April 2009, 22:18
dennis00 dennis00 is offline
Junior Member
 
Join Date: Apr 2009
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Code:
[root@dns2 log]# authtest sales@example.com secret
Authentication FAILED: Operation not permitted
Reply With Quote
  #3  
Old 24th April 2009, 10:28
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

check the error messages in /var/log/secure /var/log/messages and /var/log/audit/audit.log
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
The Following User Says Thank You to topdog For This Useful Post:
dennis00 (24th April 2009)
  #4  
Old 24th April 2009, 10:44
dennis00 dennis00 is offline
Junior Member
 
Join Date: Apr 2009
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
Default

No lines written in /var/log/messages and /var/log/secure.

Code:
[root@dns2 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 sales@example.com 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
Reply With Quote
  #5  
Old 24th April 2009, 10:49
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

I suspected it was selinux but it seems not.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #6  
Old 24th April 2009, 13:19
tebokkel tebokkel is offline
Member
 
Join Date: Feb 2007
Location: The Netherlands
Posts: 96
Thanks: 0
Thanked 9 Times in 9 Posts
Default

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
Reply With Quote
The Following User Says Thank You to tebokkel For This Useful Post:
dennis00 (24th April 2009)
  #7  
Old 24th April 2009, 20:45
dennis00 dennis00 is offline
Junior Member
 
Join Date: Apr 2009
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by tebokkel View Post
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:
[root@dns2 ~]# 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"
[root@dns2 ~]#
Code:
[root@dns2 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
[root@dns2 authlib]#
Code:
[root@dns2 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
[root@dns2 authlib]#
Code:
[root@dns2 authlib]# chkconfig --levels 235 courier-imap on
[root@dns2 authlib]# /etc/init.d/courier-authlib restart
Stopping Courier authentication services: authdaemond
Starting Courier authentication services: authdaemond
[root@dns2 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
[root@dns2 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:
[root@dns2 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
[root@dns2 log]#
[root@dns2 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
[root@dns2 log]#
[root@dns2 log]# locate libauthmysql.s
[root@dns2 log]# locate libauthmysql.so
rpm: no packages given for install
[root@dns2 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%]
[root@dns2 log]#
Uhm...

Last edited by dennis00; 24th April 2009 at 20:55.
Reply With Quote
  #8  
Old 25th April 2009, 10:46
tebokkel tebokkel is offline
Member
 
Join Date: Feb 2007
Location: The Netherlands
Posts: 96
Thanks: 0
Thanked 9 Times in 9 Posts
Default

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:
tebokkel@www1:/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)
tebokkel@www1:/usr/lib/courier-authlib$
Paul
Reply With Quote
  #9  
Old 25th April 2009, 13:37
dennis00 dennis00 is offline
Junior Member
 
Join Date: Apr 2009
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Unfortunately no improvement as of yet.

Code:
[root@dns2 ~]# updatedb
[root@dns2 ~]# locate libauthmysql.so
[root@dns2 ~]# rpm -qa | grep courier  | grep mysql
courier-authlib-mysql-0.62.1-1
[root@dns2 ~]#
By rebuilding the rpm's using this howto I have been able to get the .so files installed.

However still fails for authtest:
Code:
[root@dns2 log]# authtest sales@example.com secret
Authentication FAILED: Operation not permitted
[root@dns2 log]# cat maillog
[root@dns2 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
[root@dns2 log]#

Last edited by dennis00; 25th April 2009 at 13:51.
Reply With Quote
  #10  
Old 26th April 2009, 13:11
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
 
Default

Are you sure that SELinux is disabled? What's the output of
Code:
getenforce
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:04.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.