Re: devoid mailbox status for mail reloaded from a tape backup

2014-12-10 Thread Stephen Lidie

 On Dec 10, 2014, at 1:42 AM, Steffen Kaiser skdove...@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 11:00 AM, Steffen Kaiser skdove...@smail.inf.fh-brs.de 
 wrote:
 On Tue, 9 Dec 2014, Stephen Lidie wrote:
 On Dec 9, 2014, at 2:34 AM, Steffen Kaiser 
 skdove...@smail.inf.fh-brs.de wrote:
 On Mon, 8 Dec 2014, Stephen Lidie wrote:
 
 For me this is working, too:
 
 doveadm -o mail_location=maildir:/home/user2/Maildir mailbox status \
 -u user1 all INBOX
 
 Eureka!! 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
 
 So, where exactly did I fail to find -o documented?
 
 http://wiki2.dovecot.org/Tools/Doveadm
 - -o is a global option.
 
 Dovecot v2.2.15: man doveadm
 /-oENTER
 :-)
 
 man doveadm|egrep -i '\-o'
   -o setting=value
  ple settings, the -o option may be specified multiple times.
 
 However, I always wonder about the quoting [different shells behave 
 differently] and would use:
 
 man doveadm|egrep -i -- -o

The reason I did not see -o is because that option is NOT documented in the man 
pages for my dovecot installation, for whatever reason!  Either of our egreps 
would have found it if only it had been there :(

[root]# man doveadm|egrep -i '\-v'
   -v Enables verbosity, including progress counter.
[root]# man doveadm|egrep -i '\-o'
[root]# man doveadm|egrep -i -- -o
[root]# man doveadm|egrep -i -- -v
   -v Enables verbosity, including progress counter.
[root]# 

FWIW this is CentOS 7 with dovecot installed from an RPM:

[root]# yum list dovecot
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
 * base: linux.cc.lehigh.edu
 * epel: mirror.umd.edu
 * extras: mirror.es.its.nyu.edu
 * updates: mirrors.advancedhosters.com
Installed Packages
dovecot.x86_641:2.2.10-4.el7_0.1   @updates


thx/stv


Re: devoid mailbox status for mail reloaded from a tape backup

2014-12-10 Thread Teemu Huovila
On 12/10/2014 01:54 PM, Stephen Lidie wrote:
 The reason I did not see -o is because that option is NOT documented in the 
 man pages for my dovecot installation, for whatever reason!  Either of our 
 egreps would have found it if only it had been there :(
 
 [root]# man doveadm|egrep -i '\-v'
-v Enables verbosity, including progress counter.
 [root]# man doveadm|egrep -i '\-o'
 [root]# man doveadm|egrep -i -- -o
 [root]# man doveadm|egrep -i -- -v
-v Enables verbosity, including progress counter.
 [root]# 
 
 FWIW this is CentOS 7 with dovecot installed from an RPM:
 
 [root]# yum list dovecot
 Loaded plugins: fastestmirror, langpacks, versionlock
 Loading mirror speeds from cached hostfile
  * base: linux.cc.lehigh.edu
  * epel: mirror.umd.edu
  * extras: mirror.es.its.nyu.edu
  * updates: mirrors.advancedhosters.com
 Installed Packages
 dovecot.x86_641:2.2.10-4.el7_0.1   @updates
Documentation for -o was added recently, it is not even on the man-pages of the 
2.2.15 release.

br,
Teemu Huovila


Re: devoid mailbox status for mail reloaded from a tape backup

2014-12-10 Thread Stephen Lidie

 On Dec 10, 2014, at 7:50 AM, Teemu Huovila teemu.huov...@dovecot.fi wrote:
 
 Documentation for -o was added recently, it is not even on the man-pages of 
 the 2.2.15 release.

Thank you,
Steve


Re: devoid mailbox status for mail reloaded from a tape backup

2014-12-09 Thread Stephen Lidie

 On Dec 9, 2014, at 2:34 AM, Steffen Kaiser skdove...@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


Re: devoid mailbox status for mail reloaded from a tape backup

2014-12-09 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 9 Dec 2014, Stephen Lidie wrote:

On Dec 9, 2014, at 2:34 AM, Steffen Kaiser skdove...@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-


Re: devoid mailbox status for mail reloaded from a tape backup

2014-12-09 Thread Stephen Lidie

 On Dec 9, 2014, at 11:00 AM, Steffen Kaiser skdove...@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 skdove...@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 INBOX

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


Re: devoid mailbox status for mail reloaded from a tape backup

2014-12-09 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 9 Dec 2014, Stephen Lidie wrote:

On Dec 9, 2014, at 11:00 AM, Steffen Kaiser skdove...@smail.inf.fh-brs.de 
wrote:
On Tue, 9 Dec 2014, Stephen Lidie wrote:

On Dec 9, 2014, at 2:34 AM, Steffen Kaiser skdove...@smail.inf.fh-brs.de 
wrote:
On Mon, 8 Dec 2014, Stephen Lidie wrote:



For me this is working, too:

doveadm -o mail_location=maildir:/home/user2/Maildir mailbox status \
-u user1 all INBOX


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



So, where exactly did I fail to find -o documented?


http://wiki2.dovecot.org/Tools/Doveadm
- -o is a global option.

Dovecot v2.2.15: man doveadm
/-oENTER
:-)

man doveadm|egrep -i '\-o'
   -o setting=value
  ple settings, the -o option may be specified multiple times.

However, I always wonder about the quoting [different shells behave 
differently] and would use:


man doveadm|egrep -i -- -o

===

Actually, I remember a post of Timo each time such question comes up. And 
this time I dug it up in the man pages.


- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBVIfraHz1H7kL/d9rAQISHwf/SM1vlpIaYPmkm7yflIUi6HiNlsLLSvvO
9mE5eo4AZ3d+lmfR4eb5FCYtylkGdI9Uekji9vVJ/3xYEiZWt39/ju6IA15zhajS
zR71E59wa4Df49kRkB5OKAhsaWw60Dcxtb3+wQ1gdxglT6RsabwSGlQjOcGGoQtT
0RwsQXMCdfmjRpx1Xrp/fQn3iFQLMw2TyzAfwWpREy2MBnElyjknYCCKsXDYC8XY
l+XpnamxLbJuJOB2itJtGpwrCugVaoLMQoqpM3EeG/2/SXiic98AvMFxnHlcsQmy
JjLLE1Ki2f+bpKHtDgEz7CVHMIDR0EU1aUc2Tojb5D2aIVmWkjtf9A==
=dzCo
-END PGP SIGNATURE-


Re: devoid mailbox status for mail reloaded from a tape backup

2014-12-08 Thread Stephen Lidie

 On Dec 8, 2014, at 5:25 PM, Stephen Lidie s...@lehigh.edu wrote:
 
 dovecot --version
 2.2.10
 
 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,
 
 Steve

1) subject should read doveadm mailbox status

2) to clarify, something like an alternate source, as with doveadm import.

Re: devoid mailbox status for mail reloaded from a tape backup

2014-12-08 Thread Steffen Kaiser

-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

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBVIal9Hz1H7kL/d9rAQIFOQf/RhmEWkElrFpbPcEZ9fkKj9B0jlGqzWDO
t8nP2jC6Bza5zrRs+se5LmJhB32WIFU5vycv+XpdL3ucsumpZt2c1zDfG+3EqY1U
Tu34xSNDdtjxwZunQDv61llzmQRhAYmJV8VhZq6NWiz2qH16rr9b6JgR7mG9sSFw
dYFgMmqMxwK4csSi9u1SSSH8WUV3fNw9DdjQ1094DiPAEJba+WoSJA3tzBGW7Wu5
iZ6TyHSYxKnEjhcjWObZ20TtvhRmUxvxj7Q0f4U+H5+cJoUlXmakg9oar3hayKG2
LYflvKCZEObI0ZZK48sj9tyFb5bhKQ0b+twmfjfholmBoHURcxhOwQ==
=OTJZ
-END PGP SIGNATURE-