Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-12-2011, 07:58 AM
Loyal Member
 
Posts: 83
Default Date Received after Restore from Backup

A while back I lost my server hard drive without a recent backup. I restored mail from local IMAP cache's with not a little difficulty. The problem is that a ton of the mail messages are showing the date received as the date I restored from backup. A quick look at the headers and there is no received date.

I found a script that is supposed to look at a mailbox on a mail server and change the local file date to the same. But looking at the Zimbra directory structure, I am unsure that this is standard and will work. The script is found here: Fixing mail.app’s IMAP date problem | MostlyGeek - Gabriel - Web Design, Development and Business

Questions:

1. Will this script work with Zimbra?
A. If so, how do I determine a particular user's mailbox directory to point the script to?

2. Is there a different way with Zimbra I can fix this?

Thanks,

Kazooless
Reply With Quote
  #2 (permalink)  
Old 07-12-2011, 08:10 AM
Zimbra Consultant & Moderator
 
Posts: 20,314
Default

Here's a script (from a forum search) that has details of what needs changing in the email, you might be able to make use of it.
__________________
Regards


Bill

Last edited by phoenix; 07-13-2011 at 08:11 AM..
Reply With Quote
  #3 (permalink)  
Old 07-13-2011, 07:58 AM
Loyal Member
 
Posts: 83
Default

Is this the script you mention?

Update Received Date in Folder-Listing
Reply With Quote
  #4 (permalink)  
Old 07-13-2011, 08:11 AM
Zimbra Consultant & Moderator
 
Posts: 20,314
Default

Quote:
Originally Posted by kazooless View Post
Is this the script you mention?

Update Received Date in Folder-Listing
Yes, that's the one - sorry I forgot to add the link for it.
__________________
Regards


Bill
Reply With Quote
  #5 (permalink)  
Old 07-13-2011, 08:20 AM
Loyal Member
 
Posts: 83
Default

Thanks for the quick reply. I had to install ksh to get this to run at all. I am guessing it used to be part of Ubuntu 8.04 but on 10.04 it isn't there. Easy fix though.

However, I can't get it to run right. I'm not sure what I'm missing. Here is my output from running it. I don't see the folder id in the output and maybe that is what I need?? i have replaced my real domain name with the word "example." In one place near the bottom it just had the first three letters of my domain, so I put in "exa" in its place.


root@mail:~# ./fix_dates_zimbra.ksh
usage: [FOLDER_ID=nnnn] fix_dates_zimbra.ksh username
(to list the folders for a user: echo -e "sm username@yourdomain.com\\ngaf" | su - zimbra -c zmprov)
root@mail:~# echo -e "sm jeff@example.com\\ngaf" | su - zimbra -c zmprov
prov> sm jeff@example.com
mailbox: jeff@example.com, size: 2.58 GB, messages: 45869, unread: 1108
mbox jeff@example.com> gaf
Id View Unread Msg Count Path
---------- ---- ---------- ---------- ----------
1 unkn 0 0 /
16 docu 0 0 /Briefcase
10 appo 0 0 /Calendar
14 mess 0 0 /Chats
7 cont 0 6 /Contacts
6 mess 0 0 /Drafts
13 cont 0 15 /Emailed Contacts
2 mess 3 1323 /Inbox
194610 mess 0 63 /Inbox/2002 and earlier
236859 mess 0 613 /Inbox/2003
235865 mess 0 803 /Inbox/2004
234548 mess 0 1229 /Inbox/2005
229701 mess 0 4705 /Inbox/2006
225389 mess 0 4223 /Inbox/2007
220755 mess 0 4504 /Inbox/2008
216127 mess 0 3908 /Inbox/2009
170405 mess 0 2346 /Inbox/2010
64697 mess 0 513 /Inbox/Kathy Lee
848 mess 0 932 /Inbox/Receipts
27651 unkn 0 0 /Inbox/Z_Archive
36865 mess 0 0 /Inbox/Z_Archive/Africa
29404 mess 0 0 /Inbox/Z_Archive/BLBG
27652 mess 0 0 /Inbox/Z_Archive/Family
35404 mess 0 0 /Inbox/Z_Archive/Family/Africa
28159 mess 0 0 /Inbox/Z_Archive/Family/Trip
29114 mess 0 0 /Inbox/Z_Archive/Poker
29308 mess 0 0 /Inbox/Z_Archive/RCI
42773 mess 0 0 /Inbox/Z_Archive/Smart Alerts
4 mess 1105 1106 /Junk
361 wiki 0 0 /Notebook
362 mess 0 6 /Notes
5 mess 0 19556 /Sent
15 task 0 0 /Tasks
3 unkn 0 18 /Trash
194472 mess 0 0 /Trash/Pre-2010
mbox jeff@exa./fix_dates_zimbra.ksh jeff
\nerror: can't find mailbox ID for user jeff@yourdomain.com!!!
root@mail:~#
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.