Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 21st January 2011, 08:21
asiri85 asiri85 is offline
Junior Member
 
Join Date: Jan 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question Problem with Dovecot connectivity with mysql virtual users

Hi

I have a problem with Dovecot connectivity with mysql virtual users. Could you please guide me on what to do?

I use Red Hat Linux Enterprise 5 with Dovecot-1.0.7-2.el5
I have 3 virtual domains : abc.com.au as default and pqr.com.au and xyz.com.au as other virtual domains
Mysql database,username and password = postfix(they all are same)
"vmail:503:503" is the owner of /var/vmail/ folder


This is how i do it

telnet local host 143
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
* OK Dovecot ready.

a login sheena@abc.com.au bla-bla
a NO Authentication failed.

I get following error in log when I connect to imap server as "a login sheena@abc.com.au bla-bla"

dovecot: 2011-01-21 14:52:16 Info: Dovecot v1.0.7 starting up
dovecot: 2011-01-21 14:52:16 Info: auth-worker(default): mysql: Connected to localhost (postfix)
dovecot: 2011-01-21 14:53:01 Info: imap-login: Disconnected: Too many invalid commands: user=<sheena@abc.com.au>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured

dovecot.conf (Whole dovecot.conf is commented except below lines)
##############dovecot configured to work with virtual users############
base_dir = /var/run/dovecot/
protocols = imap pop3
listen = *
login_dir = /var/run/dovecot/login
mail_location = maildir:/var/vmail/%d/%n
#auth_default_realm = abc.com.au
mbox_read_locks = fcntl
log_timestamp = "%Y-%m-%d %H:%M:%S "
log_path = /var/log/maillog
mail_access_groups = postfix
first_valid_uid = 503
last_valid_uid = 503
first_valid_gid = 503
last_valid_gid = 503
maildir_copy_with_hardlinks = yes
auth default {
mechanisms = plain login
userdb sql {
args = /etc/dovecot-mysql.conf
}
passdb sql {
args = /etc/dovecot-mysql.conf
}
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}
####################################ends here######################

dovecot-mysql.conf
######dovecot-mysql.conf should look like this##########
# NOTE: '\' line splitting is used only for readability, currently Dovecot doesn't support it
# The mysqld.sock socket may be in different locations in different systems
driver = mysql

default_pass_scheme = PLAIN

connect = host=localhost dbname=postfix user=postfix password=postfix

password_query = SELECT username AS user, domain, password FROM mailbox WHERE username = '%n' AND domain = '%d'

user_query = SELECT maildir, 503 AS uid, 503 AS gid FROM mailbox WHERE username = '%n' AND domain = '%d'

####################ends here####################

Please help me.Ask me further details if you need.Thank you.
Reply With Quote
Sponsored Links
  #2  
Old 22nd January 2011, 15:31
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
 
Default

Quote:
Originally Posted by asiri85 View Post
default_pass_scheme = PLAIN
How do you store the passwords in the database? As clear text, or as MD5? If it's MD5, you should use
Code:
default_pass_scheme = MD5
instead.
__________________
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.10) VTCop HOWTO-Related Questions 9 9th April 2009 17:17
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail Can't telnet pwaterz HOWTO-Related Questions 13 4th April 2009 18:07
Postfix virtual users with MySQL problem bschultz Installation/Configuration 2 2nd October 2007 21:05
Virtual Users And Domains With Postfix, Courier And MySQL.. Authentication Problem stickyplaster HOWTO-Related Questions 17 16th December 2006 15:09
Problem with Virtual Users And Domains With Postfix, Courier And MySQL Howto fenix Server Operation 4 11th March 2006 03:53


All times are GMT +2. The time now is 15:00.


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