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([email protected],::ffff:192.168.10.96): query: SELECT password FROM mailbox WHERE username = '[email protected]' Feb 22 13:21:53 fwgw dovecot: auth(default): client out: OK 1 [email protected] 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([email protected],::ffff:192.168.10.96): SELECT maildir, 89 AS uid, 89 AS gid FROM mailbox WHERE username = '[email protected]' Feb 22 13:21:53 fwgw dovecot: auth(default): master out: USER 1 [email protected] [email protected]/ uid=89 gid=89 Feb 22 13:21:53 fwgw dovecot: pop3-login: Login: user=<[email protected]>, method=PLAIN, rip=::ffff:192.168.10.96, lip=::ffff:60.54.174.146 Feb 22 13:21:53 fwgw dovecot: POP3([email protected]): Effective uid=89, gid=89 Feb 22 13:21:53 fwgw dovecot: POP3([email protected]): maildir: data=/home/vmail/mesara.biz/fizan Feb 22 13:21:53 fwgw dovecot: POP3([email protected]): maildir: root=/home/vmail/mesara.biz/fizan, index=/home/vmail/mesara.biz/haifizan,control=, inbox= Feb 22 13:21:53 fwgw dovecot: POP3([email protected]): 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/Cent5VirtMailServer) ( 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 "[email protected]" instead of "mesara.biz/fizan" [r...@fwgw ]# cd /home/vmail [r...@fwgw vmail]# ls -l total 16 drwx------ 5 postfix postfix 4096 Feb 21 18:49 [email protected] 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/[email protected] // NO: /usr/local/virtual/[email protected] $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/[email protected] // 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 1. make postfix/ LDA store emails at /home/vmail/mesara.biz/username OR 2. make imap read emails from /home/vmail/[email protected] Comments/help most welcome. ----- Original Message ---- > From: Timo Sirainen <[email protected]> > 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([email protected],::ffff:60.50.250.8): SELECT maildir, 89 AS uid, 89 AS > gid > FROM mailb ox WHERE username = '[email protected]' > > 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 > [email protected] [email protected]/ 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([email protected]): 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.
