doveadm search -A tries to create mailboxes
Bill Shirley
bill at KnoxvilleChristian.org
Thu Jan 7 02:11:57 UTC 2016
On 1/6/2016 3:29 PM, Timo Sirainen wrote:
> On 05 Jan 2016, at 15:36, Bill Shirley <Bill at knoxvillechristian.org> wrote:
>>
>> [0:root at elmo ~]$ rpm -q dovecot
>> dovecot-2.2.18-2.fc22.x86_64
>>
>> I got a surprise today when I tried the doveadm search function from:
>> http://wiki2.dovecot.org/Plugins/Expire
>>
>> [0:root at elmo ~]$ doveadm search -A mailbox Trash savedbefore 30d
>> doveadm(clamscan): Error: User initialization failed: Namespace '': mkdir(//Maildir) failed: Permission denied (euid=982(clamscan) egid=289(clamscan) missing +w perm: /, dir owned by 0:0 mode=0555)
>> doveadm(clamscan): Error: User init failed
>> doveadm(nm-openconnect): Error: User initialization failed: Namespace '': mkdir(//Maildir) failed: Permission denied (euid=986(nm-openconnect) egid=293(nm-openconnect) missing +w perm: /, dir owned by 0:0 mode=0555)
>> doveadm(nm-openconnect): Error: User init failed
>> doveadm(openvpn): Error: User initialization failed: Namespace '': mkdir(/etc/openvpn/Maildir) failed: Permission denied (euid=987(openvpn) egid=296(openvpn) missing +w perm: /etc/openvpn, dir owned by 0:0 mode=0755)
>> doveadm(openvpn): Error: User init failed
>> .. plus several more
>>
>> I wouldn't think the search function (or any operation) would try to create mailboxes. These are system user ids
>> that don't have or need mailboxes.
>>
>> Is this correct?
>
> It's intentional and difficult to change. If you're using system users, you can restrict the list of users that apply to -A. I think just setting first_valid_uid high enough to not match system users' UIDs will solve it.
>
Yes, I'll probably change my first_valid_uid to a higher number. Currently vmail is 399 since I've been running Linux for ages.
Thankfully there is 'find'. Gotta change the MySQL table too.
I really do appreciate Dovecot and all the work that goes into it. That being said, I don't think 'search' should create any
files or directories. I just wanted to see how much trash is on the system. If you wanted to check 'CorpNews' which a few
users have, after running 'search' now everyone has it.
The man page doesn't mention that 'search' updates anything.
I provide this feedback because Dovecot is great software and want it to continue to be.
BTW, now I have:
/var/cache/akmods/Maildir/.Trash
/var/cache/akmods/Maildir/.Trash/cur
/var/cache/akmods/Maildir/.Trash/dovecot-uidlist
/var/cache/akmods/Maildir/.Trash/dovecot.index.log
/var/cache/akmods/Maildir/.Trash/maildirfolder
/var/cache/akmods/Maildir/.Trash/new
/var/cache/akmods/Maildir/.Trash/tmp
/var/lib/chrony/Maildir/.Trash
/var/lib/chrony/Maildir/.Trash/cur
/var/lib/chrony/Maildir/.Trash/dovecot-uidlist
/var/lib/chrony/Maildir/.Trash/dovecot.index.log
/var/lib/chrony/Maildir/.Trash/maildirfolder
/var/lib/chrony/Maildir/.Trash/new
/var/lib/chrony/Maildir/.Trash/tmp
/var/lib/clamav/Maildir/.Trash
/var/lib/clamav/Maildir/.Trash/cur
/var/lib/clamav/Maildir/.Trash/dovecot-uidlist
/var/lib/clamav/Maildir/.Trash/dovecot.index.log
/var/lib/clamav/Maildir/.Trash/maildirfolder
/var/lib/clamav/Maildir/.Trash/new
/var/lib/clamav/Maildir/.Trash/tmp
/var/lib/colord/Maildir/.Trash
/var/lib/colord/Maildir/.Trash/cur
/var/lib/colord/Maildir/.Trash/dovecot-uidlist
/var/lib/colord/Maildir/.Trash/dovecot.index.log
/var/lib/colord/Maildir/.Trash/maildirfolder
/var/lib/colord/Maildir/.Trash/new
/var/lib/colord/Maildir/.Trash/tmp
/var/lib/geoclue/Maildir/.Trash
/var/lib/geoclue/Maildir/.Trash/cur
/var/lib/geoclue/Maildir/.Trash/dovecot-uidlist
/var/lib/geoclue/Maildir/.Trash/dovecot.index.log
/var/lib/geoclue/Maildir/.Trash/maildirfolder
/var/lib/geoclue/Maildir/.Trash/new
/var/lib/geoclue/Maildir/.Trash/tmp
/var/lib/sddm/Maildir/.Trash
/var/lib/sddm/Maildir/.Trash/cur
/var/lib/sddm/Maildir/.Trash/dovecot-uidlist
/var/lib/sddm/Maildir/.Trash/dovecot.index.log
/var/lib/sddm/Maildir/.Trash/maildirfolder
/var/lib/sddm/Maildir/.Trash/new
/var/lib/sddm/Maildir/.Trash/tmp
/var/lib/setroubleshoot/Maildir/.Trash
/var/lib/setroubleshoot/Maildir/.Trash/cur
/var/lib/setroubleshoot/Maildir/.Trash/dovecot-uidlist
/var/lib/setroubleshoot/Maildir/.Trash/dovecot.index.log
/var/lib/setroubleshoot/Maildir/.Trash/maildirfolder
/var/lib/setroubleshoot/Maildir/.Trash/new
/var/lib/setroubleshoot/Maildir/.Trash/tmp
Thankfully there is 'rm -rf <dir>'.
Again, many thanks,
Bill
More information about the dovecot
mailing list