Re[2]: External mail attachments storage cleanup

Николай Мананков zedd at list.ru
Thu Jun 30 10:22:23 UTC 2016


Thank you very much for your help! My mail  users are stored in the SQL base,  therefore, using the fact that the my dovecot mailbox  folder names correspond to the names of mail users in the domain , I wrote a simple scrpt  and just threw it in a "/etc/cron.daily" folder.

-----screenshot begin-----

mail:/etc/cron.daily # cat ./dovepurge.sh
#!/bin/sh

cd /MailRoot/dovecot/domains

for i in *
  do
   cd $i
    for j in *; do dovecot purge -u $j@$i; done
   cd ..
done

-----screenshot end -----

It is strange that the daemon does not do this automatically , and even setting up autoexpunge option does not help. A lso IMHO  certainly evident mistake in the documentation about the wildcards processing by purge command..


More information about the dovecot mailing list