| 1 |
.. cyrusman:: mbexamine(8) |
| 2 |
|
| 3 |
.. author: Nic Bernstein (Onlight) |
| 4 |
|
| 5 |
.. _imap-reference-manpages-systemcommands-mbexamine: |
| 6 |
|
| 7 |
============= |
| 8 |
**mbexamine** |
| 9 |
============= |
| 10 |
|
| 11 |
Examine a cyrus-format mailbox |
| 12 |
|
| 13 |
Synopsis |
| 14 |
======== |
| 15 |
|
| 16 |
.. parsed-literal:: |
| 17 |
|
| 18 |
**mbexamine** [ **-C** *config-file* ] [ **-u** *uid* ] *mailbox*... |
| 19 |
**mbexamine** [ **-C** *config-file* ] [ **-s** *seqnum*] *mailbox*... |
| 20 |
**mbexamine** [ **-C** *config-file* ] **-q** *mailbox*... |
| 21 |
**mbexamine** [ **-C** *config-file* ] **-c** *mailbox*... |
| 22 |
|
| 23 |
Description |
| 24 |
=========== |
| 25 |
|
| 26 |
**mbexamine** will examine the header, index, and cache files of a |
| 27 |
cyrus format mailbox and dump the information contained therein. It |
| 28 |
can also limit its output to a specific uid or sequence number, through |
| 29 |
use of the **-s** and **-u** switches. |
| 30 |
|
| 31 |
**mbexamine** |default-conf-text| It uses |
| 32 |
<configdirectory>/mailboxes.db to locate the mailbox on disk. |
| 33 |
|
| 34 |
Options |
| 35 |
======= |
| 36 |
|
| 37 |
.. program:: mbexamine |
| 38 |
|
| 39 |
.. option:: -C config-file |
| 40 |
|
| 41 |
|cli-dash-c-text| |
| 42 |
|
| 43 |
.. option:: -u uid, --uid=uid |
| 44 |
|
| 45 |
Dump information for the given uid only. |
| 46 |
|
| 47 |
.. option:: -s seqnum, --seq=seqnum |
| 48 |
|
| 49 |
Dump information for the given sequence number only. |
| 50 |
|
| 51 |
.. option:: -q, --check-quota |
| 52 |
|
| 53 |
Compare the quota usage in cyrus.index to the actual message file |
| 54 |
sizes and report any differences. If there are differences, the |
| 55 |
mailbox SHOULD be reconstructed. |
| 56 |
|
| 57 |
.. option:: -c, --check-message-files |
| 58 |
|
| 59 |
Compare the records in cyrus.index to the actual message files |
| 60 |
report any differences. This can help detect issues if messages |
| 61 |
files were manipulated manually and/or restored incorrectly. |
| 62 |
|
| 63 |
Examples |
| 64 |
======== |
| 65 |
|
| 66 |
.. parsed-literal:: |
| 67 |
|
| 68 |
**mbexamine** *user.jsmith* |
| 69 |
|
| 70 |
.. |
| 71 |
|
| 72 |
Examine the mailbox hierarchy rooted at *user.jsmith*. |
| 73 |
|
| 74 |
.. only:: html |
| 75 |
|
| 76 |
:: |
| 77 |
|
| 78 |
Examining user.jsmith... |
| 79 |
Mailbox Header Info: |
| 80 |
Path to mailbox: /var/spool/cyrus/user/jsmith |
| 81 |
Mailbox ACL: jsmith lrswipkxtecda |
| 82 |
Unique ID: 3ab4f8d5512e33b1 |
| 83 |
User Flags: [none] |
| 84 |
|
| 85 |
Index Header Info: |
| 86 |
Generation Number: 0 |
| 87 |
Minor Version: 12 |
| 88 |
Header Size: 128 bytes Record Size: 96 bytes |
| 89 |
Number of Messages: 9 Mailbox Size: 35955 bytes |
| 90 |
Last Append Date: (1404765874) Mon Jul 7 20:44:34 2014 |
| 91 |
UIDValidity: 1404761793 Last UID: 9 |
| 92 |
Deleted: 0 Answered: 0 Flagged: 0 |
| 93 |
Mailbox Options: POP3_NEW_UIDL |
| 94 |
Last POP3 Login: (0) Thu Jan 1 00:00:00 1970 |
| 95 |
Highest Mod Sequence: 15 |
| 96 |
|
| 97 |
Message Info: |
| 98 |
000001> UID:00000001 INT_DATE:1361982429 SENTDATE:1361966400 SIZE:6762 |
| 99 |
> HDRSIZE:1443 LASTUPD :1361982447 SYSFLAGS:00000010 LINES:125 |
| 100 |
> CACHEVER:3 GUID:69bdb40dac9de4d17057a5245c34544f2d6849db MODSEQ:3 |
| 101 |
> USERFLAGS: 00000000 00000000 00000000 00000000 |
| 102 |
<...> |
| 103 |
|
| 104 |
.. parsed-literal:: |
| 105 |
|
| 106 |
**mbexamine -u** *00000004 user.jsmith* |
| 107 |
|
| 108 |
.. |
| 109 |
|
| 110 |
Examine the mailbox hierarchy rooted at *user.jsmith* looking |
| 111 |
for messages with UID = *00000004*. |
| 112 |
|
| 113 |
.. only:: html |
| 114 |
|
| 115 |
:: |
| 116 |
|
| 117 |
Examining user.jsmith... |
| 118 |
Mailbox Header Info: |
| 119 |
Path to mailbox: /var/spool/cyrus/user/jsmith |
| 120 |
Mailbox ACL: jsmith lrswipkxtecda |
| 121 |
Unique ID: 3ab4f8d5512e33b1 |
| 122 |
User Flags: [none] |
| 123 |
|
| 124 |
Index Header Info: |
| 125 |
Generation Number: 0 |
| 126 |
Minor Version: 12 |
| 127 |
Header Size: 128 bytes Record Size: 96 bytes |
| 128 |
Number of Messages: 9 Mailbox Size: 35955 bytes |
| 129 |
Last Append Date: (1404765874) Mon Jul 7 20:44:34 2014 |
| 130 |
UIDValidity: 1404761793 Last UID: 9 |
| 131 |
Deleted: 0 Answered: 0 Flagged: 0 |
| 132 |
Mailbox Options: POP3_NEW_UIDL |
| 133 |
Last POP3 Login: (0) Thu Jan 1 00:00:00 1970 |
| 134 |
Highest Mod Sequence: 15 |
| 135 |
|
| 136 |
Message Info: |
| 137 |
000001> UID:00000004 INT_DATE:1377891971 SENTDATE:1377864000 SIZE:4097 |
| 138 |
> HDRSIZE:1771 LASTUPD :1377891971 SYSFLAGS:00000000 LINES:60 |
| 139 |
> CACHEVER:3 GUID:dc814658a4d676789578bff3de35b45914abd774 MODSEQ:7 |
| 140 |
> USERFLAGS: 00000000 00000000 00000000 00000000 |
| 141 |
<...> |
| 142 |
|
| 143 |
.. parsed-literal:: |
| 144 |
|
| 145 |
**mbexamine -q** *user.jsmith* |
| 146 |
|
| 147 |
.. |
| 148 |
|
| 149 |
Examine the mailbox hierarchy rooted at *user.jsmith* checking |
| 150 |
quotas. |
| 151 |
|
| 152 |
.. only:: html |
| 153 |
|
| 154 |
:: |
| 155 |
|
| 156 |
Examining user.jsmith... Mailbox has CORRECT total quota usage |
| 157 |
Examining user.jsmith.Drafts... Mailbox has CORRECT total quota usage |
| 158 |
Examining user.jsmith.Sent... Mailbox has CORRECT total quota usage |
| 159 |
Examining user.jsmith.Spam... Mailbox has CORRECT total quota usage |
| 160 |
Examining user.jsmith.Trash... Mailbox has CORRECT total quota usage |
| 161 |
|
| 162 |
.. parsed-literal:: |
| 163 |
|
| 164 |
**mbexamine -c** *user.jsmith* |
| 165 |
|
| 166 |
.. |
| 167 |
|
| 168 |
Examine the mailbox hierarchy rooted at *user.jsmith* comparing |
| 169 |
index records to the actual message files in the mailbox directory. |
| 170 |
|
| 171 |
.. only:: html |
| 172 |
|
| 173 |
:: |
| 174 |
|
| 175 |
Examining user.jsmith... |
| 176 |
Mailbox Header Info: |
| 177 |
Path to mailbox: /var/spool/cyrus/user/jsmith |
| 178 |
|
| 179 |
Index Record Info: Message File Info: |
| 180 |
UID: 00000002 |
| 181 |
GUID: 4aa62f540d81395dc7d52518ae8e8c75571c8f11 |
| 182 |
Size: 6964 |
| 183 |
Date: Tue, 29 Nov 2016 12:00:00 -0500 |
| 184 |
From: <[email protected]> |
| 185 |
Subj: "Re: hello there" |
| 186 |
|
| 187 |
UID: 00000011 |
| 188 |
GUID: 6aa93fd583f143dde555184d508ab0916e06b026 739232245980a3efe3df490841221a4b7bac4f27 |
| 189 |
Size: 21427 23450 |
| 190 |
Date: Wed, 30 Nov 2016 12:00:00 -0500 Wed, 26 Oct 2005 12:00:00 -0400 |
| 191 |
From: <[email protected]> <[email protected]> |
| 192 |
Subj: "Re: what's up?" "hello there" |
| 193 |
|
| 194 |
UID: 00000022 |
| 195 |
GUID: 12a62f123451395dc7d52518ae8e8c75571c9876 |
| 196 |
Size: 5623 |
| 197 |
Date: Tue, 29 Mar 2016 12:00:00 -0500 |
| 198 |
From: <[email protected]> |
| 199 |
Subj: "Re: vacation" |
| 200 |
|
| 201 |
Files |
| 202 |
===== |
| 203 |
|
| 204 |
/etc/imapd.conf, |
| 205 |
<configdirectory>/mailboxes.db |
| 206 |
|
| 207 |
See Also |
| 208 |
======== |
| 209 |
|
| 210 |
:cyrusman:`imapd.conf(5)` |