Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-05-2011, 04:05 AM
|
#1
|
LQ Newbie
Registered: Oct 2007
Location: Hong Kong
Posts: 21
Rep:
|
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
|
|
|
05-05-2011, 04:16 AM
|
#2
|
Member
Registered: Apr 2011
Posts: 397
Rep:
|
are you 'root' user.if not then try again as root.not form someuser
and in dovecot.conf uncomment protocol =pop3,imap....
|
|
|
05-05-2011, 04:34 AM
|
#3
|
LQ Newbie
Registered: Oct 2007
Location: Hong Kong
Posts: 21
Original Poster
Rep:
|
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
|
|
|
05-20-2011, 07:46 AM
|
#4
|
LQ Newbie
Registered: Oct 2007
Location: Hong Kong
Posts: 21
Original Poster
Rep:
|
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
|
|
|
05-20-2011, 02:57 PM
|
#5
|
Member
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381
Rep:
|
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)...
|
|
|
All times are GMT -5. The time now is 01:09 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|