[Dovecot] delivering mail to public mbox with permission 660?
    RParr 
    RParr at TemporalArts.COM
       
    Tue Oct 26 03:33:30 EEST 2010
    
    
  
On 10/25/2010 08:22 AM, Timo Sirainen wrote:
> On Fri, 2010-10-22 at 17:14 -0700, RParr wrote:
>    
>>>> My understanding, from the Dovecot wiki and other docs/postings is that
>>>> the folders should be 660 given the /var/mail permssions of rwxrwsrwt
>>>> and ~/mail permssions of rwxrws---
>>>>
>>>>          
>>> Yep. Looks like it's broken in v1.2 for mbox. It works in v2.0 though. I
>>> could maybe write a patch for v1.2, but you'd need to compile Dovecot
>>> anyway.
>>>
>>>        
>> A patch would be much appreciated.
>>      
> http://hg.dovecot.org/dovecot-1.2/rev/45769d0cc39c
>    
Thanks.  Works like a charm.
I include the following for others who might want to apply this patch to 
their Ubuntu/Debian systems.
--------------------------------
# likely already done but include for completeness
apt-get install build-essential devscripts
cd /d/linux/dovecot
# or where ever you stash such things
apt-get build-dep dovecot
# installed a bunch of dev libs/pkgs.
apt-get source dovecot
cd dovecot-1.2.9/
cp src/lib-storage/index/mbox/mbox-storage.c  
src/lib-storage/index/mbox/mbox.storage.c.orig
vi src/lib-storage/index/mbox/mbox-storage.c
# change mbox-storage.c per 
http://hg.dovecot.org/dovecot-1.2/rev/45769d0cc39c#l1.25
dch -v 1:1.2.9-1ubuntu6.1ta "mbox: Creating new mailboxes should base 
permissions on mail root dir, not always use 0600"
# this sets the version to 1:1.2.9-1ubuntu6.1ta and adds and entry in 
the changelog.
# did this so apt/synaptic would see our version as newer then existing.
debuild -us -uc
# can use dpkg-buildpackage command-line options
# -us -uc means do not sign source package or .changes file.
cd /d/linux/dovecot
# now contains a set of dovecot debs
I then moved the debs to our local repository, updated the repository 
index, and installed using synaptic.
OR
# assuming /d/linux/dovecot contains only the newly generated debs, 
install the packages using dpkg
dpkg -i *.deb
    
    
More information about the dovecot
mailing list