unexpunge and subfolders

Andy Fiddaman cyrus at fiddaman.net
Tue Oct 17 10:44:22 EDT 2006


On Tue, 17 Oct 2006, Leena Heino wrote:

; If user has not deleted the whole subfolder only some of the messages then is
; there any way to restore those messages with unexpunge?
;
; It seems that if any subfolders is specified as an argument then then unexpuge
; segfaults eg.: unexpunge -a user.foo.subfolder
;
; (gdb) bt
; #0  0xfedb455c in strlen () from /usr/lib/libc.so.1
; #1  0xfee07058 in _doprnt () from /usr/lib/libc.so.1
; #2  0xfee090c8 in vsnprintf () from /usr/lib/libc.so.1
; #3  0xfedd62a4 in vsyslog () from /usr/lib/libc.so.1
; #4  0xfedd5de0 in syslog () from /usr/lib/libc.so.1
; #5  0x000178e8 in main (argc=4, argv=0xffbffe5c) at unexpunge.c:507
;
; unexpunge.c:507
;    505      if (r || expunge_fd == -1) {
;    506          /* mailbox corrupt/nonexistent -- skip it */
;    507          syslog(LOG_WARNING, "unable to open/lock mailbox %s",
; argv[optind]);
;    508          if (doclose) mailbox_close(&mailbox);
;    509          return 0;
;    510      }


Well, the crash is due to a bug in unexpunge.c, line 507 should read:
   syslog(LOG_WARNING, "unable to open/lock mailbox %s", argv[optind -1]);

(I reported this to the cyrus bugs email address a while ago).

However, if this is fixed then you will just get told
'unable to open/lock mailbox user.foo.subfolder'. I have virtdomains enabled
and use:

unexpunge -l fiddaman.net\!user.xxx.mailing_lists.cyrus

for example, which works fine. Not sure what you do for the default domain or
with virtdomains disabled, maybe try '\!user.foo.subfolder' ?

HTH.

Andy



More information about the Info-cyrus mailing list