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 18th December 2005, 00:40
SeanG SeanG is offline
Junior Member
 
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Virtual Users And Domains With Postfix, Courier And MySQL: POP/IMAP authentication

Great tutorial.

I set this up on a clean Sarge install. Had a few problems which have been resolved by reading this and other forums. This particular one has had me going for days -I have followed all the steps in related threads on this forum.

I am unable to connect using pop or imap on the LAN (so no firewall issues). The error I get is:

Dec 17 21:48:29 netserver authdaemond.mysql: failed to connect to mysql server (server=localhost , userid=mail_admin)

mysql is up and running and "mysql -h localhost -u mail_admin -p" works just fine. Postfix can connect to the DB because mail is being delivered to the correct place. SASL is not working but I think that this is unrelated and should have no effect.

Here is my /etc/courier/authdaemonrc # comments removed to make it shorter

##VERSION: $Id: authdaemonrc.in,v 1.8 2001/10/07 02:16:22 mrsam Exp $

authmodulelist="authmysql"

authmodulelistorig="authcustom authcram authuserdb authldap authpgsql authmysql authpam"
daemons=5

version=""

authdaemonvar=/var/run/courier/authdaemon



and my /etc/courier/authmysqlrc # comments removed to make it shorter
I have no whitespace at the end of lines and in all cases field and value are separated by a single space.

##VERSION: $Id: authmysqlrc,v 1.17 2004/04/20 01:38:17 mrsam Exp $
#
# authmysqlrc created from authmysqlrc.dist by sysconftool

MYSQL_SERVER localhost
MYSQL_USERNAME mail_admin
MYSQL_PASSWD myownpassword
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE mail
MYSQL_USER_TABLE users
MYSQL_CRYPT_PWFIELD password
# MYSQL_CLEAR_PWFIELD clear
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_HOME_FIELD "/home/vmail"
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
MYSQL_QUOTA_FIELD quota

I am pretty much a LINUX newbie, happ to investigate this myself but need some pointers as to where to start

Thanks
Reply With Quote
Sponsored Links
  #2  
Old 18th December 2005, 15:09
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

I think you should check /etc/courier/authmysqlrc again, especially the format (tabs, spaces, etc.). Courier is very finicky about the format.
__________________
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
  #3  
Old 19th December 2005, 00:38
SeanG SeanG is offline
Junior Member
 
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Red face

hmm - reading through my post with the comments stripped out made this easy. It was the content, not the format - i.e. finger trouble...
Reply With Quote
  #4  
Old 1st January 2006, 17:08
bLuTm8 bLuTm8 is offline
Junior Member
 
Join Date: Jan 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Quote:
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
the error is in this entry:
this is the name of the table used by authdaemon, not the table content

example:
Code:
MYSQL_MAILDIR_FIELD maildir
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota... killfrog HOWTO-Related Questions 3 25th September 2009 21:45
Filtering emails using Spamassassin and Clamav for Exchange 2000 Server Rocky Server Operation 19 11th March 2008 08:27
Virtual Users And Domains With Postfix, Courier And MySQL ariek HOWTO-Related Questions 3 12th December 2005 22:14
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs pontifex HOWTO-Related Questions 2 26th October 2005 17:54


All times are GMT +2. The time now is 14:26.


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