Re: [Dovecot] LMTP & home, chroot, mail userdb fields.
On Fri, 2011-01-21 at 14:03 +0300, Lev Serebryakov wrote: > Jan 21 14:01:36 lmtp(17650, l...@domain.com): Error: (LEV-ADDITION) Replace > home (/) with chroot (/usr/home/hosted/v-mail/domain.com/lev) > Jan 21 14:01:36 lmtp(17650, l...@domain.com): Error: (LEV-ADDITION) Set > mail_home to (/usr/home/hosted/v-mail/domain.com/lev) > Jan 21 14:01:36 lmtp(17650, l...@domain.com): Error: mkdir(./cur) in > directory /var/run/dovecot failed: Permission denied (euid=3(v-mail) > egid=3(v-mail) missing +w perm: ., euid is not dir owner) Well, I'm not entirely sure why, since it works with me.. But setting "mail=maildir:~/" rather than "mail=maildir:." probably fixes this. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] LMTP & home, chroot, mail userdb fields.
Hello, Timo. You wrote 21 января 2011 г., 0:10:12: > On Thu, 2011-01-20 at 15:21 +0300, Lev Serebryakov wrote: >> Jan 20 12:19:25 lmtp(38939, l...@domain.com): Error: mkdir(./cur) in >> directory /var/run/dovecot failed: Permission denied (euid=3(v-mail) >> egid=3(v-mail) missing +w perm: ., euid is not dir owner) > Fixed: http://hg.dovecot.org/dovecot-2.0/rev/0fc2d00f83df Sorry, it doesn't. I've added some logging via i_error() (I know, it looks more like i_debug()) and now log shows me: Jan 21 14:01:36 lmtp(17650, l...@domain.com): Error: (LEV-ADDITION) Replace home (/) with chroot (/usr/home/hosted/v-mail/domain.com/lev) Jan 21 14:01:36 lmtp(17650, l...@domain.com): Error: (LEV-ADDITION) Set mail_home to (/usr/home/hosted/v-mail/domain.com/lev) Jan 21 14:01:36 lmtp(17650, l...@domain.com): Error: mkdir(./cur) in directory /var/run/dovecot failed: Permission denied (euid=3(v-mail) egid=3(v-mail) missing +w perm: ., euid is not dir owner) Jan 21 14:01:36 lmtp(17650, l...@domain.com): Error: Opening INBOX failed: Mailbox doesn't exist: INBOX Jan 21 14:01:36 lmtp(17650, l...@domain.com): Error: mkdir(./cur) in directory /var/run/dovecot failed: Permission denied (euid=3(v-mail) egid=3(v-mail) missing +w perm: ., euid is not dir owner) Jan 21 14:01:36 lmtp(17650, l...@domain.com): Info: gJIWCJBnOU3yRAAAWL5c8Q: msgid=unspecified: save failed to INBOX: Internal error occurred. Refer to server log for more information. [2011-01-21 14:01:36] Jan 21 14:01:36 lmtp(17650, l...@domain.com): Error: BUG: Saving failed to unknown storage Jan 21 14:01:36 lmtp(17650): Info: Disconnect from local: Client quit -- // Black Lion AKA Lev Serebryakov
Re: [Dovecot] LMTP & home, chroot, mail userdb fields.
On Thu, 2011-01-20 at 15:21 +0300, Lev Serebryakov wrote: > Jan 20 12:19:25 lmtp(38939, l...@domain.com): Error: mkdir(./cur) in > directory /var/run/dovecot failed: Permission denied (euid=3(v-mail) > egid=3(v-mail) missing +w perm: ., euid is not dir owner) Fixed: http://hg.dovecot.org/dovecot-2.0/rev/0fc2d00f83df signature.asc Description: This is a digitally signed message part
Re: [Dovecot] LMTP & home, chroot, mail userdb fields.
Lev Serebryakov wrote: > Hello, Per. > You wrote 20 января 2011 г., 21:28:11: > > chroot: "/usr/home/hosted/v-mail/%d/%n" > home: "/" > mail: "maildir:." >>> Then IMAP4/POP3 processes will do chroot to >>> "/usr/home/hosted/v-mail/domain/user" and will try to find >>> "maildir:/usr/home/hosted/v-mail/domain/user" RELATIVE to chroot. >>> Mail will be delivered, but can not be acessed. >> Okay, I see how you've set it up now. Any chance that lmtp is having >> problems with chroot()ing ? > > I don't think, that lmtp needs "real" chroot at all (it can degrade > performance and spoil whole idea of long-living delivery process), > but, IMHO, lmtp should calculate full path from all three components > -- chroot + home + maildir. And it seems, that lmtp doesn't use chroot > variable at all. Yes, that is what it looks like. /Per Jessen, Zürich
Re: [Dovecot] LMTP & home, chroot, mail userdb fields.
Hello, Per. You wrote 20 января 2011 г., 21:28:11: chroot: "/usr/home/hosted/v-mail/%d/%n" home: "/" mail: "maildir:." >> Then IMAP4/POP3 processes will do chroot to >> "/usr/home/hosted/v-mail/domain/user" and will try to find >> "maildir:/usr/home/hosted/v-mail/domain/user" RELATIVE to chroot. Mail >> will be delivered, but can not be acessed. > Okay, I see how you've set it up now. Any chance that lmtp is having > problems with chroot()ing ? I don't think, that lmtp needs "real" chroot at all (it can degrade performance and spoil whole idea of long-living delivery process), but, IMHO, lmtp should calculate full path from all three components -- chroot + home + maildir. And it seems, that lmtp doesn't use chroot variable at all. -- // Black Lion AKA Lev Serebryakov
Re: [Dovecot] LMTP & home, chroot, mail userdb fields.
Lev Serebryakov wrote: > Hello, Per. > You wrote 20 января 2011 г., 18:30:44: > >>> chroot: "/usr/home/hosted/v-mail/%d/%n" >>> home: "/" >>> mail: "maildir:." > >> For starters, I think you need to return a field "mail" containing >> perhaps: >> maildir:/usr/home/hosted/v-mail/domain/user > > Then IMAP4/POP3 processes will do chroot to > "/usr/home/hosted/v-mail/domain/user" and will try to find > "maildir:/usr/home/hosted/v-mail/domain/user" RELATIVE to chroot. Mail > will be delivered, but can not be acessed. > Okay, I see how you've set it up now. Any chance that lmtp is having problems with chroot()ing ? /Per Jessen, Zürich
Re: [Dovecot] LMTP & home, chroot, mail userdb fields.
Hello, Per. You wrote 20 января 2011 г., 18:30:44: >> chroot: "/usr/home/hosted/v-mail/%d/%n" >> home: "/" >> mail: "maildir:." > For starters, I think you need to return a field "mail" containing > perhaps: > maildir:/usr/home/hosted/v-mail/domain/user Then IMAP4/POP3 processes will do chroot to "/usr/home/hosted/v-mail/domain/user" and will try to find "maildir:/usr/home/hosted/v-mail/domain/user" RELATIVE to chroot. Mail will be delivered, but can not be acessed. -- // Black Lion AKA Lev Serebryakov
Re: [Dovecot] LMTP & home, chroot, mail userdb fields.
Lev Serebryakov wrote: > Hello, Dovecot. > > > I'm using postfix + dovecot with pure virtual users. postfix uses > standard virtual transport, and dovecot fetches such fields from > userdb: > > chroot: "/usr/home/hosted/v-mail/%d/%n" > home: "/" > mail: "maildir:." > > Everything works Ok -- dovecot founds users' mail. > > Now, after upgrade to dovecot2, I want to use it LMTP server as > virtual_transport in postifx. I've changed virtual_transport setting > to "lmtp:unix:/var/run/dovecot/lmtp". > > dovecot's LMTP can not deliver messages, because it seems that it > uses userdb fields in some OTHER way. Errors look like this: > > Jan 20 12:19:25 lmtp(38939): Info: Connect from local > Jan 20 12:19:25 auth: Info: mysql: Connected to /tmp/mysql.sock > (mailhost) Jan 20 12:19:25 lmtp(38939, l...@domain.com): Error: > mkdir(./cur) in directory /var/run/dovecot failed: Permission denied > (euid=3(v-mail) egid=3(v-mail) missing +w perm: ., euid is not > dir owner) That looks like dovecot is trying to create a mailbox (./cur) in the base directory (/var/run/dovecot) > How should I change my userdb output to make both POP/IMAP and LMTP > processes happy? For starters, I think you need to return a field "mail" containing perhaps: maildir:/usr/home/hosted/v-mail/domain/user /Per Jessen, Zürich