Stephen Lidie
2014-Dec-09 10:42 UTC
devoid mailbox status for mail reloaded from a tape backup
> On Dec 9, 2014, at 2:34 AM, Steffen Kaiser <skdovecot at smail.inf.fh-brs.de> wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Mon, 8 Dec 2014, Stephen Lidie wrote: > >> I've only be able to status a mailbox for currently existing users, is it possible to status a mailbox reloaded from tape to an alternate location? The user may or may not exist at this time, but I still need to inspect the mailbox ... thank you, > > yes >:) Well, although I am able to issue a mailbox status command regardless, the implication was that the command displayed an empty string (nothing useful), and thus a working example using files not in the locations specified by mail_location would be useful. In my configuration mail_locations is defined as: mail_location = mdbox:~/mail:INDEX=/var/dovecot/index/%u So a command of the form ?doveadm mailbox status -u userName all INBOX? uses mail_location as defined in dovecot.conf to locate the mail and index files, and displays appropriate information about the specified user?s INBOX. If I have mail and index files in an alternate location - restored from a backup tape for example - how do I obtain data such as unseen, message count, vsize, etc about mailboxes residing at that alternate location, a location not pointed to by mail_location? As I mentioned, ?doveadm import? allows one to provide an alternate source location, but ?doveadm mailbox status? does not AFAIK, thus, a sample command would be wonderful. thx/stv
Steffen Kaiser
2014-Dec-09 16:00 UTC
devoid mailbox status for mail reloaded from a tape backup
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 9 Dec 2014, Stephen Lidie wrote:>> On Dec 9, 2014, at 2:34 AM, Steffen Kaiser <skdovecot at smail.inf.fh-brs.de> wrote: >> On Mon, 8 Dec 2014, Stephen Lidie wrote: >> >>> I've only be able to status a mailbox for currently existing users, is >>> it possible to status a mailbox reloaded from tape to an alternate >>> location? The user may or may not exist at this time, but I still^^^^^^>>> need to inspect the mailbox ... thank you, > > Well, although I am able to issue a mailbox status command regardless, the implication was that the command displayed an empty string (nothing useful), and thus a working example using files not in the locations specified by mail_location would be useful. In my configuration mail_locations is defined as: > > mail_location = mdbox:~/mail:INDEX=/var/dovecot/index/%u > > So a command of the form ?doveadm mailbox status -u userName all INBOX? uses mail_location as defined in dovecot.conf to locate the mail and index files, and displays appropriate information about the specified user?s INBOX. > > If I have mail and index files in an alternate location - restored from a backup tape for example - how do I obtain data such as unseen, message count, vsize, etc about mailboxes residing at that alternate location, a location not pointed to by mail_location? As I mentioned, ?doveadm import? allows one to provide an alternate source location, but ?doveadm mailbox status? does not AFAIK, thus, a sample command would be wonderful.if the user does not exist at all, you could create a dummy "restore" account, where you restore the data to and can use as any other user. This would work for any existing user, too. For me this is working, too: doveadm -o mail_location=maildir:/home/user2/Maildir mailbox status \ -u user1 all INBOX shows the same as doveadm mailbox status -u user2 all INBOX but not the same as: doveadm mailbox status -u user1 all INBOX So, if you craft a good -o mail_location= and an "-u", which has access permissions on filesystem level (e.g. if you are using system users), it should work. Maybe, you need to specify "-o home=...", too. - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBVIccm3z1H7kL/d9rAQJ5sAgAnwLKX+GHvrvdnWOkMfAVl68tamJCZEvw 7tWQCjK7LpcctjiRO7xFVZSKq4OruD6tkU0pnPut6w2sIL8DIhp4lyVBHbuNMA4s QyA0oLq2tMfEYEiSn8g1G5NpCPnSeo8uFinhHcSAwPWJNo5ly22QHZmZI787olM2 Q7A2insZTvVKLSOe+tcK8SMX05GJLXb5lIRQHj2SkvkmBFiMKI2s6xxakLmEnB4h 3LOFqMoXTmvgGioOtoppZxPJ5jJfUNyGGCfDH7CmKwg6nbUpehf61OdQekCUSoH7 383RgWCW/BUb6ink9nzQDVGLSRCmzT5U0KRZ7nkMobqjuwZ/8L0AMw==oNin -----END PGP SIGNATURE-----
Stephen Lidie
2014-Dec-09 16:29 UTC
devoid mailbox status for mail reloaded from a tape backup
> On Dec 9, 2014, at 11:00 AM, Steffen Kaiser <skdovecot at smail.inf.fh-brs.de> wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tue, 9 Dec 2014, Stephen Lidie wrote: >>> On Dec 9, 2014, at 2:34 AM, Steffen Kaiser <skdovecot at smail.inf.fh-brs.de> wrote: >>> On Mon, 8 Dec 2014, Stephen Lidie wrote: >>> >>>> I've only be able to status a mailbox for currently existing users, is it possible to status a mailbox reloaded from tape to an alternate location? The user may or may not exist at this time, but I still > > ^^^^^^ > >>>> need to inspect the mailbox ... thank you, >> >> Well, although I am able to issue a mailbox status command regardless, the implication was that the command displayed an empty string (nothing useful), and thus a working example using files not in the locations specified by mail_location would be useful. In my configuration mail_locations is defined as: >> >> mail_location = mdbox:~/mail:INDEX=/var/dovecot/index/%u >> >> So a command of the form ?doveadm mailbox status -u userName all INBOX? uses mail_location as defined in dovecot.conf to locate the mail and index files, and displays appropriate information about the specified user?s INBOX. >> >> If I have mail and index files in an alternate location - restored from a backup tape for example - how do I obtain data such as unseen, message count, vsize, etc about mailboxes residing at that alternate location, a location not pointed to by mail_location? As I mentioned, ?doveadm import? allows one to provide an alternate source location, but ?doveadm mailbox status? does not AFAIK, thus, a sample command would be wonderful. > > if the user does not exist at all, you could create a dummy "restore" account, where you restore the data to and can use as any other user. > This would work for any existing user, too.True, that was my last resort, because I'd have to go through "channels" to get a real dummy username added to the University's LDAP server, then I'd have to to an actual import, and finally the status.> > For me this is working, too: > > doveadm -o mail_location=maildir:/home/user2/Maildir mailbox status \ > -u user1 all INBOXEureka!! The magic incantation snippet I was seeking :) I had tried, variously, placing this simple string: "mail_location=mdbox:/home/RESTORE/homeb/userName/mail:INDEX=/home/RESTORE/var/dovecot/index/userName" at various points on the doveadm command line, I tried exporting the string as the environment variables mail_location and MAIL_LOCATION, and I tried to find some option that would accept an alternate mail_location. I even briefly scanned the force code but saw immediately that that solution would be slow going :) I just now tried to find where -o was documented, to no avail: # man doveadm|egrep -i '\-o' # man doveadm mailbox|egrep -i '\-o' # man doveadm help|egrep -i '\-o' So, where exactly did I fail to find -o documented? Now I (or an operator) can pre-scan candidate mail files pulled from tape before actually restoring them for a real user account, to help narrow down the results. Did I mention that this is the exact solution I was hoping for?! Many thanks, Steve> > shows the same as > > doveadm mailbox status -u user2 all INBOX > > but not the same as: > > doveadm mailbox status -u user1 all INBOX > > So, if you craft a good -o mail_location= and an "-u", which has access permissions on filesystem level (e.g. if you are using system users), it should work. Maybe, you need to specify "-o home=...", too. > > - -- Steffen Kaiser > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (GNU/Linux) > > iQEVAwUBVIccm3z1H7kL/d9rAQJ5sAgAnwLKX+GHvrvdnWOkMfAVl68tamJCZEvw > 7tWQCjK7LpcctjiRO7xFVZSKq4OruD6tkU0pnPut6w2sIL8DIhp4lyVBHbuNMA4s > QyA0oLq2tMfEYEiSn8g1G5NpCPnSeo8uFinhHcSAwPWJNo5ly22QHZmZI787olM2 > Q7A2insZTvVKLSOe+tcK8SMX05GJLXb5lIRQHj2SkvkmBFiMKI2s6xxakLmEnB4h > 3LOFqMoXTmvgGioOtoppZxPJ5jJfUNyGGCfDH7CmKwg6nbUpehf61OdQekCUSoH7 > 383RgWCW/BUb6ink9nzQDVGLSRCmzT5U0KRZ7nkMobqjuwZ/8L0AMw=> =oNin > -----END PGP SIGNATURE-----
Possibly Parallel Threads
- devoid mailbox status for mail reloaded from a tape backup
- devoid mailbox status for mail reloaded from a tape backup
- devoid mailbox status for mail reloaded from a tape backup
- devoid mailbox status for mail reloaded from a tape backup
- devoid mailbox status for mail reloaded from a tape backup