LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-05-2011, 04:05 AM   #1
ponganthony
LQ Newbie
 
Registered: Oct 2007
Location: Hong Kong
Posts: 21

Rep: Reputation: 0
Dovecot pop3 Server, cannot chown, mkdir and open /INBOX


Dear All,

I have installed a new Dovecot 2.0.11 that comes with Fedora 14.
(I used to run Dovecot 1.2.9 of Fedora 12 that does not have this problem.)

I configure the Dovecot as followings:

disable_plaintext_auth = no
# Accept plain text authentication

mail_location = mbox:~/mail:INBOX=/var/mail/%u
# mbox at /home/someUser/mail
# INBOX at /var/mail/someUser


I then telnet localhost 110.

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot ready.
user someUser
+OK
pass secret
-ERR [IN-USE] Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2011-05-05 16:40:29]
Connection closed by foreign host.


From the /var/log/maillog file, I got this log.

......
May 5 14:30:48 server5 dovecot: pop3-login: Login: user=<someUser>, method=PLAIN, rip=192.168.1.42, lip=192.168.1.7, mpid=12667
May 5 14:30:48 server5 dovecot: pop3(someUser): Error: chown(/home/someUser/mail/.imap/INBOX, -1, 12(mail)) failed: Operation not permitted (egid=501(someUser), group based on /var/mail/someUser)
May 5 14:30:48 server5 dovecot: pop3(someUser): Error: mkdir(/home/someUser/mail/.imap/INBOX) failed: Operation not permitted
May 5 14:30:48 server5 dovecot: pop3(someUser): Error: Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2011-05-05 14:30:48]
May 5 14:30:48 server5 dovecot: pop3(someUser): Couldn't open INBOX top=0/0, retr=0/0, del=0/0, size=0


I went to /home/someUser/mail and see some directories added:
/home/someUser/mail
/home/someUser/mail/.imap


From the log file above, the errors are:
Error: chown(/home/someUser/mail/.imap/INBOX, -1, 12(mail))
Error: mkdir(/home/someUser/mail/.imap/INBOX)
Error: Couldn't open INBOX

My questions are:
If /mail and /.imap directories can be made, why can't it make the INBOX directory and hence the INBOX (Operation not permitted)?
Is it a file/directory permission problem?
Is it a user problem?
Is it a Dovecot configuration problem?

Please help.
Regards,
Anthony Pong
 
Old 05-05-2011, 04:16 AM   #2
centos123
Member
 
Registered: Apr 2011
Posts: 397

Rep: Reputation: 16
are you 'root' user.if not then try again as root.not form someuser
and in dovecot.conf uncomment protocol =pop3,imap....
 
Old 05-05-2011, 04:34 AM   #3
ponganthony
LQ Newbie
 
Registered: Oct 2007
Location: Hong Kong
Posts: 21

Original Poster
Rep: Reputation: 0
Dovecot pop3 Server, cannot chown, mkdir and open /INBOX

Dear Centos123 and All,

I made all the configurations as root user.
I made the telnet session as someUser (I have also tried root, but it doesn't help).
Dovecot is a service in /etc/init.d/rc.d/dovecot, I don't know what user it is running. (mail, dovecot, root, someUser; I have no idea.)

Yes, I have already specified the protocol in /cet/dovecot/dovecot.conf:
protocols = pop3 imap

Still not solving the problem yet.

Thanks for your reply.
Regards,
Anthony Pong
 
Old 05-20-2011, 07:46 AM   #4
ponganthony
LQ Newbie
 
Registered: Oct 2007
Location: Hong Kong
Posts: 21

Original Poster
Rep: Reputation: 0
Dear All,

After 2 weeks, I have found this in the Dovecot Mailing List that solved the problem.

http://dovecot.markmail.org/message/...ackward&page=1

This is part of the reply from Joseph Tam:

I was going to write about the same problem. This got me over the hump:

chmod 0600 /var/spool/mail/*

All my user's mailboxes used to be group=mail mode=0660. I think these settings were left over from Solaris' mail.local: I can't reproduce these permissions now, even for new mailboxes. Maybe it's because the spool directory is now mode=1777 (not g+s mail). Not too keen on these permissions either, but it seems to work.

Dovecot seems to transfer group permissions of the mailbox to its corresponding cache. If it can't set group ownership, you get the fatal error message above. If the original mailbox is mode 0600, dovecot is smart enough not to set group ownership.

I couldn't find this information: shouldn't it be documented here?


Thanks for the help from all.
Regards,
Anthony Pong
 
Old 05-20-2011, 02:57 PM   #5
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Rep: Reputation: 23
One note with adding/removing users, it will leave files behind in imap, and the only way to re-add the user is to:

chown -R user:root (users index) if I remember correctly (down in the indexes)...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up POP3 and SMTP server on Dovecot and Postfix over local area network ngkangjin Linux - Server 5 10-02-2010 05:41 AM
Dovecot, postfix pop3/imap server issue konduktorn Linux - Server 3 02-19-2010 04:41 PM
Dovecot download pop3/imap from other server(s) alitrix Linux - Software 3 05-23-2008 07:49 PM
LXer: Set up a secure IMAP/POP3 server with Dovecot LXer Syndicated Linux News 0 04-06-2006 07:33 PM
pop3 inbox messages deleted from server malaka56 Linux - Software 2 08-11-2005 06:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration