Re: Mail not visible after restore from backup.
Hi, try reconstruct -rf mailbox Regards, El 14/09/2014, a las 03:05, Tom Plancon 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 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
Re: Cyrus-imapd can't find my mail
I'm pretty certain this is because it just doesn't know where to look, but I'm not sure how to tell it :-( No, it will not work that way because Cyrus uses a different message store format. You may search the list archives for more on this topic. Regards, Simon I was using http://www.linuxmail.info/postfix-dovecot-ldap-centos-5/ as a guide, but needed to switch to cyrus-imapd I think cyrus doesn't know how to look in /var/vmail/ as the vmail user. -- *** * John Oliver http://www.john-oliver.net/ * * * *** 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
Re: List currently logged on users
Am 12.09.2014 um 17:02 schrieb Michel Blanc: Hello, I use the following handy one liner : lsof -p `pidof imapd|tr ' ' ','` | \ grep '/var/lib/cyrus/user/.*\.seen$' | \ awk '{ print $9 }' | sort | uniq | \ cut -f7 -d'/' | cut -f1 -d'.' with cyrus 2.2 under ubuntu server, YMMV ! Thanks, using lsof is a good idea, can be used to gather other useful imap connection informations as well. Regards -- Michael Neumann 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: Cyrus-imapd can't find my mail
On Fri, 2014-09-12 at 14:03 -0700, John Oliver wrote: I'm pretty certain this is because it just doesn't know where to look, but I'm not sure how to tell it :-( I was using http://www.linuxmail.info/postfix-dovecot-ldap-centos-5/ as a guide, but needed to switch to cyrus-imapd I think cyrus doesn't know how to look in /var/vmail/ as the vmail user. cyrus doesn't know how to look in /var/vmail/ as the vmail user Neither does a dolphin know how to fly; that documentation is not about Cyrus. Try reconstructing the mailbox after you put message files back. sudo -u cyrus /usr/lib/cyrus-imapd/reconstruct -r -k -f user.fred Paths may vary based upon distribution and packages. Use the Cyrus documentation available @ http://cyrusimap.org/docs/cyrus-imapd/ and/or take a look at the Cyrus chapter in my `book` @ http://sourceforge.net/projects/coils/files/WMOGAG.pdf/download Comments on documentation are appreciated. Writing documentation is hard - feedback helps; sometimes if you understand something your explanation has holes only the less advanced reader can point out. -- Adam Tauno Williams mailto:awill...@whitemice.org GPG D95ED383 Systems Administrator, Python Developer, LPI / NCLA 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: Mail not visible after restore from backup.
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. 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 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
Re: Mail not visible after restore from backup.
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 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 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 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 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
Re: Mail not visible after restore from backup.
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
Re: Mail not visible after restore from backup.
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 n...@onlight.com Onlight, Inc. www.onlight.com 219 N. Milwaukee St., Suite 2av. 414.272.4477 Milwaukee, Wisconsin 53202 attachment: nic.vcf 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: Mail not visible after restore from backup.
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 2av. 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
Re: Mail not visible after restore from backup.
On 15/09/2014 15:56, 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. AFAIK, if the Sent folder was deleted, you need to use the -f flag to rebuild the mailbox. M -- Michel Blanc - Systèmes / Réseaux Erasme Erasme - Département du Rhône - Saint Clément les Places/FR69930 Email : mbl...@erasme.org - Tel: +33-474706840 GitHub : @leucos - GPG: 0X24B35C22 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: Mail not visible after restore from backup.
On Mon, 2014-09-15 at 10:12 -0400, Tom Plancon wrote: I inherited this installation, unfortunately! I'm running reconstruct inside cyradm. Running version inside cyradm I get this: I do not believe that way of accessing the reconstruct feature supports options. Use the reconstruct utility. sudo -u cyrus /usr/lib/cyrus-imapd/reconstruct -r -k -f user.fred Paths may vary based upon distribution and packages. I believe this in covered in the Cyrus documentation available @ http://cyrusimap.org/docs/cyrus-imapd/ and/or take a look at the Cyrus chapter in my `book` @ http://sourceforge.net/projects/coils/files/WMOGAG.pdf/download Comments on documentation are appreciated. -- Adam Tauno Williams mailto:awill...@whitemice.org GPG D95ED383 Systems Administrator, Python Developer, LPI / NCLA 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/chk_cyrus found messages and deleted messages differs on master and slave
Hi, since a few days do I see chk_cyrus messages on one single subfolder sent_mail (440 MB) of a user's mailbox in my mail.err each morning at the same time (6:30am): -- Sep 15 06:31:16 grady cyrus/chk_cyrus[25398]: user.userxyz.sent_mail uid 2 found - adding [...] Sep 15 06:31:50 grady cyrus/chk_cyrus[25398]: user.userxyz.sent_mail uid 1768 found - adding -- The reported UIDs on the folder differ from day to day, but I always do see about 900 log entries each morning. Looking with an imap client into this userxyz.sent_mail subfolder all messages except of one message seem to be deleted by the user. System here is cyrus 2.4.12 Ubuntu 12.04 LTS with master and slave; I've set delete_mode and expunge_mode to delayed, to be able to restored deleted messages and folders (expire is 7 days). The strange thing is now that on the replica/slave side the folder userxyz.sent_mail is empty inside the filesystem in /var/spool/cyrus/mail/u/user/userxyz/sent_mail/ (exepect this single message) and the whole content of the send_mail folder has moved to /var/spool/cyrus/mail/u/DELETED/user/userxyz/sent_mail/54101FA9/. BUT on the primary side I still do see 1774 messages in the filesystem userxyz.sent_mail and the same number of messages in the DELETE folder unter /var/spool/cyrus/mail/u/DELETED/user/userxyz/sent_mail/54101FA9/. I don't understand that. If I believe in the timestamp of the folder /var/spool/cyrus/mail/u/DELETED/user/userxyz/sent_mail/ on primary and slave it was created at Sep. 10th. The chk_cyrus messages started later at Sep. 13th. Second strange thing: su - cyrus -c /usr/sbin/unexpunge -l user.userxyz.sent_mail on the master doesn't show any deleted UIDs. If I check for hardlinks I do see three UIDs hardlinked to the same inode #10897103: # ls -li /var/spool/cyrus/mail/u/user/userxyz/sent_mail/1766. 10897103 -rw--- 3 cyrus mail 5520 Sep 9 23:08 /var/spool/cyrus/mail/u/user/userxyz/sent_mail/1766. #ls -li /var/spool/cyrus/mail/u/user/userxyz/Gesendete\ Elemente/1807. 10897103 -rw--- 3 cyrus mail 5520 Sep 9 23:08 /var/spool/cyrus/mail/u/user/userxyz/Gesendete Elemente/1807. # ls -li /var/spool/cyrus/mail/u/DELETED/user/userxyz/sent_mail/54101FA9/1766. 10897103 -rw--- 3 cyrus mail 5520 Sep 9 23:08 /var/spool/cyrus/mail/u/DELETED/user/userxyz/sent_mail/54101FA9/1766. I don't know what the user did exactly, but I think he moved/copied the content from the sent_mail subfolder to another subfolder Gesendete Elemente, to merge different Sent folders created by different imap clients. After that he deleted the mails inside the original sent_mail. No problem at all, but what's the plan to get rid of the chk_cyrus messages? They do make me nervous. A reconstruct -r user.userxyz.sent_mail might restore deleted mails which might confuse the user? Deleting sent_mail subfolder via an imap client again to moved the whole sent_mail folder to DELETED and create an empty new one? Andy ideas? Ciao Marcus 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: Mail not visible after restore from backup.
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
Re: cyrus/chk_cyrus found messages and deleted messages differs on master and slave
Hi, some more info. I've copied the sent_mail folder to a testmachine and started a chk_cyrus. Same messages in /var/log/mail.err: cyrus/chk_cyrus[15900]: user.userxyz.sent_mail uid 201 found - adding [...] Btw: I figured out that rsyslog skipped some logging. So chk_cyrus reports always the same amount of messages: Sep 15 18:59:45 test rsyslogd-2177: imuxsock begins to drop messages from pid 15900 due to rate-limiting In the sent_mail folder there was one single messages, which is shown in an imap client. This is message 1. in the file system and was created after the user deleted all messages in the sent_mail folder. --- Sep 10 11:53:46 primary cyrus/imaps[19286]: Deleted mailbox user.userxyz.sent_mail -rw--- 2 cyrus mail 543 2014-09-12 10:18 var/spool/cyrus/mail/u/user/userxyz/sent_mail/1. --- It seems that something strange happened while deleting the 440 MB big sent_mail folder. The cyrus databases inside the sent_mail started counting at number 1 again. Using Thunderbird I've copied another message inside the sent_mail folder and this message got number 2. and overwrote the old deleted 2. messages, which is still hang around in the file system together with the other ~1700 messages. As the deleted mails in the sent_mail folder are hardlinked three times 10897103 -rw--- 3 cyrus mail 5520 Sep 9 23:08 /var/spool/cyrus/mail/u/user/userxyz/sent_mail/1766. 10897103 -rw--- 3 cyrus mail 5520 Sep 9 23:08 /var/spool/cyrus/mail/u/user/userxyz/Gesendete Elemente/1807. 10897103 -rw--- 3 cyrus mail 5520 Sep 9 23:08 /var/spool/cyrus/mail/u/DELETED/user/userxyz/sent_mail/54101FA9/1766. what would happen if I start a cyrus expire on the DELETED.user.userxyz.sent_mail folder by hand: /usr/sbin/cyrus expire -E 1 -X 0 -D 0 -p DELETED.user.userxyz.sent_mail This would be what will happen in a few days, when nightly cyrus expire is started by cyrus events and the deleted messages are older than 7 days. So question is what happens to file files in u/user/userxyz/sent_mail in u/DELETED/user/userxyz/sent_mail/54101FA9/ and in u/user/userxyz/Gesendete Elemente/ ? The files in subfolder Gesendete Elemente subfolder must not be deleted. I think the user copied all mails from sent_mail to Gesendete Elemente to merge, so he wants to keep those mails. Or another way: just delete user.userxyz.sent_mail subfolder using cyradm. The sent_mail folder will be moved into a subfolder under u/DELETED/user/userxyz/sent_mail/ and will only keep message 1., because all other emails are not know by the cyrus databases in user.userxyz.sent_mail. This would solve the chk_cyrus error messages. But what happens to hardlink 1807. then? Will cyrus keep these mails in Gesendete Elemente then? Third way: reconstruct -r on the u/user/userxyz/sent_mail folder and delete the complete folder by hand afterwards? Ciao Marcus 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