[Dovecot] Why does it appear that dovecot is deleting messages after migration?

LuKreme kremels at kreme.com
Mon Apr 28 14:01:40 UTC 2014


On 28 Apr 2014, at 07:23 , Bill Eccles <Bill.public at Eccles.net> wrote:

> Ah... well, don't I feel foolish. It's my own sa-learn script at fault!

Don't feel bad. I accidentally delete 6TB of data off a machine when I edited a script to take out the testing harness and make it live. I introduced a space. Whoops.

I would do (assuming bash is your shell):

DIRMAIL="/var/spool/imap/dovecot/mail/public/.Learn as Spam (Bad E-mail)/cur/"
HOST="shr-xs.mydomain.net"

if [ -d ${DIRMAIL} ]; then
  cd $DIRMAIL
  find . name '*.${HOST}*' -delete
fi


-- 
There is a road, no simple highway, between the dawn and the dark of
night



More information about the dovecot mailing list