Bulk restore with confirmation. Bulk restore to another address.

Issue #196 resolved
andrey_khlebnikov created an issue

Hello!

I'm using mailpiler 0.1.24. It works pretty good, but I want to propose some enhancements.

It'll be very useful if you'll add a confirmation query after "Bulk restore selected emails" button press. Today I accidentally pressed this button and some emails were restored to appropriate senders, but I didn't want it :)

Also, It will be great if you add an ability to specify another email address to restore emails from archive. It is nesessary to restore emails into sender's mailbox, as by default piler restores them into receivers' mailboxes.

And, one more, when I need to restore many emails from/to one particular user, I need to select them by 10/20/30/50 items. But what if an user sent/received some hundreds of emails and all them have to be restored? So, can you add an ability to display all found messages in one window?

Thank you!

Comments (15)

  1. Janos SUTO repo owner

    Is it OK, if the confirmation can be enabled by a config option? Btw. a normal user or an auditor user restored the message to the sender(s)?

  2. andrey_khlebnikov reporter

    Yes, a config option for enabling the confirmation query will be enough. As for the second question, I tried to restore emails under auditor's account.

  3. andrey_khlebnikov reporter

    sorry for my mistake... here: "Today I accidentally pressed this button and some emails were restored to appropriate senders, but I didn't want it" must be this: "Today I accidentally pressed this button and some emails were restored to appropriate receivers, but I didn't want it"

  4. Janos SUTO repo owner

    OK, thanks for the clarification. Btw. didn't you have to check some boxes to select the recipients before restoring any email?

  5. andrey_khlebnikov reporter

    Hmm, not sure if I understand you right. I checked not some boxes, but all of them. An user asked me to restore all her emails which she sent in a period of two months. The piler showed me 146 emails from that user for a given period of time. So I checked all of boxes.

  6. Janos SUTO repo owner

    OK, now I get it. I thought you wanted to restore a single email by clicking on the restore link on the preview pane, but I was wrong.

    So when clicking on the "restore selected emails" button in the middle, you want a confirmation dialogue box, and you want to specify an email address where to restore all the selected emails, right?

    If so, then I propose that by clicking on the "restore selected emails" button, then a (jquery) modal box or something appears with a text field where you can type an email address.

    Btw. I believe that this feature should be available only to auditors. What do you think?

  7. andrey_khlebnikov reporter

    Yes, you're right, I propose to add a confirmation dialog box with text field for email address. I think this must be only for auditor role, but my opinion in this case is not objective, as I don't grant access to the piler for users, but only for mail system backup operators and security auditors.

  8. Janos SUTO repo owner

    OK, I've just added a dirty hack to implement this feature. It's a plain javascript prompt window shown for auditors. It asks an email address, and tries to forward selected emails to that address.

    Note that if you don't enter a value just hit "OK", then it still tries to restore to all recipients. Perhaps this behaviour should be tuned.

    So please download the latest master branch, and try it. Make sure you have SMARTHOST set in config.php.

  9. Janos SUTO repo owner

    OK, I've improved it to use jquery modal for a visually nicer solution. If you don't enter an address, then it won't restore anything.

  10. Log in to comment