Re: 2.4.18, problem with reconstruct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 05 February 2016, Andrew Morgan wrote:

> > Is this is a bug or require any other settings to run reconstruct ?
> 
> I usually use these steps to add a new folder using reconstruct:
> 
>    touch cyrus.header
>    chown cyrus:mail cyrus.header
>    reconstruct -f -r user.<username>
> 
> So, I think the behavior you are seeing is expected.  Create an empty 
> cyrus.header file, with the correct ownership, before running reconstruct.

Good when boxes are few and known. I don't know exactly how many boxes
I need to fix. Ok, I wrote script. It may be useful to someone.

=========
BASE_DIR=/var/spool/imap/domain/M/<domain>

[ -d $BASE_DIR ] || exit

find $BASE_DIR -type d | \
while read DIR; do
    [ "$DIR" = "$BASE_DIR" ] && continue
    if [ -d $DIR ]; then
        FILES=`find $DIR -type f | wc -l`
        if [ $FILES -eq 0 ]; then
            touch $DIR/cyrus.header
            chown cyrus:cyrus $DIR/cyrus.header
            echo $DIR/cyrus.header
        fi
    fi
done
==========

-- 
Regards,
Sergey
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus



[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux