View Single Post
  #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