[Dovecot] doveadm-expunge not expunging when ran from cron

Timo Sirainen tss at iki.fi
Tue Oct 19 15:46:17 EEST 2010


On Tue, 2010-10-19 at 10:25 +0200, LEVAI Daniel wrote:

> for USERNAME in ${USERS};do
> 	/usr/local/bin/doveadm -Dv expunge -u "${USERNAME}" mailbox sa.* SAVEDBEFORE 1d

You should put sa.* around '' just in case there exists any filenames
matching sa.*

> ... does not expunge mails if ran from crontab. It shows in the Debug
> output what would have been done, but it doesn't really expunge those
> mails. This command runs daily, and every day the list of expunged mails
> (in the Debug output) just grows and grows, and the sa.* directories stay
> the same (except the new mails of course). However, if I run it from a
> terminal it really expunges the mails.

Weird. Does it log with attached patch that commit was successful?

> Is there something fishy going on in doveadm-expunge if it has no
> controlling terminal?

Nothing I can think of.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: text/x-patch
Size: 393 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20101019/a10e7761/attachment.bin 


More information about the dovecot mailing list