[Dovecot] Integrating dovecot 1.01 into CentOS-3.8 systemw with chroot passwd dirs?
Gary Goldberg
og at digimark.net
Fri Jul 13 18:06:52 EEST 2007
I dug deep into the documentation and I think I understand what's happening, but
I have no idea what to do about it. I also took a moment and moved the user
INBOX files back from /home/mail to /var/mail, so that wouldn't confuse anything.
(My mail_location is set to mail_location: mbox:~/mail:INBOX=/var/mail/%u )
I have two types of users on my system -- those with home directories (set in
/etc/passwd) of the form
/home/group/pop/user
who are allowed to access the file system, and
/home/group/./pop/user
who are chrooted to their home directories for things like ftp.
dovecot appears to be working fine with those users without /./ in their
password directory fields.
When dovecot gets the user home directory field from PAM, if it sees the /./,
it chroots them so that their home directory is /pop/user, and their mail
subdirectory is /pop/user/mail.
But I can't see how dovecot would then access their INBOX, which is located
outside the chroot in /var/mail/%u.
For example:
dovecot: Jul 13 10:59:13 Info: pop3-login: Login: user=<lda07>, method=PLAIN, rip=70.21.123.223, lip=64.191.213.14
dovecot: Jul 13 10:59:13 Info: POP3(lda07): Effective uid=10578, gid=510
dovecot: Jul 13 10:59:13 Info: POP3(lda07): mbox: data=/pop/lda07/mail:INBOX=/var/mail/lda07
dovecot: Jul 13 10:59:13 Info: POP3(lda07): mbox: root=/pop/lda07/mail, index=/pop/lda07/mail, inbox=/var/mail/lda07
dovecot: Jul 13 10:59:13 Error: POP3(lda07): open(/var/mail/lda07, O_CREAT) failed: No such file or directory
dovecot: Jul 13 10:59:13 Error: POP3(lda07): access() failed with mbox file /var/mail/lda07: No such file or directory
dovecot: Jul 13 10:59:13 Error: POP3(lda07): stat() failed with mbox file /var/mail/lda07: No such file or directory
dovecot: Jul 13 10:59:13 Error: POP3(lda07): Couldn't init INBOX: Internal error occurred. Refer to server log for more information. [2007-07-13 10:59:13]
dovecot: Jul 13 10:59:13 Info: POP3(lda07): Mailbox init failed top=0/0, retr=0/0, del=0/0, size=0
Any thoughts? Thanks. -Gary
--
-- "Outside of a dog, a book is a man's best friend.
-- Inside of a dog, it is too dark to read." -- Groucho Marx.
Gary Goldberg KA3ZYW <og at digimark.net> V:301/249-6501 F:301/390-1955 AIM:OgGreeb
Digital Marketing/Bowie MD/Systems & Networks Consult <http://www.digimark.net/>
On Fri, 13 Jul 2007, Timo Sirainen wrote:
> On 13.7.2007, at 3.57, Gary Goldberg wrote:
>
>>>> mail_location: mbox:~/mail:INBOX=/home/mail/%u
>>>
>>> Change this to:
>>> mail_location: mbox:~/mail:INBOX=~/%u
>>> Does it work then?
>>
>> Wouldn't that parse to $HOME/$USER for each inbox? Currently
>> sendmail/procmail
>> delivers mail to /var/mail, which is symlinked to /home/mail in my system.
>
> Yes, but $HOME expands to / since you have the chroot.
>
More information about the dovecot
mailing list