Results 1 to 5 of 5

Thread: [SOLVED] How to delete mails

Hybrid View

  1. #1
    Join Date
    Jun 2008
    Location
    Chile
    Posts
    39
    Rep Power
    7

    Default [SOLVED] How to delete mails

    Hi

    I want to test my new server with an mass email sender,

    Is there any command to clean up and erase all the test messages for all the users, I have 650 users on this server and I dont want go checking and deleting them all by hand.

    Thanks

    PD. Sorry for my bad english

  2. #2
    Join Date
    Jul 2007
    Location
    Baltimore
    Posts
    1,649
    Rep Power
    11

    Default

    if all the accounts will just have e-mail in their inbox, then you could run a script that empties the inbox folder of every user using zmmailbox. a scrdipt of something like this (run as zimbra user)

    disclaimer: the following code is untested, written off the top of my head, and is probably not the most efficient way to do things, it's just meant to give you an idea of how to do stuff

    Code:
    #!/bin/bash
    
    for i in `zmprov gaa`
    do
    zmmailbox -z -m $i ef /Inbox
    done

  3. #3
    Join Date
    Jun 2008
    Location
    Chile
    Posts
    39
    Rep Power
    7

    Default

    Thanks

    It seems to work, but can you explane to me what exactly does this line do

    for i in `zmprov gaa`

  4. #4
    Join Date
    Jul 2007
    Location
    Baltimore
    Posts
    1,649
    Rep Power
    11

    Default

    zmprov gaa gets is short for getAllAccounts. So it gets all the account names and sets $i to the next account name each time the loop processes. you are passing teh account name to zmmailbox to tell it which account to empty the inbox for

  5. #5
    Join Date
    Jun 2008
    Location
    Chile
    Posts
    39
    Rep Power
    7

    Default

    Thanks.

    Just tested the server sending 5000 localmails.
    The memory usage vent to 5 GB, and it took it like 15 min.
    the strange ting is that 10 min after this test, the memory still not released, and still 5 gb while the server not in use.
    Is this normal???

Similar Threads

  1. Delete spam mails from queue
    By sandiphw in forum Administrators
    Replies: 15
    Last Post: 11-01-2012, 10:07 AM
  2. Replies: 1
    Last Post: 10-03-2008, 02:30 PM
  3. Replies: 5
    Last Post: 06-18-2008, 01:50 AM
  4. Delete Mails on Hold
    By yusufu in forum Administrators
    Replies: 0
    Last Post: 06-06-2008, 04:38 AM
  5. "NO APPEND failed" message when migrating mails
    By tkrag@mostlyharmless.dk in forum Administrators
    Replies: 8
    Last Post: 05-18-2007, 06:25 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
  •