[Dovecot] Cant Receive Email from dovecot pop
Guys, i am new to dovecot. I am not able to retrieve email from an account that i just setup.
A. This is the output from /var/log.maillog. ...........................................................
Feb 21 18:01:31 fwgw dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3 lip=::ffff:60.54.174.146 rip=::ffff:60.50.250.8 resp=<hidden> Feb 21 18:01:31 fwgw dovecot: auth-worker(default): mysql: Connected to localhost (postfix) Feb 21 18:01:31 fwgw dovecot: auth-worker(default): sql(fizan,::ffff:60.50.250.8): query: SELECT password FROM mailbox WHERE username = 'fizan' Feb 21 18:01:31 fwgw dovecot: auth-worker(default): sql(fizan,::ffff:60.50.250.8): unknown user Feb 21 18:01:32 fwgw dovecot: auth(default): new auth connection: pid=3567 Feb 21 18:01:32 fwgw dovecot: auth(default): client out: FAIL 1 user=fizan Feb 21 18:01:32 fwgw dovecot: pop3-login: Aborted login: user=<fizan>, method=PLAIN, rip=::ffff:60.50.250.8, lip=::ffff:60.54.174.146
B. This is my /etc/dovecont.conf ............................................
## Dovecot configuration file
protocols = imap pop3
auth default { userdb sql { args = /etc/dovecot-mysql.conf } passdb sql { args = /etc/dovecot-mysql.conf } }
first_valid_uid = 89 default_mail_env = maildir:/home/vmail/%d/%n
# Debugging options
auth_verbose = yes auth_debug = yes
C. Error Message from the Email Client - Kmail ................................................................
I get a messge saying;
"Could not Login to mail.mesara.biz. The password may be wrong. The server said authentication failed"
D. Other info .............
I am running on a Centos 5.2 box , with postfix 2.3, dovecot 1.0.7, mysql 5.0.45
Pls help. Much appreciated.
Regards. gomez
A Google result suggested to check the username. Results here ...... but no luck?
A. Telnet results - 1; .............................
[root@wgw ~]# telnet localhost 110 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. +OK Dovecot ready. user fizan@mesara.biz +OK pass asdf -ERR Authentication failed.
B. Output from /var/log/maillog .......................................
Feb 21 19:42:55 fwgw dovecot: auth(default): new auth connection: pid=3952 Feb 21 19:43:13 fwgw dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3 secured lip=::ffff:127.0.0.1 rip=::ffff:127.0.0.1 resp=<hidden> Feb 21 19:43:13 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:127.0.0.1): query: SELECT password FROM mailbox WHERE username = 'fizan@mesara.biz' Feb 21 19:43:13 fwgw dovecot: auth-worker(default): sql(izan@mesara.biz,::ffff:127.0.0.1): Password mismatch Feb 21 19:43:15 fwgw dovecot: auth(default): client out: FAIL 1 user=fizan@mesara.biz
So from "unknown user" ... i have graduated to "password mismatch"....
So this is definitely a SASL error ? How to solve?
C. /usr/lib/sasl2/smtpd.conf contents ...............................................
pwcheck_method: auxprop mech_list: PLAIN auxprop_plugin: sql sql_verbose: yes sql_engine: mysql sql_hostnames: localhost sql_user: postfix sql_passwd: kasdf sql_database: postfix sql_select: select password from mailbox where username = '%u@%r'
D. /etc/dovecot-mysql.conf ........................................
driver = mysql connect = host=localhost dbname=postfix user=postfix password=kpostfix default_pass_scheme = PLAIN password_query = SELECT password FROM mailbox WHERE username = '%u' user_query = SELECT maildir, 89 AS uid, 89 AS gid FROM mailbox WHERE username = '%u'
Will keep googling....
Guys, i am new to dovecot. I am not able to retrieve email from an account that i just setup.
A. This is the output from /var/log.maillog. ...........................................................
Feb 21 18:01:31 fwgw dovecot: auth(default): client in: AUTH 1 PLAIN
service=POP3 lip=::ffff:60.54.174.146 rip=::ffff:60.50.250.8
resp= Feb 21 18:01:31 fwgw dovecot: auth-worker(default): mysql: Connected to localhost (postfix) Feb 21 18:01:31 fwgw dovecot: auth-worker(default): sql(fizan,::ffff:60.50.250.8): query: SELECT password FROM mailbox WHERE username = 'fizan' Feb 21 18:01:31 fwgw dovecot: auth-worker(default): sql(fizan,::ffff:60.50.250.8): unknown user Feb 21 18:01:32 fwgw dovecot: auth(default): new auth connection: pid=3567 Feb 21 18:01:32 fwgw dovecot: auth(default): client out: FAIL 1
user=fizan Feb 21 18:01:32 fwgw dovecot: pop3-login: Aborted login: user=, method=PLAIN, rip=::ffff:60.50.250.8, lip=::ffff:60.54.174.146B. This is my /etc/dovecont.conf ............................................
## Dovecot configuration file
protocols = imap pop3
auth default { userdb sql { args = /etc/dovecot-mysql.conf } passdb sql { args = /etc/dovecot-mysql.conf } }
first_valid_uid = 89 default_mail_env = maildir:/home/vmail/%d/%n
# Debugging options
auth_verbose = yes auth_debug = yes
C. Error Message from the Email Client - Kmail ................................................................
I get a messge saying;
"Could not Login to mail.mesara.biz. The password may be wrong. The server said authentication failed"
D. Other info .............
I am running on a Centos 5.2 box , with postfix 2.3, dovecot 1.0.7, mysql 5.0.45
Pls help. Much appreciated.
Regards. gomez
Aha.. some progress at least. i solved the "password mismatch" errror. In postfixadmin config, i had accidentally set the passwd type to md5crypt instead of cleartext ( i am using the plain mechnasim )
BUT....
A. Still can't retrieve mail..... the mailliog shows..... ...................................................................
Feb 21 21:16:23 fwgw dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3 lip=::ffff:60.54.174.146 rip=::ffff:60.50.250.8 resp=<hidden> Feb 21 21:16:23 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:60.50.250.8): query: SELECT password FROM mailbox WHERE usern ame = 'fizan@mesara.biz' Feb 21 21:16:23 fwgw dovecot: auth(default): client out: OK 1 user=fizan@mesara.biz Feb 21 21:16:23 fwgw dovecot: auth(default): master in: REQUEST 4 4763 1 Feb 21 21:16:23 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:60.50.250.8): SELECT maildir, 89 AS uid, 89 AS gid FROM mailb ox WHERE username = 'fizan@mesara.biz' Feb 21 21:16:23 fwgw dovecot: auth(default): master out: USER 4 fizan@meswara.biz maildir=haifizan@meswara.biz/ uid=89 gid=89 Feb 21 21:16:23 fwgw dovecot: pop3-login: Login: user=<fizan@mesara.biz>, method=PLAIN, rip=::ffff:60.50.250.8, lip=::ffff:60.54.174.146 Feb 21 21:16:23 fwgw dovecot: POP3(fizan@mesara.biz): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
No idea what the above means though.....
B. Kmail - No errors ...............................
There are no more authentication error messages.....Kmail just says that there are no more new messages.
Any ideas?
A Google result suggested to check the username. Results here ...... but no luck?
A. Telnet results - 1; .............................
[root@wgw ~]# telnet localhost 110 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. +OK Dovecot ready. user fizan@mesara.biz +OK pass asdf -ERR Authentication failed.
B. Output from /var/log/maillog .......................................
Feb 21 19:42:55 fwgw dovecot: auth(default): new auth connection: pid=3952 Feb 21 19:43:13 fwgw dovecot: auth(default): client in: AUTH 1 PLAIN
service=POP3 secured lip=::ffff:127.0.0.1 rip=::ffff:127.0.0.1
resp= Feb 21 19:43:13 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:127.0.0.1): query: SELECT password FROM mailbox WHERE username = 'fizan@mesara.biz' Feb 21 19:43:13 fwgw dovecot: auth-worker(default): sql(izan@mesara.biz,::ffff:127.0.0.1): Password mismatch Feb 21 19:43:15 fwgw dovecot: auth(default): client out: FAIL 1
user=fizan@mesara.bizSo from "unknown user" ... i have graduated to "password mismatch"....
So this is definitely a SASL error ? How to solve?
C. /usr/lib/sasl2/smtpd.conf contents ...............................................
pwcheck_method: auxprop mech_list: PLAIN auxprop_plugin: sql sql_verbose: yes sql_engine: mysql sql_hostnames: localhost sql_user: postfix sql_passwd: kasdf sql_database: postfix sql_select: select password from mailbox where username = '%u@%r'
D. /etc/dovecot-mysql.conf ........................................
driver = mysql connect = host=localhost dbname=postfix user=postfix password=kpostfix default_pass_scheme = PLAIN password_query = SELECT password FROM mailbox WHERE username = '%u' user_query = SELECT maildir, 89 AS uid, 89 AS gid FROM mailbox WHERE username = '%u'
Will keep googling....
Guys, i am new to dovecot. I am not able to retrieve email from an account that i just setup.
A. This is the output from /var/log.maillog. ...........................................................
Feb 21 18:01:31 fwgw dovecot: auth(default): client in: AUTH 1 PLAIN
service=POP3 lip=::ffff:60.54.174.146 rip=::ffff:60.50.250.8
resp= Feb 21 18:01:31 fwgw dovecot: auth-worker(default): mysql: Connected to localhost (postfix) Feb 21 18:01:31 fwgw dovecot: auth-worker(default): sql(fizan,::ffff:60.50.250.8): query: SELECT password FROM mailbox WHERE username = 'fizan' Feb 21 18:01:31 fwgw dovecot: auth-worker(default): sql(fizan,::ffff:60.50.250.8): unknown user Feb 21 18:01:32 fwgw dovecot: auth(default): new auth connection: pid=3567 Feb 21 18:01:32 fwgw dovecot: auth(default): client out: FAIL 1
user=fizan Feb 21 18:01:32 fwgw dovecot: pop3-login: Aborted login: user=, method=PLAIN, rip=::ffff:60.50.250.8, lip=::ffff:60.54.174.146B. This is my /etc/dovecont.conf ............................................
## Dovecot configuration file
protocols = imap pop3
auth default { userdb sql { args = /etc/dovecot-mysql.conf } passdb sql { args = /etc/dovecot-mysql.conf } }
first_valid_uid = 89 default_mail_env = maildir:/home/vmail/%d/%n
# Debugging options
auth_verbose = yes auth_debug = yes
C. Error Message from the Email Client - Kmail ................................................................
I get a messge saying;
"Could not Login to mail.mesara.biz. The password may be wrong. The server said authentication failed"
D. Other info .............
I am running on a Centos 5.2 box , with postfix 2.3, dovecot 1.0.7, mysql 5.0.45
Pls help. Much appreciated.
Regards. gomez
Aha.. some progress at least. i solved the "password mismatch" errror. In postfixadmin config, i had accidentally set the passwd type to md5crypt instead of cleartext ( i am using the plain mechanism )
BUT....
A. Still can't retrieve mail..... the mailliog shows..... ...................................................................
Feb
21 21:16:23 fwgw dovecot: auth(default): client in: AUTH 1
PLAIN service=POP3 lip=::ffff:60.54.174.146
rip=::ffff:60.50.250.8 resp=<hidden>
Feb 21 21:16:23 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:60.50.250.8): query: SELECT password FROM mailbox WHERE usern ame = 'fizan@mesara.biz'
Feb 21 21:16:23 fwgw dovecot: auth(default): client out: OK 1 user=fizan@mesara.biz
Feb 21 21:16:23 fwgw dovecot: auth(default): master in: REQUEST 4 4763 1
Feb 21 21:16:23 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:60.50.250.8): SELECT maildir, 89 AS uid, 89 AS gid FROM mailb ox WHERE username = 'fizan@mesara.biz'
Feb 21 21:16:23 fwgw dovecot: auth(default): master out: USER 4 fizan@mesara.biz maildir=fizan@mesara.biz/ uid=89 gid=89
Feb 21 21:16:23 fwgw dovecot: pop3-login: Login: user=<fizan@mesara.biz>, method=PLAIN, rip=::ffff:60.50.250.8, lip=::ffff:60.54.174.146
Feb 21 21:16:23 fwgw dovecot: POP3(fizan@mesara.biz): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
no more authentication issues. No idea what the above means though..... " Disconnected "
B. Kmail - No errors ...............................
There are no more authentication error messages.....Kmail just says that there are no more new messages.
Any ideas?
Aha.. some progress at least. i solved the "password mismatch" errror. In postfixadmin config, i had accidentally set the passwd type to md5crypt instead of cleartext ( i am using the plain mechnasim )
BUT....
A. Still can't retrieve mail..... the mailliog shows..... ...................................................................
Feb 21 21:16:23 fwgw dovecot: auth(default): client in: AUTH 1 PLAIN
service=POP3 lip=::ffff:60.54.174.146 rip=::ffff:60.50.250.8
resp= Feb 21 21:16:23 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:60.50.250.8): query: SELECT password FROM mailbox WHERE usern ame = 'fizan@mesara.biz' Feb 21 21:16:23 fwgw dovecot: auth(default): client out: OK 1
user=fizan@mesara.biz Feb 21 21:16:23 fwgw dovecot: auth(default): master in: REQUEST 4 4763
1 Feb 21 21:16:23 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:60.50.250.8): SELECT maildir, 89 AS uid, 89 AS gid FROM mailb ox WHERE username = 'fizan@mesara.biz' Feb 21 21:16:23 fwgw dovecot: auth(default): master out: USER 4
fizan@meswara.biz maildir=haifizan@meswara.biz/ uid=89 gid=89 Feb 21 21:16:23 fwgw dovecot: pop3-login: Login: user=, method=PLAIN, rip=::ffff:60.50.250.8, lip=::ffff:60.54.174.146 Feb 21 21:16:23 fwgw dovecot: POP3(fizan@mesara.biz): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0No idea what the above means though.....
B. Kmail - No errors ...............................
There are no more authentication error messages.....Kmail just says that there are no more new messages.
Any ideas?
A Google result suggested to check the username. Results here ...... but no luck?
A. Telnet results - 1; .............................
[root@wgw ~]# telnet localhost 110 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. +OK Dovecot ready. user fizan@mesara.biz +OK pass asdf -ERR Authentication failed.
B. Output from /var/log/maillog .......................................
Feb 21 19:42:55 fwgw dovecot: auth(default): new auth connection: pid=3952 Feb 21 19:43:13 fwgw dovecot: auth(default): client in: AUTH 1 PLAIN
service=POP3 secured lip=::ffff:127.0.0.1 rip=::ffff:127.0.0.1
resp= Feb 21 19:43:13 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:127.0.0.1): query: SELECT password FROM mailbox WHERE username = 'fizan@mesara.biz' Feb 21 19:43:13 fwgw dovecot: auth-worker(default): sql(izan@mesara.biz,::ffff:127.0.0.1): Password mismatch Feb 21 19:43:15 fwgw dovecot: auth(default): client out: FAIL 1
user=fizan@mesara.bizSo from "unknown user" ... i have graduated to "password mismatch"....
So this is definitely a SASL error ? How to solve?
C. /usr/lib/sasl2/smtpd.conf contents ...............................................
pwcheck_method: auxprop mech_list: PLAIN auxprop_plugin: sql sql_verbose: yes sql_engine: mysql sql_hostnames: localhost sql_user: postfix sql_passwd: kasdf sql_database: postfix sql_select: select password from mailbox where username = '%u@%r'
D. /etc/dovecot-mysql.conf ........................................
driver = mysql connect = host=localhost dbname=postfix user=postfix password=kpostfix default_pass_scheme = PLAIN password_query = SELECT password FROM mailbox WHERE username = '%u' user_query = SELECT maildir, 89 AS uid, 89 AS gid FROM mailbox WHERE username
'%u'
Will keep googling....
Guys, i am new to dovecot. I am not able to retrieve email from an account that i just setup.
A. This is the output from /var/log.maillog. ...........................................................
Feb 21 18:01:31 fwgw dovecot: auth(default): client in: AUTH 1
PLAINservice=POP3 lip=::ffff:60.54.174.146 rip=::ffff:60.50.250.8
resp= Feb 21 18:01:31 fwgw dovecot: auth-worker(default): mysql: Connected to localhost (postfix) Feb 21 18:01:31 fwgw dovecot: auth-worker(default): sql(fizan,::ffff:60.50.250.8): query: SELECT password FROM mailbox WHERE username = 'fizan' Feb 21 18:01:31 fwgw dovecot: auth-worker(default): sql(fizan,::ffff:60.50.250.8): unknown user Feb 21 18:01:32 fwgw dovecot: auth(default): new auth connection: pid=3567 Feb 21 18:01:32 fwgw dovecot: auth(default): client out: FAIL 1
user=fizan Feb 21 18:01:32 fwgw dovecot: pop3-login: Aborted login: user=, method=PLAIN, rip=::ffff:60.50.250.8, lip=::ffff:60.54.174.146B. This is my /etc/dovecont.conf ............................................
## Dovecot configuration file
protocols = imap pop3
auth default { userdb sql { args = /etc/dovecot-mysql.conf } passdb sql { args = /etc/dovecot-mysql.conf } }
first_valid_uid = 89 default_mail_env = maildir:/home/vmail/%d/%n
# Debugging options
auth_verbose = yes auth_debug = yes
C. Error Message from the Email Client - Kmail ................................................................
I get a messge saying;
"Could not Login to mail.mesara.biz. The password may be wrong. The server said authentication failed"
D. Other info .............
I am running on a Centos 5.2 box , with postfix 2.3, dovecot 1.0.7, mysql 5.0.45
Pls help. Much appreciated.
Regards. gomez
On Sat, 2009-02-21 at 05:28 -0800, Linux Advocate wrote:
A. Still can't retrieve mail..... the mailliog shows.....
Set mail_debug=yes. It'll show where Dovecot is looking for the mail.
Feb 21 21:16:23 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:60.50.250.8): SELECT maildir, 89 AS uid, 89 AS gid FROM mailb ox WHERE username = 'fizan@mesara.biz'
The "maildir" doesn't do anything. Dovecot doesn't look for "maildir" field.
Feb 21 21:16:23 fwgw dovecot: auth(default): master out: USER 4 fizan@mesara.biz maildir=fizan@mesara.biz/ uid=89 gid=89
Also the maildir is relative to some other directory apparently? That's not going to work. Perhaps you want something like:
user_query = SELECT concat('/var/vmail/', maildir) AS home, ...
and in dovecot.conf set mail_location = maildir:~
Feb 21 21:16:23 fwgw dovecot: POP3(fizan@mesara.biz): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 No idea what the above means though..... " Disconnected "
"Logged out" means that the client had successfully logged in and then used QUIT command to log out.
A. Timo, with mail debug=yes , the log is as below... ............................................................................
Feb 22 13:21:53 fwgw dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3 lip=::ffff:60.54.174.146 rip=::ffff:192.168.10.96 resp=<hidden> Feb 22 13:21:53 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:192.168.10.96): query: SELECT password FROM mailbox WHERE username = 'fizan@mesara.biz' Feb 22 13:21:53 fwgw dovecot: auth(default): client out: OK 1 user=fizan@mesara.biz Feb 22 13:21:53 fwgw dovecot: auth(default): master in: REQUEST 1 20628 1 Feb 22 13:21:53 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:192.168.10.96): SELECT maildir, 89 AS uid, 89 AS gid FROM mailbox WHERE username = 'fizan@mesara.biz' Feb 22 13:21:53 fwgw dovecot: auth(default): master out: USER 1 fizan@mesara.biz maildir=fizan@mesara.biz/ uid=89 gid=89 Feb 22 13:21:53 fwgw dovecot: pop3-login: Login: user=<fizan@mesara.biz>, method=PLAIN, rip=::ffff:192.168.10.96, lip=::ffff:60.54.174.146 Feb 22 13:21:53 fwgw dovecot: POP3(fizan@mesara.biz): Effective uid=89, gid=89 Feb 22 13:21:53 fwgw dovecot: POP3(fizan@mesara.biz): maildir: data=/home/vmail/mesara.biz/fizan Feb 22 13:21:53 fwgw dovecot: POP3(fizan@mesara.biz): maildir: root=/home/vmail/mesara.biz/fizan, index=/home/vmail/mesara.biz/haifizan,control=, inbox= Feb 22 13:21:53 fwgw dovecot: POP3(fizan@mesara.biz): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
B. The /etc/dovecot-mysql.conf file ; ( copied from http://www.campworld.net/thewiki/pmwiki.php/LinuxServersCentOS/Cent5VirtMail...) ( similar syntax for the user_query shown in other sites as well, such as opensuse howto... ) ( also in postfixadmin2.3's dovecot.txt file) .......................................................................................................................................................................................................
driver = mysql connect = host=localhost dbname=postfix user=postfix password=kasdf default_pass_scheme = PLAIN password_query = SELECT password FROM mailbox WHERE username = '%u' user_query = SELECT maildir, 89 AS uid, 89 AS gid FROM mailbox WHERE username = '%u'
In dovecot.conf, my default_mail_env = maildir:/home/vmail/%d/%n, So from the log , i can see that dovecot is accesing the right area ( yes? ) . . . BUT . . When i go to /home/vmail, i can see that the test emails i sent are going to folder "fizan@mesara.biz" instead of "mesara.biz/fizan"
[root@fwgw ]# cd /home/vmail [root@fwgw vmail]# ls -l total 16 drwx------ 5 postfix postfix 4096 Feb 21 18:49 fizan@meswara.biz drwx------ 3 postfix postfix 4096 Feb 21 21:07 mesara.biz
I guess the culprit is the settings in postfixadmin's config.inc.php
// Mailboxes // If you want to store the mailboxes per domain set this to 'YES'. // Examples: // YES: /usr/local/virtual/domain.tld/username@domain.tld // NO: /usr/local/virtual/username@domain.tld
$CONF['domain_path'] = 'NO';
// If you don't want to have the domain in your mailbox set this to 'NO'. // Examples: // YES: /usr/local/virtual/domain.tld/username@domain.tld // NO: /usr/local/virtual/domain.tld/username // Note: If $CONF['domain_path'] is set to NO, this setting will be forced to YES.
$CONF['domain_in_mailbox'] = 'YES';
I am gonna try to set the first to YES and the second to NO and will report back to the list.
Also, timo , i am hopeless at sql statements and i am not able to fully understand the sql statement that u have given. Sorry. I am hoping to either
- make postfix/ LDA store emails at /home/vmail/mesara.biz/username
OR
- make imap read emails from /home/vmail/username@mesara.biz
Comments/help most welcome.
----- Original Message ----
From: Timo Sirainen <tss@iki.fi> Subject: Re: [Dovecot] Cant Receive Email from dovecot pop -typos corrected....
On Sat, 2009-02-21 at 05:28 -0800, Linux Advocate wrote:
A. Still can't retrieve mail..... the mailliog shows.....
Set mail_debug=yes. It'll show where Dovecot is looking for the mail.
Feb 21 21:16:23 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:60.50.250.8): SELECT maildir, 89 AS uid, 89 AS gid FROM mailb ox WHERE username = 'fizan@mesara.biz'
The "maildir" doesn't do anything. Dovecot doesn't look for "maildir" field.
Feb 21 21:16:23 fwgw dovecot: auth(default): master out: USER 4
fizan@mesara.biz maildir=fizan@mesara.biz/ uid=89 gid=89Also the maildir is relative to some other directory apparently? That's not going to work. Perhaps you want something like:
user_query = SELECT concat('/var/vmail/', maildir) AS home, ...
and in dovecot.conf set mail_location = maildir:~
Feb 21 21:16:23 fwgw dovecot: POP3(fizan@mesara.biz): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 No idea what the above means though..... " Disconnected "
"Logged out" means that the client had successfully logged in and then used QUIT command to log out.
It works !!!!!!!!!!!!!!!!!!!!!!!!!!!!! Thanx everybody. Got my sanity back... Thanx Timo.
----- Original Message ----
From: Linux Advocate <linuxhousedn@yahoo.com> To: Dovecot Mailing List <dovecot@dovecot.org> Sent: Sunday, February 22, 2009 3:29:01 PM Subject: Re: [Dovecot] Cant Receive Email from dovecot pop -typos corrected....
A. Timo, with mail debug=yes , the log is as below... ............................................................................
Feb 22 13:21:53 fwgw dovecot: auth(default): client in: AUTH 1 PLAIN
service=POP3 lip=::ffff:60.54.174.146 rip=::ffff:192.168.10.96 resp= Feb 22 13:21:53 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:192.168.10.96): query: SELECT password FROM mailbox WHERE username = 'fizan@mesara.biz' Feb 22 13:21:53 fwgw dovecot: auth(default): client out: OK 1
user=fizan@mesara.biz Feb 22 13:21:53 fwgw dovecot: auth(default): master in: REQUEST 1 20628
1 Feb 22 13:21:53 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:192.168.10.96): SELECT maildir, 89 AS uid, 89 AS gid FROM mailbox WHERE username = 'fizan@mesara.biz' Feb 22 13:21:53 fwgw dovecot: auth(default): master out: USER 1
fizan@mesara.biz maildir=fizan@mesara.biz/ uid=89 gid=89 Feb 22 13:21:53 fwgw dovecot: pop3-login: Login: user=, method=PLAIN, rip=::ffff:192.168.10.96, lip=::ffff:60.54.174.146 Feb 22 13:21:53 fwgw dovecot: POP3(fizan@mesara.biz): Effective uid=89, gid=89 Feb 22 13:21:53 fwgw dovecot: POP3(fizan@mesara.biz): maildir: data=/home/vmail/mesara.biz/fizan Feb 22 13:21:53 fwgw dovecot: POP3(fizan@mesara.biz): maildir: root=/home/vmail/mesara.biz/fizan, index=/home/vmail/mesara.biz/haifizan,control=, inbox= Feb 22 13:21:53 fwgw dovecot: POP3(fizan@mesara.biz): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0B. The /etc/dovecot-mysql.conf file ; ( copied from http://www.campworld.net/thewiki/pmwiki.php/LinuxServersCentOS/Cent5VirtMail...) ( similar syntax for the user_query shown in other sites as well, such as opensuse howto... ) ( also in postfixadmin2.3's dovecot.txt file) .......................................................................................................................................................................................................
driver = mysql connect = host=localhost dbname=postfix user=postfix password=kasdf default_pass_scheme = PLAIN password_query = SELECT password FROM mailbox WHERE username = '%u' user_query = SELECT maildir, 89 AS uid, 89 AS gid FROM mailbox WHERE username = '%u'
In dovecot.conf, my default_mail_env = maildir:/home/vmail/%d/%n, So from the log , i can see that dovecot is accesing the right area ( yes? ) . . . BUT . . When i go to /home/vmail, i can see that the test emails i sent are going to folder "fizan@mesara.biz" instead of "mesara.biz/fizan"
[root@fwgw ]# cd /home/vmail [root@fwgw vmail]# ls -l total 16 drwx------ 5 postfix postfix 4096 Feb 21 18:49 fizan@meswara.biz drwx------ 3 postfix postfix 4096 Feb 21 21:07 mesara.biz
I guess the culprit is the settings in postfixadmin's config.inc.php
// Mailboxes // If you want to store the mailboxes per domain set this to 'YES'. // Examples: // YES: /usr/local/virtual/domain.tld/username@domain.tld // NO: /usr/local/virtual/username@domain.tld
$CONF['domain_path'] = 'NO';
// If you don't want to have the domain in your mailbox set this to 'NO'. // Examples: // YES: /usr/local/virtual/domain.tld/username@domain.tld // NO: /usr/local/virtual/domain.tld/username // Note: If $CONF['domain_path'] is set to NO, this setting will be forced to YES.
$CONF['domain_in_mailbox'] = 'YES';
I am gonna try to set the first to YES and the second to NO and will report back to the list.
Also, timo , i am hopeless at sql statements and i am not able to fully understand the sql statement that u have given. Sorry. I am hoping to either
- make postfix/ LDA store emails at /home/vmail/mesara.biz/username
OR
- make imap read emails from /home/vmail/username@mesara.biz
Comments/help most welcome.
----- Original Message ----
From: Timo Sirainen Subject: Re: [Dovecot] Cant Receive Email from dovecot pop -typos corrected....
On Sat, 2009-02-21 at 05:28 -0800, Linux Advocate wrote:
A. Still can't retrieve mail..... the mailliog shows.....
Set mail_debug=yes. It'll show where Dovecot is looking for the mail.
Feb 21 21:16:23 fwgw dovecot: auth-worker(default): sql(fizan@mesara.biz,::ffff:60.50.250.8): SELECT maildir, 89 AS uid, 89 AS gid
FROM mailb ox WHERE username = 'fizan@mesara.biz'
The "maildir" doesn't do anything. Dovecot doesn't look for "maildir" field.
Feb 21 21:16:23 fwgw dovecot: auth(default): master out: USER 4
fizan@mesara.biz maildir=fizan@mesara.biz/ uid=89 gid=89Also the maildir is relative to some other directory apparently? That's not going to work. Perhaps you want something like:
user_query = SELECT concat('/var/vmail/', maildir) AS home, ...
and in dovecot.conf set mail_location = maildir:~
Feb 21 21:16:23 fwgw dovecot: POP3(fizan@mesara.biz): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 No idea what the above means though..... " Disconnected "
"Logged out" means that the client had successfully logged in and then used QUIT command to log out.
participants (2)
-
Linux Advocate
-
Timo Sirainen