Bug 145214

Summary: dovecot-0.99.13-2.FC3 breaks INBOX
Product: [Fedora] Fedora Reporter: shrek-m <shrek-m>
Component: dovecotAssignee: John Dennis <jdennis>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: mattdm, steve30401, tss, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-02-15 23:27:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 143707    
Bug Blocks:    

Description shrek-m 2005-01-15 14:14:52 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20041020

Description of problem:
FC3 update from  dovecot-0.99.11-1.FC3.4  cd#3
to  dovecot-0.99.13-2.FC3.i386.rpm
breaks INBOX

before the update all was ok.
update to the new package and afair i could see a new folder "sentmail"
delete it with squirrelmail,
no more access to INBOX in squirrelmail, mozilla, ...

remark:
i can not remember that it is possible to delete a folder with "linux:
mozilla, thunderbird; windows: outlook express, ..."

-- /var/log/maillog --
Jan 15 14:24:39 xp1800 imap(test): file_lock_dotlock() failed with
mbox file /var/mail/test: Permission denied
--/--

`$ mail` had access to /var/mail/test  without problems

downgrade solved all the problems

Version-Release number of selected component (if applicable):
dovecot-0.99.13-2.FC3

How reproducible:
Sometimes

Steps to Reproduce:
1. update to 0.99.13-2.FC3
2. delete new "sentmail"-folder
3. logout, login
    

Actual Results:  no acces to INBOX with mozilla, squirrelmail, ...

Additional info:
downgrade solved all the problems

Comment 1 Stephen Sentoff 2005-01-15 14:29:12 UTC
I had the same problem.  Temporary work-around is to set the
permission on /var/mail to 777 -- apparently dovecot is trying to
create the lock files as the user, rather than as "mail".

Comment 2 Nigel Smith 2005-01-15 15:03:05 UTC
Fixed by adding mail_extra_groups = mail to /etc/dovecot.conf

Comment 3 Nigel Smith 2005-01-15 15:13:21 UTC
Sorry, forgot to add the link to the Dovecot wiki:

http://wiki.dovecot.org/VarMailDotLock


Comment 4 shrek-m 2005-01-15 17:11:04 UTC
today is 1/15/05

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=143707#c12
<snip>
The following two RPM's have been prepared for release in the update
channel. I was going to push them out today (Friday) but I think I'll
wait till Monday in case someone wants to try them out early as a test
over the weekend. They've had some testing, no problems so far, but
more testing before the push to the wide community is always better.
If you do test before Monday 1/17/05 just add a quick note to this
bugzilla with your results. Thanks!
This is for FC2:
ftp://people.redhat.com/jdennis/dovecot-0.99.13-3.FC2.i386.rpm
This is for FC3:
ftp://people.redhat.com/jdennis/dovecot-0.99.13-2.FC3.i386.rpm
</snip>

as a regular update i expect that dovecot works after the update
without changing the config-file, or it should create a
/etc/dovecot.conf.rpmnew

my personal opinion:
fedora-updates are getting more and more fedora-updates-tesing

bye redhat
bye fedora
hello mandrake, suse, debian

Comment 5 Warren Togami 2005-01-15 23:24:52 UTC
That is an awfully negative and unnecessarily unproductive attitude.  I am
attempting to solve this issue before the update because it is technically the
right thing to do.  Also looking at Bug 145241 dependency creep that is not
exactly good, but much less of a problem than this. 

Comment 6 Warren Togami 2005-01-16 04:13:29 UTC
Timo, is this behavior the result of an upstream change between
dovecot-0.99.10.4 and the current latest -0.99.X?  Would you agree
that adding "mail_extra_groups = mail" to dovecot.conf is the proper
way of fixing this?

Comment 7 Warren Togami 2005-01-16 04:51:37 UTC
fedora-list made me realize that our default dovecot.conf changed from
fcntl to dotlock sometime after the release of FC2.  That is one of
the reasons why we see this problem now.  This problem must now be
attacked on two fronts:

1) Our default dovecot.conf must be changed to use fcntl by default
again.  If someone uses a broken NFS where fcntl doesn't work, then it
is up them to edit their configuration to use dotlocks.  If users have
not modified dovecot.conf, then upgrading to the new package will set
fcntl default.

2) For exisiting users who have modified dovecot.conf, it would be
dangerous to force a change to fcntl during %post.  Then
"mail_extra_groups = mail" is the correct line to add during %post.

Any objections?

Comment 8 shrek-m 2005-01-16 10:54:22 UTC
----
# grep "mbox_locks\|mail_extra" /etc/dovecot.conf

#mail_extra_groups =    /*orig-conf
####mail_extra_groups = mail    /*own
#mbox_locks = dotlock fcntl    /*orig-conf
mbox_locks = fcntl
--/--

this seems here to be the best solution for a clean fc3 with the
original dovecot.conf
simple add  "mbox_locks = fcntl"


with "mail_extra_groups = mail" squirrelmail is extremely slow and you
can not login with different imap_clients.

-- var/log/maillog --
Jan 16 10:53:42 xp1800 imap(admin): Error rewriting mbox file
/var/mail/test: Unexpected end of file

Comment 9 shrek-m 2005-01-16 20:43:42 UTC
if you get this error

-- var/log/maillog --
Jan 16 10:53:42 xp1800 imap(admin): Error rewriting mbox file
/var/mail/test: Unexpected end of file
--/-- 

you could try to clean your inbox with moving your mails into an
temp-folder:
50 displayed mails (inbox) ==> 100 displayed mails (temp)

somehow each message got doubled playing with mozilla, squirrelmail,
update, downgrade, ... and the error occured.

move your mails back into inbox and all should be ok, at least here.

Comment 10 shrek-m 2005-01-16 21:15:19 UTC
this bug seems here to occur because i had not modified my original
dovecot.conf from  dovecot-0.99.11-1.FC3.4.i386.rpm (fc3 clean install)

with a simple modification like
----
# head -2 /etc/dovecot.conf
## Dovecot 1.0 configuration file
# TestAenderung
--/--
i could update without problems to dovecot-0.99.13-2.FC3

Comment 11 John Dennis 2005-01-17 17:44:12 UTC
The dovecot-0.99.13-2.FC3 rpm should have created a
/etc/dovecot.conf.rpmnew file.

The change in the dotlocking behavior was appeared only in the
dovecot.conf file which should have been preserved on your system
(thus only in the .rpmnew version). In theory there would have had to
have been manual intervention after the update to have been affected
by this.

A solution to the dotlock permissions problem was documented in
/usr/share/doc/dovecot-*/REDHAT-FAQ.txt.

I have prepared a new rpm in which the suggested config file once
again overrides dovecot's default locking to only use fcntl. As per
the previousl rpm the change should only be visible in
/etc/dovecot.conf.rpmnew requiring manual intervention.

Also the rpms in question were tested, both by myself and several
other sites. My appology for the unanticipated problem you experienced.

Comment 12 Matthew Miller 2005-01-17 17:50:53 UTC
John -- comment #10 is correct. Check the RPM documentation. A .rpmnew
file is *only* created if you have not modified the original file.


Comment 13 John Dennis 2005-01-17 20:44:26 UTC
Here are a couple of new rpms you can grab now (feedback appreciated)

This is a new rpm for FC2, it removes the building of mysql and
postgres support, it also resets the config file to force mbox_locks
to fcntl only (previous behavior).

ftp://people.redhat.com/jdennis/dovecot-0.99.13-4.FC2.i386.rpm

This is a new rpm for FC3, it continues to build mysql and postgres
support but only has dependencies on the client libraries (previous
behavior), it also resets the config file to force mbox_locks to fcntl
only (previous behavior).

ftp://people.redhat.com/jdennis/dovecot-0.99.13-3.FC3.i386.rpm



Comment 14 shrek-m 2005-01-17 22:53:18 UTC
dovecot-0.99.13-3.FC3
here is all ok,  thanks.