Hi!
I have some questions about doveadm-expunge's debug messages.
# /usr/local/bin/doveadm -Dv expunge -u <user> mailbox 'sa.*'
SAVEDBEFORE 6h
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: Module loaded:
/usr/local/lib/dovecot/lib20_expire_plugin.so
doveadm(root): Debug: Loading modules from directory:
/usr/local/lib/dovecot/doveadm
doveadm(root): Debug: Module loaded:
/usr/local/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so
doveadm(root): Debug: Module loaded:
/usr/local/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so
doveadm(root): Debug: expire: Searching only users listed in expire database
^^^^ That I don't understand.
Does this mean that I can only specify users with the '-u' parameter
from the list from the expire database, which is configured with:
dict {
expire = pgsql:/etc/dovecot/dovecot-sql.conf
}
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.
doveadm(<user>): Debug: expunge: box=sa.spam uid=6376
doveadm(<user>): Debug: expunge: box=sa.spam uid=6377
doveadm(<user>): Debug: expunge: box=sa.spam uid=6378
doveadm(<user>): Debug: expunge: box=sa.spam uid=6379
doveadm(<user>): Debug: expunge: box=sa.spam uid=6380
doveadm(<user>): Debug: expunge: box=sa.spam uid=6381
doveadm(<user>): Debug: expunge: box=sa.spam uid=6382
doveadm(<user>): Debug: expunge: box=sa.spam uid=6383
doveadm(<user>): Error: net_connect_unix(/var/dovecot//dict) failed:
Permission denied
# ls -la /var/dovecot/dict
srw------- 1 root wheel 0 Sep 21 09:47:00 2010 /var/dovecot/dict
service dict {
chroot =
client_limit = 1
drop_priv_before_exec = no
executable = dict
extra_groups =
group =
idle_kill = 0 s
privileged_group =
process_limit = 0
process_min_avail = 0
protocol =
service_count = 0
type =
unix_listener dict {
group =
mode = 0600
user =
}
user = $default_internal_user
vsz_limit = 4294967295
}
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.
Thanks,
Daniel
--
L?VAI D?niel
PGP key ID = 0x83B63A8F
Key fingerprint = DBEC C66B A47A DFA2 792D 650C C69B BE4C 83B6 3A8F
Timo Sirainen
2010-Sep-21 14:02 UTC
[Dovecot] doveadm-expunge debug message clarifications
On Tue, 2010-09-21 at 15:09 +0200, LEVAI Daniel wrote:> I have some questions about doveadm-expunge's debug messages. > > # /usr/local/bin/doveadm -Dv expunge -u <user> mailbox 'sa.*' SAVEDBEFORE 6h > doveadm(root): Debug: expire: Searching only users listed in expire database > ^^^^ That I don't understand. > Does this mean that I can only specify users with the '-u' parameter > from the list from the expire database, which is configured with:No. The expire plugin is just doing some unnecessary extra work here and logging that. I fixed in hg so that it now instead logs: expire: Iterating only a single user, ignoring expire database> 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.> doveadm(<user>): Error: net_connect_unix(/var/dovecot//dict) failed: Permission deniedI improved this error message now in hg to show what user doesn't have access.> # 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..
> 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 databaseGreat!> > 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