[Dovecot] newbie: can not authenticate using dovecot
Hi all,
This is the first time I used Dovecot and it's perfectly run : dev# ps ax | grep dove 77332 ?? Ss 0:00.30 /usr/local/sbin/dovecot -c /usr/local/etc/dovecot.con 77333 ?? S 0:00.10 dovecot-auth 77334 ?? I 0:00.02 dovecot-auth -w 81495 0 S+ 0:00.00 grep dove
But when I try to connect to Dovecot's POP3 Server : dev# telnet 127.0.0.1 110 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. +OK Dovecot ready. user bogi +OK pass bogi Connection closed by foreign host.
Is there something I missed in Dovecot's configuration?
This is my configuration :
dev# dovecot --version 1.2.16
dev# dovecot -n # 1.2.16: /usr/local/etc/dovecot.conf # OS: FreeBSD 8.2-RELEASE i386 protocols: pop3 listen: 127.0.0.1:110 ssl: no disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/pop3-login verbose_proctitle: yes first_valid_uid: 1000 first_valid_gid: 1000 mail_privileged_group: mail mail_location: mbox:~/mail/:INBOX=/var/mail/%u mail_executable: /usr/local/libexec/dovecot/pop3 mail_plugin_dir: /usr/local/lib/dovecot/pop3 pop3_client_workarounds: outlook-no-nuls oe-ns-eoh lda: sendmail_path: /usr/sbin/sendmail auth default: mechanisms: plain login username_format: %Lu passdb: driver: pam args: session=yes dovecot userdb: driver: passwd args: blocking=yes socket: type: listen client: path: /var/run/dovecot/auth-client mode: 432 master: path: /var/run/dovecot/auth-master mode: 384
So sorry guys
I've found the problem after activating Dovecot's log. After I use "mail_location = mbox:/var/mail/:INBOX=/var/mail/%u" everything works just fine.
Thank you and sorry for my newbie question.
regards.
Bogi Aditya IM Telkom
On Wed, May 18, 2011 at 8:48 AM, nyoman.bogi@gmail.com < nyoman.bogi@gmail.com> wrote:
Hi all,
This is the first time I used Dovecot and it's perfectly run : dev# ps ax | grep dove 77332 ?? Ss 0:00.30 /usr/local/sbin/dovecot -c /usr/local/etc/dovecot.con 77333 ?? S 0:00.10 dovecot-auth 77334 ?? I 0:00.02 dovecot-auth -w 81495 0 S+ 0:00.00 grep dove
But when I try to connect to Dovecot's POP3 Server : dev# telnet 127.0.0.1 110 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. +OK Dovecot ready. user bogi +OK pass bogi Connection closed by foreign host.
Is there something I missed in Dovecot's configuration?
This is my configuration :
dev# dovecot --version 1.2.16
dev# dovecot -n # 1.2.16: /usr/local/etc/dovecot.conf # OS: FreeBSD 8.2-RELEASE i386 protocols: pop3 listen: 127.0.0.1:110 ssl: no disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/pop3-login verbose_proctitle: yes first_valid_uid: 1000 first_valid_gid: 1000 mail_privileged_group: mail mail_location: mbox:~/mail/:INBOX=/var/mail/%u mail_executable: /usr/local/libexec/dovecot/pop3 mail_plugin_dir: /usr/local/lib/dovecot/pop3 pop3_client_workarounds: outlook-no-nuls oe-ns-eoh lda: sendmail_path: /usr/sbin/sendmail auth default: mechanisms: plain login username_format: %Lu passdb: driver: pam args: session=yes dovecot userdb: driver: passwd args: blocking=yes socket: type: listen client: path: /var/run/dovecot/auth-client mode: 432 master: path: /var/run/dovecot/auth-master mode: 384
On 18.5.2011, at 7.06, nyoman.bogi@gmail.com wrote:
I've found the problem after activating Dovecot's log. After I use "mail_location = mbox:/var/mail/:INBOX=/var/mail/%u" everything works just fine.
That's not a good way to do it. It doesn't break with one user, but you'll start getting into trouble with more users since everyone tries to write to /var/mail/.imap/INBOX/* index files, thinking they own it. See the bottom of http://wiki.dovecot.org/MailLocation/Mbox
Thanks for the advice Sir,
when I use the configuration "mail_location = mbox:~/mail/:INBOX=/var/mail/%u" and look at the Dovecot's log why it's rejecting my authentication :
May 18 09:26:29 pop3-login: Info: Login: user=<bogi>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured May 18 09:26:29 POP3(bogi): Error: mail_location: mbox: mkdir(/nonexistent/mail) failed: Permission denied (euid=1005(bogi) egid=1005(bogi)) May 18 09:26:29 POP3(bogi): Fatal: Namespace initialization failed May 18 09:27:45 dovecot: Warning: Killed with signal 15 (by pid=82713 uid=0 code=kill)
And Yes, I create all user with no home directory (/nonexistent) and no shell (basically all user will have only mail spool in /var/mail)
any suggestion to avoid this?
should I use a new directory i.e. /var/mail/dovecot with world writable to accommodate this?
thanks in advance
I suggest you do as the wiki URL I gave explained. Create a non-writable empty directory with indexes disabled.
On 18.5.2011, at 11.36, nyoman.bogi@gmail.com wrote:
Thanks for the advice Sir,
when I use the configuration "mail_location = mbox:~/mail/:INBOX=/var/mail/%u" and look at the Dovecot's log why it's rejecting my authentication :
May 18 09:26:29 pop3-login: Info: Login: user=<bogi>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured May 18 09:26:29 POP3(bogi): Error: mail_location: mbox: mkdir(/nonexistent/mail) failed: Permission denied (euid=1005(bogi) egid=1005(bogi)) May 18 09:26:29 POP3(bogi): Fatal: Namespace initialization failed May 18 09:27:45 dovecot: Warning: Killed with signal 15 (by pid=82713 uid=0 code=kill)
And Yes, I create all user with no home directory (/nonexistent) and no shell (basically all user will have only mail spool in /var/mail)
any suggestion to avoid this?
should I use a new directory i.e. /var/mail/dovecot with world writable to accommodate this?
thanks in advance
participants (2)
-
nyoman.bogi@gmail.com
-
Timo Sirainen