replication with virtual domains

2016-02-04 Thread Michael Plate via Info-cyrus

Hi,

I'm going to sync between a Gentoo (master) and a Debian 8 machine 
(replica), Gentoo on Cyrus 2.4.17, Debian on "testing" Cyrus 2.4.18 
because of broken sync in "stable" 
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799724).

I am using virtual domains.

I've tried synctest from the master and it works perfectly.

Things get awful when I try to use sync_client -u or -m, I believe I 
have a mistake in the format of the user or mailbox in the command.


user:

sync_client -v -l -u forname.lastn...@domain.top

gives

USER forname^lastn...@domain.top
Error from do_user(forname^lastn...@domain.top): bailing out!


with mailbox:

sync_client -v -l -m user/forname.lastn...@domain.top

MAILBOXES domain.top!user.forname^lastname
Error from do_mailboxes(): bailing out!


sync_client -v -l -m forname.lastn...@domain.top
MAILBOXES domain.top!forname^lastname
Error from do_mailboxes(): bailing out!

I can see the connect and successful login on the replica.

Where is the mistake ?

CU

Michael



smime.p7s
Description: S/MIME Cryptographic Signature

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

Re: 2.4.18, problem with reconstruct

2016-02-04 Thread Andrew Morgan via Info-cyrus

On Fri, 5 Feb 2016, Sergey via Info-cyrus wrote:


Hello.

I attempted to reconstruct some damaged mailboxes with empty
folders, but it does not work. I use this command:

su -l cyrus -s /bin/bash -c "/usr/lib/cyrus/reconstruct -f -r user/user@domain"

Mail directory contains "Trash" subdirectory without any files (manualy
created from backup). Reconstruct works if I put any of files cyrus.* to
this subdirectory. At the same time there was the opposite problem:
I can not delete existing directory, reconstruct restores it.

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.

So, I think the behavior you are seeing is expected.  Create an empty 
cyrus.header file, with the correct ownership, before running reconstruct.


Andy

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


2.4.18, problem with reconstruct

2016-02-04 Thread Sergey via Info-cyrus
Hello.

I attempted to reconstruct some damaged mailboxes with empty
folders, but it does not work. I use this command:

su -l cyrus -s /bin/bash -c "/usr/lib/cyrus/reconstruct -f -r user/user@domain"

Mail directory contains "Trash" subdirectory without any files (manualy
created from backup). Reconstruct works if I put any of files cyrus.* to
this subdirectory. At the same time there was the opposite problem:
I can not delete existing directory, reconstruct restores it.

Is this is a bug or require any other settings to run reconstruct ?

-- 
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


Re: 2.4.18, problem with reconstruct

2016-02-04 Thread Sergey via Info-cyrus
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.
> 
> 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/

[ -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