Hi! Thanks it worked! But only when I have a specific user instead wldcard (i mean -u *@example.org). Now I think I need to write a script that searches for users in the domain , and starts each of them this command . And apparently it is necessary to add to the cron job..
On 29.06.2016 13:06, ??????? ???????? wrote:> Hi! > > Thanks it worked! But only when I have a specific user instead wldcard (i mean -u *@example.org). Now I think I need to write a script that searches for users in the domain , and starts each of them this command . And apparently it is necessary to add to the cron job.. >Hi, The script: doveadm-expunge - iterates over passwd-file databases, expunges messages in Junk and Trash folders and purges mailboxes for every user. https://github.com/moisseev/doveadm-tools/blob/master/bin/doveadm-expunge The crontab entry: 5 4 * * * /usr/local/bin/doveadm-expunge
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..