Re: [Dovecot] doveadm-expunge debug message clarifications
On Tue, 2010-09-21 at 15:09 +0200, LEVAI Daniel wrote: [...]
doveadm(root): Debug: expire: Searching only users listed in expire database [...] logging that. I fixed in hg so that it now instead logs: expire: Iterating only a single user, ignoring expire database Great!
If I don't specify a user with '-u', then nothing gets expunged, so it doesn't get the list of users from the expire database. If you don't use -u or -A then it tries to access the current system user's mails. Aha!
doveadm(<user>): Error: net_connect_unix(/var/dovecot//dict) failed: Permission denied I improved this error message now in hg to show what user doesn't have access. Great!
# ls -la /var/dovecot/dict srw------- 1 root wheel 0 Sep 21 09:47:00 2010 /var/dovecot/dict= .. What is trying to use that socket when I'm expunging mails? Am I supposed to grant my internal_user some privileges to that socket? While I got that error message, the expunge has succeeded. doveadm tries to access the expire database via the dict socket. You didn't really give enough information about what user you're running doveadm as or if you're using system or virtual users or.. Sorry. I'm running that doveadm command as root, with the -u <user> parameter, where <user> is a virtual user. Anyway, I've just read the wiki2 again, and noted that I don't really need the expire plugin, because it is only needed for the -A option. If I specify the -u parameter, it doesn't utilize the plugin. So I'm now using only the doveadm expunge -u ... command, which now gives me this output:
# /usr/local/bin/doveadm -D expunge -u <user> mailbox sa.* SAVEDBEFORE 1d doveadm(root): Debug: Loading modules from directory: /usr/local/lib/dovecot doveadm(root): Debug: Module loaded: /usr/local/lib/dovecot/lib10_quota_plugin.so doveadm(root): Debug: Loading modules from directory: /usr/local/lib/dovecot/doveadm doveadm(root): Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: Cannot load specified object ^^^ I'm curious about this error message. Is it safe to ignore this? doveadm(root): Debug: Module loaded: /usr/local/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so doveadm(<user>): Debug: expunge: box=sa.spam uid=6435 doveadm(<user>): Debug: expunge: box=sa.spam uid=6436 doveadm(<user>): Debug: expunge: box=sa.spam uid=6437 doveadm(<user>): Debug: expunge: box=sa.spam uid=6438
The only thing I've changed in the config is that I've removed the expire plugin from the $mail_plugins variable.
Thanks, Daniel
-- LÉVAI Dániel PGP key ID = 0x83B63A8F Key fingerprint = DBEC C66B A47A DFA2 792D 650C C69B BE4C 83B6 3A8F
On Fri, 2010-09-24 at 22:42 +0200, LEVAI Daniel wrote:
doveadm tries to access the expire database via the dict socket. You didn't really give enough information about what user you're running doveadm as or if you're using system or virtual users or.. Sorry. I'm running that doveadm command as root, with the -u <user> parameter, where <user> is a virtual user.
The dict socket is opened only after root privileges are dropped, so its permissions should have been the same as what the dropped privileges are (i.e. accessible for the user that the imap processes are typically running as).
doveadm(root): Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: Cannot load specified object ^^^ I'm curious about this error message. Is it safe to ignore this?
I changed this now to:
Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: Cannot load specified object (this is usually intentional, so just ignore this message)
doveadm(<user>): Debug: expunge: box=sa.spam uid=6435 doveadm(<user>): Debug: expunge: box=sa.spam uid=6436 doveadm(<user>): Debug: expunge: box=sa.spam uid=6437 doveadm(<user>): Debug: expunge: box=sa.spam uid=6438
It expunged these messages. So, everything is working I guess?
On Fri, Sep 24, 2010 at 22:33:25 +0100, Timo Sirainen wrote: [...]
The dict socket is opened only after root privileges are dropped, so its permissions should have been the same as what the dropped privileges are (i.e. accessible for the user that the imap processes are typically running as). I see.
doveadm(root): Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: Cannot load specified object ^^^ I'm curious about this error message. Is it safe to ignore this? I changed this now to: Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: Cannot load specified object (this is usually intentional, so just ignore this message) Great, thanks!
It expunged these messages. So, everything is working I guess? Yes, it is working as expected.
Thanks again, Daniel
-- LÉVAI Dániel PGP key ID = 0x83B63A8F Key fingerprint = DBEC C66B A47A DFA2 792D 650C C69B BE4C 83B6 3A8F
participants (2)
-
LEVAI Daniel
-
Timo Sirainen