Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30

Thread: Message sort order- Change to date sent as in header instead of date received to Zimb

  1. #11
    dijichi2 is offline OpenSource Builder & Moderator
    Join Date
    Oct 2005
    Posts
    1,176
    Rep Power
    12

    Default Importing thunderbird local folders

    hi, i am trying to import thunderbird local mailboxes into a new zimbra account by dragging and dropping, as per top of this thread. the dates are reset because it's creating new messages on the server. has there been a workaround for this suggested yet? there are many corporate and non-corporate situations where the mailboxes are kept locally on the client, some of these are very large mailboxes, and received date is vital for the user to mentally sort and identify messages - this is a critical migration issue, i'm sure someone has come up with a solution? please ?

  2. #12
    Join Date
    Jan 2006
    Posts
    88
    Rep Power
    9

    Default Date Issues

    I feel your pain regarding date handling on migration. Luckily for me, most of my thunderbird users will continue to use POP e-mail, so it's not really a big issue.

    The ones that are using IMAP on our old mail server I will convert to POP3, with the setting enabled to leave messages on the server until deleted locally. Some people prefer the compromise to leave messages on the server for 7 days.

    I can think of some very roundabout methods to do what you want, but they are very raw, and involve migrating the e-mails to another imap server, then running a script i've been using that adds the Zimbra date headers. Then manually copying that mail store over to the zimbra server, and using a recursive mail injection command to dump the files directly onto the server. I dont think this is something you want to do.

    Would be neat if there was a migration tool that used the thunderbird API's.

    Or how about this. What if the zimbra people made a utility in the admin console that let you batch apply the Date: to X-Zimbra-Recieved: header conversion to all messages in a folder. That would be awesome. It could just do a check to see if Date: and X-Zimbra-Recieved are different, and deal with this.

  3. #13
    Join Date
    Jan 2006
    Posts
    15
    Rep Power
    9

    Default

    I haven't found a good workaround for this, but I have found one. Copying messages from local folders in Thunderbird to the Zimbra server results in the dates getting all screwed up when viewed through the Zimbra web client. They still show correctly in other clients.

    Copying messages up from "Personal Folders" in Outlook does _not_ mess up the dates when viewed in the Zimbra web client. So, you could import the mail into Outlook somehow and then copy them up to the IMAP folder. Maybe.

    We should probably also submit a bug report to Mozilla asking for a feature to be added in Thunderbird that will rewrite the dates (if desired) when copying or moving messages to an IMAP server. Anybody think that that is possible?

  4. #14
    Join Date
    Jan 2006
    Location
    Seattle, WA
    Posts
    53
    Rep Power
    9

    Default pop2imap

    KevinH,

    At first I got this error message:

    Use of uninitialized value in concatenation (.) or string at /usr/sbin/pop2imap line 172, <GEN0> line 1536.
    Then I commented out the offending line at it looked like a progression indicator only and only for messages that already existed on both servers:
    Code:
    #print "Found $search[0]\n";
    The logic condition here is based on scalar(@search) being zero, more than zero or "else" (so equal to 1)

    I added a counter $tony so I could see how many were found

    So what seems to happen is when it should hit the "equal to zero" logic(from pop2imap):
    Code:
    $tony=0;
    foreach my $popid (keys(%popmess)) {
    
    my @search = $imap->search("HEADER", "Message-ID", "$popid");
    	if (scalar(@search) == 0) {
    		print	"$popid\n",
    			"No Message-ID Need To Transfer\n",
    			"Pop num : ", $popmess{$popid}, "\n";
    			copypopimap($pop, $imap, $popid);
    		
    	}elsif (scalar(@search) > 1 ) {
    		print "Several Message-ID\n";
    	}else{
    		#print "Found $search[0]\n";
    		$tony += 1;
    		if ($delete) {
    			unless($dry) { 
    				$pop->Delete($popmess{$popid});
    				print "Deletion completed\n";
    			}else{
    				print "Deletion not completed (dry mode)\n";
    			}
    		}
    	}
    }
    print "Found $tony IDs\n";
    $pop->Close();
    $imap->close;
    Nothing at all happens, nothing is printed and copypopimap function is not executed.
    (Yes I also changed Transfert to Transfer)

    The abridged output looks like this:
    From pop3 server [192.168.2.54] port [110] user [tony.hillaire]
    To imap server [192.168.2.70] port [143] user [tony.hillaire@duxarea.com]
    Found [62] pop messages
    1 Message-ID: <20060209232650.12652.qmail@integraonline.com>
    <20060209232650.12652.qmail@integraonline.com>
    ...
    62 Message-ID: <43F21461.5010305@d-vers.nl>
    <43F21461.5010305@d-vers.nl>
    Found 52 IDs

  5. #15
    Join Date
    Jan 2006
    Posts
    17
    Rep Power
    9

    Default

    I was able to work around this error message by commenting out the following lines in the pop2imap script:

    Code:
    foreach my $popid (keys(%popmess)) {
            print "$popid\n";
    #       my @search = $imap->search("HEADER", "Message-ID", "$popid");
    #       if (scalar(@search) == 0) {
    #               print
    #                       "No Message-ID Need Transfert\n",
                            "Pop num : ", $popmess{$popid}, "\n";
                            copypopimap($pop, $imap, $popid);
    
    #       }elsif (scalar(@search) > 1 ) {
    #               print "Several Message-ID\n";
    #       }else{
    #               print "Found $search[0]\n";
                    if ($delete) {
                            unless($dry) {
                                    $pop->Delete($popmess{$popid});
                                    print "Deletion completed\n";
                            }else{
                                    print "Deletion not completed (dry mode)\n";
                            }
                    }
    #       }
    }
    Make sure not to forget to comment out the '}' bracket.

    Note that this breaks the ability of the script to resume an interrupted transfer; because it disables the function that searches the IMAP server to determine if any particular message already exists.

    Looks like you were on the right track to comment out the one line that you mentioned... but apparently its the actual search that is raising errors, not just the printing of the search results.
    Last edited by prosenbl; 02-14-2006 at 12:09 PM.

  6. #16
    Join Date
    Jan 2006
    Location
    Seattle, WA
    Posts
    53
    Rep Power
    9

    Default

    Prosenbl, Ur Awesome! Works like a charm! Many Thanks!

    Quote Originally Posted by prosenbl
    I was able to work around this error message by commenting out the following lines in the pop2imap script:

    Code:
    foreach my $popid (keys(%popmess)) {
            print "$popid\n";
    #       my @search = $imap->search("HEADER", "Message-ID", "$popid");
    #       if (scalar(@search) == 0) {
    #               print
    #                       "No Message-ID Need Transfert\n",
                            "Pop num : ", $popmess{$popid}, "\n";
                            copypopimap($pop, $imap, $popid);
    
    #       }elsif (scalar(@search) > 1 ) {
    #               print "Several Message-ID\n";
    #       }else{
    #               print "Found $search[0]\n";
                    if ($delete) {
                            unless($dry) {
                                    $pop->Delete($popmess{$popid});
                                    print "Deletion completed\n";
                            }else{
                                    print "Deletion not completed (dry mode)\n";
                            }
                    }
    #       }
    }
    Make sure not to forget to comment out the '}' bracket.

    Note that this breaks the ability of the script to resume an interrupted transfer; because it disables the function that searches the IMAP server to determine if any particular message already exists.

    Looks like you were on the right track to comment out the one line that you mentioned... but apparently its the actual search that is raising errors, not just the printing of the search results.

  7. #17
    Join Date
    Nov 2005
    Posts
    518
    Rep Power
    10

    Default

    I can see a possible enhancement may be to have an import mode or something so when you drag messages in from a client like Thunderbird and no INTERNALDATE is set populate it with the Date header.
    Bug 6887 - imap copy - use date header to set internaldate if not already set

  8. #18
    Join Date
    Oct 2006
    Posts
    4
    Rep Power
    9

    Unhappy

    Quote Originally Posted by KevinH
    Most mail clients also use this. Thunderbird is in the minority and ignores INTERNALDATE then uses the Date header in a message. This is a bit more expensive since even to sort an inbox you'd need to fetch and parse each message to get the Date header.
    I hate to hop into a long dead discussion...

    EDITED:

    Here's my issue with this behavior. I routinely deal with a number of IMAP accounts open via a single client and move messages between them as organization requires. This has served me fine for the 10+ years I've used IMAP. And it still works fine even with Zimbra, if i use my IMAP clients.

    But if i do this with Thunderbird the moved message moved will always show up with the wrong date in the Zimbra web interface. Yet it gets even more bizarre: If I use Mail.app to do the same, the received date somehow is preserved, but the message is flagged as new in the web client (not on the imap server).
    Last edited by sdether; 10-07-2006 at 06:42 PM. Reason: Did some more testing with IMAP clients...

  9. #19
    Join Date
    Nov 2006
    Posts
    8
    Rep Power
    8

    Default New firmer POP-only user here...

    I'm a long-time POP-only user with 15 years' worth of archived mail. Eudora has served me well on my Macs over the years, but with their recent announcement to kill the product, I have been forced to seek alternatives. I see neat features in other MUAs that Eudora just never quite got right (like message threading) and I drool.

    I found Zimbra quite by accident. Set up a test server and played around and loved it. The Web Interface is incredible, and I can set up IMAP clients too if I want.

    So I set up a "production" server this morning. I configured my account and setup some server-side mailboxes into which I would transfer some of my local mail. (It's ALL local, because I have never used IMAP before!) Fortunately I chose something innocuous: my BUGTRAQ archive for the last year or so. Some 6300 messages. I selected all and dragged to the server-side mailbox and waited as Eudora contemplated this hefty transaction. A few minutes later the messages started their journey. I watched in utter dismay as the message started to appear in Zimbra as if they were all dated TODAY!! On the other hand, I was relieved that I hadn't chosen something I consider more "critical" to my Daily Productivity as a test case.

    I patiently waited for the copy (move, really) to finish and then viewed the server-side mailbox with Eudora (after several more minutes of re-synchronizing) and was relieved to see that Eudora still gets it right and is showing me the "Date Sent" and sorting accordingly.

    If the option to sort/list by "Date Sent" instead of "Date Received" isn't incorporated in the Zimbra interface, well, it's going to be useless to me. I would find this very unfortunate, as I love all other aspects of it! Now it may be that ANY IMAP server I try this with will react the same way. I don't know. If that's the case, well, I guess I'm stuck in POP-land forever. May my MacBook never die...

  10. #20
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    Default Try doing the copy with the Thunderbird hack on

    IMAP clients are supposed to copy over INTERNALDATE when they copy a message from one mailstore into another. Thunderbird doesn't, and evidently your version of Eudora doesn't, either.

    Bad IMAP client! No biscuit!

    Anyway, we do have a workaround for this. Instead of logging into IMAP as "user" or "user@example.com", log in as "user/tb" or "user@example.com/tb". Then do the copy. The Zimbra server will set INTERNALDATE from the Date header instead of the INTERNALDATE specified on the IMAP APPEND, and you should be happy again.
    Bugzilla - Wiki - Downloads - Before posting... Search!

Similar Threads

  1. Zimbra fails after working for 2 weeks
    By Linsys in forum Administrators
    Replies: 10
    Last Post: 10-07-2008, 12:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •