[Dovecot] Help with logging in and getting mail
Hi,
Very new to dovecot and to using POP3/IMAP (from this perspective anyway).
First things first, per the instructions from the web site:
dovecot version: 1.0.5
dovecot config: # 1.0.5: /usr/local/etc/dovecot.conf protocols: imap pop3 ssl_disable: yes disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(pop3): /usr/local/libexec/dovecot/pop3-login verbose_proctitle: yes first_valid_gid: 0 mail_extra_groups: mail mail_location: mbox:~/mail/:INBOX=/var/mail/%u mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(pop3): outlook-idle pop3_uidl_format(default): pop3_uidl_format(imap): pop3_uidl_format(pop3): %08Xu%08Xv pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh auth default: mechanisms: plain digest-md5 user: vmail passdb: driver: sql args: /usr/local/etc/dovecot-sql.conf userdb: driver: sql args: /usr/local/etc/dovecot-sql.conf
Please help me diagnose what is causing the following problem. Essentially, this user is a virtual user. I have it so that the system user, vmail, is the basket into which all virtual users e-mail goes. If my understanding is correct (and please enlighten me if it's not), mail aliases are setup to "map" aliased names into a real account. From there, dovecot will return e-mail to the virtual user based upon the "To" field of the e-mail, correct?
I have some aliases in my sendmail config that do just this. From the error below, it would seem that dovecot is actually authenticating the virutual user "jdunkin" in this case, but can't get some directories made. I've seen on my FreeBSD system that each system user has a "mail" file in the directory, /var/mail/<userid>.
What needs to be done further? Also, how do I ensure that virtual users are able to get their mail as well as system users?
Dec 29 15:01:54 whitbap dovecot: pop3-login: Login: user=<jdunkin>, method=PLAIN, rip=71.221.168.29, lip=192.168.2.23 Dec 29 15:01:54 whitbap dovecot: POP3(jdunkin): mkdir_parents(/var/mail/vmail//mail) failed: Not a directory Dec 29 15:01:54 whitbap dovecot: POP3(jdunkin): Failed to create storage with data: mbox:/var/mail/vmail//mail/:INBOX=/var/mail/jdunkin Dec 29 15:01:54 whitbap dovecot: child 61793 (pop3) returned error 89
Thanks, Andy
On Sat, 2007-12-29 at 14:00 -0700, Andrew Falanga wrote:
mail_location: mbox:~/mail/:INBOX=/var/mail/%u .. userdb: driver: sql args: /usr/local/etc/dovecot-sql.conf .. Dec 29 15:01:54 whitbap dovecot: POP3(jdunkin): mkdir_parents(/var/mail/vmail//mail) failed: Not a directory
Your SQL lookup returns "/var/mail/vmail/" as the user's home directory. You'll need to have a proper per-user directory as their home. For example have the user_query return '/home/virtual/%u' as home. See http://wiki.dovecot.org/VirtualUsers#homedirs
Also setting auth_debug=yes and mail_debug=yes may be helpful when figuring out why things don't work right.
On Saturday 29 December 2007 14:20:47 Timo Sirainen wrote:
On Sat, 2007-12-29 at 14:00 -0700, Andrew Falanga wrote:
mail_location: mbox:~/mail/:INBOX=/var/mail/%u
..
userdb: driver: sql args: /usr/local/etc/dovecot-sql.conf
..
Dec 29 15:01:54 whitbap dovecot: POP3(jdunkin): mkdir_parents(/var/mail/vmail//mail) failed: Not a directory
Your SQL lookup returns "/var/mail/vmail/" as the user's home directory. You'll need to have a proper per-user directory as their home. For example have the user_query return '/home/virtual/%u' as home. See http://wiki.dovecot.org/VirtualUsers#homedirs
Ok, I'm beginning to grasp this. However, my understanding is still incomplete somehow. The changes I've made thus far are:
- now, all virtual users have a "home" directory in /virtusers/%u
- home field in the PostgreSQL database says, /virtusers/<userid>
The errors as before are no longer being shown. However, as I stated before, I have sendmail configured with aliases to "map" a virtual users, such as jdunkin, to the system user vmail. This user is getting all the mail for the aliases (virtual user accounts). How do I get the mail to each virtual user?
Also setting auth_debug=yes and mail_debug=yes may be helpful when figuring out why things don't work right.
Thank you for the help with this. I didn't know about the debug things.
Andy
On Sat, 29 Dec 2007, Andrew Falanga wrote:
On Saturday 29 December 2007 14:20:47 Timo Sirainen wrote:
On Sat, 2007-12-29 at 14:00 -0700, Andrew Falanga wrote:
mail_location: mbox:~/mail/:INBOX=/var/mail/%u
..
userdb: driver: sql args: /usr/local/etc/dovecot-sql.conf
..
Dec 29 15:01:54 whitbap dovecot: POP3(jdunkin): mkdir_parents(/var/mail/vmail//mail) failed: Not a directory
Your SQL lookup returns "/var/mail/vmail/" as the user's home directory. You'll need to have a proper per-user directory as their home. For example have the user_query return '/home/virtual/%u' as home. See http://wiki.dovecot.org/VirtualUsers#homedirs
Ok, I'm beginning to grasp this. However, my understanding is still incomplete somehow. The changes I've made thus far are:
- now, all virtual users have a "home" directory in /virtusers/%u
- home field in the PostgreSQL database says, /virtusers/<userid>
The errors as before are no longer being shown. However, as I stated before, I have sendmail configured with aliases to "map" a virtual users, such as jdunkin, to the system user vmail. This user is getting all the mail for the aliases (virtual user accounts). How do I get the mail to each virtual user?
Sounds like you would like to call e.g. Dovecot Deliver from sendmail *based on the incoming username* instead of simply dropping the emails into "vbox".
-- Asheesh.
-- Somebody's terminal is dropping bits. I found a pile of them over in the corner.
The errors as before are no longer being shown. However, as I stated before, I have sendmail configured with aliases to "map" a virtual users, such as jdunkin, to the system user vmail. This user is getting all the mail for the aliases (virtual user accounts). How do I get the mail to each virtual user?
Sounds like you would like to call e.g. Dovecot Deliver from sendmail *based on the incoming username* instead of simply dropping the emails into "vbox".
-- Asheesh.
Can you provide documentation for what you're talking about?
Andy
participants (3)
-
Andrew Falanga
-
Asheesh Laroia
-
Timo Sirainen