[Dovecot] Differences when expire plugin and cronjob?
Hello.
I would like to see the differnces between the expire plugin and a cronjob which make a find/delete. Is there performances differences? What's the best to use?
I use dovecot 1.1.8. Is expire plugin update the maildirsize and other indexes files?
Thanks.
Regards,
-- -Nicolas.
On Jan 28, 2009, at 12:01 PM, Nicolas Letellier wrote:
Hello.
I would like to see the differnces between the expire plugin and a
cronjob which make a find/delete. Is there performances differences? What's the best to use?
find will go through all mailboxes while expire goes through only
those mailboxes that actually have messages that need to be deleted.
I use dovecot 1.1.8. Is expire plugin update the maildirsize and
other indexes files?
Yes. And find/delete doesn't of course.
On Fri, 2009-01-30 at 09:21, Timo Sirainen wrote:
On Jan 28, 2009, at 12:01 PM, Nicolas Letellier wrote:
Hello.
I would like to see the differnces between the expire plugin and a
cronjob which make a find/delete. Is there performances differences? What's the best to use?find will go through all mailboxes while expire goes through only
those mailboxes that actually have messages that need to be deleted.
(I might have what OP is trying to do wrong as I didn't seem to see the original post)
We found it much easier to use a daily cron to clear out old crap
find /var/vmail/*/*/*/*/Maildir/{.Junk,.Trash}/ -name "*.mx*" -mtime +10 -print | /usr/bin/perl -nle 'unlink;'
(we noticed massive speed/resource improvement by piping to perl over using finds -exec rm ...)
I use dovecot 1.1.8. Is expire plugin update the maildirsize and
other indexes files?Yes. And find/delete doesn't of course.
But as it is safe to manually delete messages in directories should it not be updated the next time dovecot/deliver runs?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Fri, 30 Jan 2009, Noel Butler wrote:
We found it much easier to use a daily cron to clear out old crap
find /var/vmail/*/*/*/*/Maildir/{.Junk,.Trash}/ -name "*.mx*" -mtime +10 -print | /usr/bin/perl -nle 'unlink;'
Which won't work necessarily because of "command line exceeded" errors :)
If you have a GNU find, you could use "-delete" with find, or -print0 in combination with "xargs -r0 rm". This _should_ have even better performance.
Nevertheless, I'm quite happy with find myself.
Bye.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBSYK4zHWSIuGy1ktrAQKlUgf+O4hyNKrojkA4bPcoEXFSUeMDABgJVd9p b/W0RxrSx9mmiroDAsKz3PdhCgrH6Wgzcs1GsmJDKEXSp538pf5rII27X3ngiuJB YqbsCA2YOdLNMfWpedu3r2TngL+qglmC/g8vB9rub4o/TgnFtyIYGsMGiVlx2JSy V1gsQWI2Yd988sw+cVZEHmlekhancm0VHApBKKmCURLrS1dIlzRhROUF+wW1B0Ix TgBPbIkxqTSDPJwxG6dBFA+7e9IDudZy5IZmt8WZow+gC5OlZRyIV2IGlgjoPKBH 2g9ACbehnuM3JM561dIQ9nfLZMXJS9ggEEU32SlbOXc/ZWLH2MNkjQ== =UkPR -----END PGP SIGNATURE-----
On Fri, 2009-01-30 at 18:22, Steffen Kaiser wrote: You're not a singer are you, you resemble a well known one :)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Fri, 30 Jan 2009, Noel Butler wrote:
We found it much easier to use a daily cron to clear out old crap
find /var/vmail/*/*/*/*/Maildir/{.Junk,.Trash}/ -name "*.mx*" -mtime +10 -print | /usr/bin/perl -nle 'unlink;'
Which won't work necessarily because of "command line exceeded" errors :)
Seems to work OK for us, but most of our users are pop3 and very few 'leave on server' so i guess we're lucky.
Nevertheless, I'm quite happy with find myself.
On Fri, 2009-01-30 at 10:26 +1000, Noel Butler wrote:
I use dovecot 1.1.8. Is expire plugin update the maildirsize and
other indexes files?Yes. And find/delete doesn't of course.
But as it is safe to manually delete messages in directories should it not be updated the next time dovecot/deliver runs?
I suppose it usually does. Not necessarily in all situations, but those should be rare.
participants (4)
-
Nicolas Letellier
-
Noel Butler
-
Steffen Kaiser
-
Timo Sirainen