myEMAILsignature On 9/15/2014 11:14 AM, Nic Bernstein wrote:
Tom,
Glad to hear it. Please post this to the list so other folks in a similar situation will find it in the future.
    -nic

On 09/15/2014 09:51 AM, Tom Plancon wrote:
Nic,

Thanks for that! I got /usr/lib/cyrus-imapd/reconstruct to run as the cyrus user. However, the output is this:

reconstruct: fopen() failed for '8114.' [error=13] -- skipping.
reconstruct: fopen() failed for '8115.' [error=13] -- skipping.
reconstruct: fopen() failed for '8116.' [error=13] -- skipping.
reconstruct: fopen() failed for '8117.' [error=13] -- skipping.
.....etc.

Ran ls -al on the Sent folder and saw that all of the emails recovered from rsync were owned by root! Did a "chown cyrus.mail" on all the files, ran reconstruct again, worked like a charm!

Nice lesson here! Thank you all for the great help! My job is secure!

myEMAILsignature Thomas Plancon
CAD/IT Manager

B K A Architects, Inc.
142 Crescent Street
Brockton, MA 02302

tel: 508 . 583 . 5603 ext 313
fax: 508 . 584 . 2914
www.bkaarchitects.com <http://www.bkaarchs.com/>
On 9/15/2014 10:21 AM, Nic Bernstein wrote:
I've never run reconstruct from within cyradm, so cannot speak to that, although I will note that in my version (2.4.17) the help fro cyradm says this (emphasis mine):

    reconstruct                       reconstruct mailbox /(if
    supported)/

Look for the binary 'reconstruct' on your system. On a Fedora/RedHat/CentOS system it might be here:
    /usr/lib/cyrus-imapd/reconstruct

You should run this as the cyrus user.  For example, as root do this:
    $ su cyrus -c "/usr/lib/cyrus-imapd/reconstruct -r -f user.USER"

If you don't run the command as the syruc user, the perms on the files (if any) it creates will be wrong.

Cheers,
    -nic

On 09/15/2014 09:12 AM, Tom Plancon wrote:
I inherited this installation, unfortunately!

I'm running "reconstruct" inside cyradm. Running "version" inside cyradm I get this:

name       : Cyrus IMAPD
version    : v2.3.16-Fedora-RPM-2.3.16-6.el6_2.5 2010/01/06 17:01:32
vendor     : Project Cyrus
support-url: http://cyrusimap.web.cmu.edu
os         : Linux
os-version : 2.6.32-279.22.1.el6.x86_64
environment: Built w/Cyrus SASL 2.1.23
             Running w/Cyrus SASL 2.1.23
             Built w/Berkeley DB 4.7.25: (November 12, 2010)
             Running w/Berkeley DB 4.7.25: (April  4, 2012)
             Built w/OpenSSL 1.0.0-fips 29 Mar 2010
             Running w/OpenSSL 1.0.0-fips 29 Mar 2010
             Built w/zlib 1.2.3
             Running w/zlib 1.2.3
             CMU Sieve 2.3
             TCP Wrappers
             mmap = shared
             lock = fcntl
             nonblock = fcntl
             idle = idled

Is it possible install a version of cyradm, or is it only installed with the cyrus-imad package?
myEMAILsignature Thomas Plancon
CAD/IT Manager

B K A Architects, Inc.
142 Crescent Street
Brockton, MA 02302

tel: 508 . 583 . 5603 ext 313
fax: 508 . 584 . 2914
www.bkaarchitects.com <http://www.bkaarchs.com/>
On 9/15/2014 9:56 AM, Nic Bernstein wrote:
Are you sure you've running a version of reconstruct which matches your installation? I ask because the man page for reconstruct from 2.3.16 shows both -r and -f as permissible:

    −r

    Recursively reconstruct all sub-mailboxes of the mailboxes or
    mailbox prefixes given as arguments.


    −f

    Examine the filesystem underneath mailbox, adding all
    directories with a cyrus.header found there as new mailboxes.
    Useful for restoring mailboxes from backups.

    from
    http://www.cyrusimap.org/docs/cyrus-imapd/2.3.16/man/reconstruct.8.php

Depending upon how you installed Cyrus, from package or source, and which OS/distro you're using, there may be versions of binary utilities laying around from older versions of the software. We've certainly seen that before.

Cheers,
    -nic

On 09/15/2014 08:43 AM, Tom Plancon wrote:
Version 2.3.16

myEMAILsignature Thomas Plancon
CAD/IT Manager

B K A Architects, Inc.
142 Crescent Street
Brockton, MA 02302

tel: 508 . 583 . 5603 ext 313
fax: 508 . 584 . 2914
www.bkaarchitects.com <http://www.bkaarchs.com/>
On 9/15/2014 9:40 AM, Egoitz Aurrekoetxea wrote:
That’s estrange the -r is recursive…. that should work….

Which Cyrus version are you running?


El 15/09/2014, a las 15:38, Tom Plancon <tplan...@bkaarchs.com <mailto:tplan...@bkaarchs.com>> escribió:

Hello,

Thanks for the response.
When I run "reconstruct -rf mailbox" the response is "usage: reconstruct [-r] mailbox". I assume that means it doesn't like the syntax.

Thomas Plancon
CAD/IT Manager

B K A Architects, Inc.
142 Crescent Street
Brockton, MA 02302

tel:508 . 583 . 5603 ext 313
fax: 508 . 584 . 2914
www.bkaarchitects.com <http://www.bkaarchs.com/>
On 9/15/2014 3:15 AM, Egoitz Aurrekoetxea wrote:
Hi,

try reconstruct -rf mailbox

Regards,

El 14/09/2014, a las 03:05, Tom Plancon <tplan...@bkaarchs.com <mailto:tplan...@bkaarchs.com>> escribió:

Hello,

I have a user that deleted all mail from his Sent folder. I restored it from a rsync backup, ran "reconstruct user.name.Sent". the reconstruct finished instantly, and no emails from the restore can be seen in the user's mail agent, (thunderbird). I konow I've run into this before but can't remember the solution. Any help is greatly appreciated!

Thanks!
Tom Plancon
------------------------------------------------------------------------

*Thomas Plancon*
CAD/IT Manager

B K A  Architects, Inc.
142 Crescent Street
Brockton, MA 02302

tel: 508 . 583 . 5603 ext 313
fax: 508 . 584 . 2914
www.bkaarchitects.com <http://www.bkaarchitects.com/>
----
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







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

--
Nic bernstein...@onlight.com
Onlight, Inc.www.onlight.com
219 N. Milwaukee St., Suite 2a            v. 414.272.4477
Milwaukee, Wisconsin  53202


--
Nic bernstein...@onlight.com
Onlight, Inc.www.onlight.com
219 N. Milwaukee St., Suite 2a            v. 414.272.4477
Milwaukee, Wisconsin  53202


--
Nic bernstein...@onlight.com
Onlight, Inc.www.onlight.com
219 N. Milwaukee St., Suite 2a            v. 414.272.4477
Milwaukee, Wisconsin  53202

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

Reply via email to