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.

diff -r 0908326bf4b9 src/doveadm/doveadm-mail-iter.c
--- a/src/doveadm/doveadm-mail-iter.c	Mon Oct 18 19:00:59 2010 +0100
+++ b/src/doveadm/doveadm-mail-iter.c	Tue Oct 19 13:44:59 2010 +0100
@@ -66,6 +66,8 @@
 			mail_storage_get_last_error(iter->storage, NULL));
 		ret = -1;
 	}
+	if (ret == 0)
+		i_debug("commit successful");
 	mail_search_args_deinit(iter->search_args);
 	return ret;
 }

Reply via email to