mail restores multiple times

Issue #569 resolved
Crzaccount created an issue

Hi Janos,

  We are trying to restore the 8 MB mail over imap (non ssl). That mail has multiple recipients (3-4 recipients).

When i click on restore this mail is restoring 3 times to INBOX.

If i check for any other mail which has multiple recipient as well as less size, that mail is restoring only once.

What could be the issue ? Pls suggest.

my piler version is below

##Start piler 1.1.0, build 884, Janos SUTO sj@acts.hu

Build Date: Wed Apr 29 15:23:04 IST 2015 ldd version: ldd (GNU libc) 2.5 gcc version: gcc version 4.1.2 20080704 (Red Hat 4.1.2-54) Configure command: ./configure --localstatedir=/var --with-database=mysql ###End

Comments (8)

  1. Crzaccount reporter

    More clarification as follows.

    sender: user1@domain.com

    to: user2@domain.com cc: user3@domain.com, user4@domain.com

    Restore the mail by logging user1@domain.com. Totally 3 mail will restore (i suspect based on recipient) in user1@domain.com INBOX

    Restore the mail by loggin user2@domain.com. Only one mail will restore in user2@domain.com INBOX. Samething will happen for user3@domain.com & user4@domain.com respectively.

    It seems, if sender is trying to restore the mail, it is restoring with the number of recipient in that mail.

    Pls have a look @ it & update me.

  2. Janos SUTO repo owner

    I'm not sure the email size affects the number of restored emails. I'd like to see some imap logs, also check the imap traffic to prove that it's the fault of the piler gui.

  3. Crzaccount reporter

    email size is not the problem. just now i found that. I had given the detail instruction above. Pls look @ it.

  4. Crzaccount reporter

    I shall show you the screen. Pls come to skype

    NOTE: The problem with "bulk restore" by selecting the mails using checkbox

  5. Janos SUTO repo owner

    The following diff fixes it:

    diff --git a/model/search/search.php b/model/search/search.php
    index 1335ff7..f14f657 100644
    --- a/model/search/search.php
    +++ b/model/search/search.php
    @@ -820,7 +820,7 @@ class ModelSearchSearch extends Model {
                 if(ENABLE_FOLDER_RESTRICTIONS == 1) {
                    if(in_array($q['folder'], $session->get("folders"))) { array_push($result, $q['id']); }
                 }
    -            else {
    +            else if(!in_array($q['id'], $result)) {
                    array_push($result, $q['id']);
                 }
              }
    
  6. Log in to comment