Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 85529 - uw-imap should be configured to use proper file locking
Summary: uw-imap should be configured to use proper file locking
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-16 10:30 UTC by Danek Duvall
Modified: 2005-05-22 12:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Danek Duvall 2005-03-16 10:30:23 UTC
After the fix for bug 74622, uw-imap complains that /var/spool/mail doesn't have 1777 perms.  Whether or not it's correct, the gentoo folks have decided that 0775 are the right perms for that directory.  uw-imap falls back to using flock, but that's not compatible with procmail's and mutt's primary use of dotlocking.

uw-imap should be configured to use its mlock program by default (see http://www.washington.edu/imap/IMAP-FAQs/index.html#7.10), but mlock is placed in /usr/bin, where imap doesn't look by default, and without the necessary setgid mail.  This should be fixed by making uw-imap look for /usr/bin/mlock (the FAQ says how), and then making that setgid mail.

Ideally, all programs which use a setgid mail dot-locking program should use the same one, if possible.  Pine and uw-imap deliver one, mutt delivers another.  But that's beyond the scope of this bug.
Comment 1 Fernando J. Pereda (RETIRED) gentoo-dev 2005-03-20 11:46:57 UTC
Try comment #8 from https://bugzilla.redhat.com/beta/show_bug.cgi?id=103479

Thats the workaround we are going to adopt.

Cheers,
Ferdy
Comment 2 Danek Duvall 2005-03-20 12:11:29 UTC
Why that workaround?  As a system distributor, you get to patch things so they work properly out of the box, without config files, which should generally only be used for overriding system-default (not program-default) behavior.

In addition, the locking mechanism used by all the mail programs gentoo supports needs to be coordinated, or the user may very well end up with coordinated mailboxes.  My system has postfix, pine, uw-imap, procmail, and mutt, which use fcntl, flock, flock, dotlock, and fcntl/dotlock, as best I can tell.  It's not a heavily used system, so I've gotten lucky so far, but it's a recipe for disaster on a heavier system.

Gentoo's mail programs all need to be configured to use the same locking mechanism(s), so that we don't end up with corrupt mailboxes.  Just eliminating warnings (even as bogus as they are) doesn't solve anything except slightly larger logs ....
Comment 3 Andrej Kacian (RETIRED) gentoo-dev 2005-03-29 12:59:00 UTC
Well, if you can provide _reliable_ patches for all relevant packages to use single filelocking mechanism, I see no problem with this.
Comment 4 Fernando J. Pereda (RETIRED) gentoo-dev 2005-05-22 12:46:27 UTC
Since mailbase doesn't enforce perms anymore, this is something I don't think
we'll fix. (unless said patches are sent).

Cheers,
Ferdy