[Dovecot] help on migrating some old Maildirs
Hi,
i need to restore some old mail backups from a system i wasnt the
admin. Emails are on Maildir, which i'm using on the actual server, so should be no big deal. I'm just thinking of copying files from the folders i need, from the old backup, to the specific dirs on the actual system.
buuuut, watching the backup, i noticed that LOTS of files on the
Maildirs do not have the S= parameters on its name nor W=. For example:
1230230396.V80bI4e007fM790805.correio.domain.com.br:2, 1230463524.V80bI4e0080M837823.correio.domain.com.br:2, 1230571206.V80bI4e0081M519106.correio.domain.com.br:2, 1231170098.V80bI4e0083M519957.correio.domain.com.br:2, 1231682500.V80bI4e0084M584988.correio.domain.com.br:2,
files from the actual system looks like:
1278311553.M754372P13693.correio.domain.com.br,S=5742,W=5864:2, 1278668323.M110437P31421.correio.domain.com.br,S=4489,W=4590:2, 1278311669.M981814P13835.correio.domain.com.br,S=7404,W=7563:2, 1278669074.M556000P31506.correio.domain.com.br,S=4397,W=4504:2,
i've already tested copying those files to a current Maildir and it
works just fine, no problem at all on that. There's no problem on the restore of those messages itself.
Anyway, my questions are ....
do the lack of S= and W= parameters will negatively impact on something ? Quota calculation comes to my head about that .... as i'll have to restore several thousands of messages, i'm worried about negative impacts on anything
is there any way of having dovecot to calculating the S= and W= parameters and renaming those files and, thus, avoiding some negative impact caused by the lack of them ?
i'm using dovecot 1.2.11 ......
thanks !
--
Atenciosamente / Sincerily,
Leonardo Rodrigues
Solutti Tecnologia
http://www.solutti.com.br
Minha armadilha de SPAM, NÃO mandem email
gertrudes@solutti.com.br
My SPAMTRAP, do not email it
On Wed, 2010-07-14 at 16:31 -0300, Leonardo Rodrigues wrote:
- do the lack of S= and W= parameters will negatively impact on something ? Quota calculation comes to my head about that .... as i'll have to restore several thousands of messages, i'm worried about negative impacts on anything
If you're using Maildir++ quota, then quota recalculation is slower because those files need to be stat()ed to get the size.
- is there any way of having dovecot to calculating the S= and W= parameters and renaming those files and, thus, avoiding some negative impact caused by the lack of them ?
They are calculated and saved to dovecot-uidlist files. Maildir++ quota code ignores that though..
Anyway, the filenames themselves can't be renamed, because the ,S=xx,W=yy is part of the "maildir base filename", and changing it assigns a new UID for the message.
-----Original Message-----
- is there any way of having dovecot to calculating the S= and W= parameters and renaming those files and, thus, avoiding some negative impact caused by the lack of them ?
Anyway, the filenames themselves can't be renamed, because the ,S=xx,W=yy is part of the "maildir base filename", and changing it assigns a new UID for the message.
If he's restoring from an old machine (they're not currently indexed by Dovecot on the new server), they're going to get a new UID when Dovecot finds them anyway, right?
If he copied them from the old server into folder/new on the new one, would Dovecot add the S and W flags when it moves them to folder/cur?
-Brad
On Wed, 2010-07-14 at 13:12 -0700, Brad Davidson wrote:
-----Original Message-----
- is there any way of having dovecot to calculating the S= and W= parameters and renaming those files and, thus, avoiding some negative impact caused by the lack of them ?
Anyway, the filenames themselves can't be renamed, because the ,S=xx,W=yy is part of the "maildir base filename", and changing it assigns a new UID for the message.
If he's restoring from an old machine (they're not currently indexed by Dovecot on the new server), they're going to get a new UID when Dovecot finds them anyway, right?
Yes. But I was thinking he had already moved them and they had already got new UIDs :)
If he copied them from the old server into folder/new on the new one, would Dovecot add the S and W flags when it moves them to folder/cur?
No, because that would change the base filename. (Also the base filename may be exported to POP3 clients as the message UIDL, so it just can't be changed safely.)
If the messages were delivered to user via deliver, then they would get new base filenames with the S and W fields.
Hi People,
Em 14/07/2010 17:20, Timo Sirainen escreveu:
If he's restoring from an old machine (they're not currently indexed by Dovecot on the new server), they're going to get a new UID when Dovecot finds them anyway, right?
Yes. But I was thinking he had already moved them and they had already got new UIDs :)
i have NOT restored them yet .... i have restored a few ones just
to test if it would work .... and indeed it works.
anything that can be done, during the real restoration of them, to
get their 'base filenames' renamed and getting the S= and W= parameters are completly acceptable, as messages are NOT indexed by dovecot yet.
--
Atenciosamente / Sincerily,
Leonardo Rodrigues
Solutti Tecnologia
http://www.solutti.com.br
Minha armadilha de SPAM, NÃO mandem email
gertrudes@solutti.com.br
My SPAMTRAP, do not email it
On 14.7.2010, at 22.09, Leonardo Rodrigues wrote:
anything that can be done, during the real restoration of them, to get their 'base filenames' renamed and getting the S= and W= parameters are completly acceptable, as messages are NOT indexed by dovecot yet.
Maybe the easiest would be:
for file in *; do deliver -u username -m dest-mailbox -p $file done
Em 14/07/2010 19:30, Timo Sirainen escreveu:
Maybe the easiest would be:
for file in *; do deliver -u username -m dest-mailbox -p $file done
that would through everything on INBOX .... there are some folders
on user's Maildir's that i'd like to maintain.
Timo ... is the S= parameter simple the filesize or is there any
other calculation on that ? If i'm not mistaken, the W= is the filesize CR+LFed, which is probably not the real size on Unix filesystems, which is not CR+LFed ....
getting some script that simply rename the files, adding the S=xxx
being xxx the filesize ... would that be ok ?
--
Atenciosamente / Sincerily,
Leonardo Rodrigues
Solutti Tecnologia
http://www.solutti.com.br
Minha armadilha de SPAM, NÃO mandem email
gertrudes@solutti.com.br
My SPAMTRAP, do not email it
On 15.7.2010, at 0.05, Leonardo Rodrigues wrote:
Timo ... is the S= parameter simple the filesize or is there any other calculation on that ?
Yes.
If i'm not mistaken, the W= is the filesize CR+LFed, which is probably not the real size on Unix filesystems, which is not CR+LFed ....
Right.
getting some script that simply rename the files, adding the S=xxx being xxx the filesize ... would that be ok ?
Yeah.
participants (3)
-
Brad Davidson
-
Leonardo Rodrigues
-
Timo Sirainen