How do I delete 50,000 spam e-mails from a user's inbox?

I've tried setting up Thunderbird and doing it in chunks but the client can't handle more than a few hundred at a time or it will hang.
The web client will only allow us to select 50 at a time.
Is there a way I can get in on the server side and delete e-mails that have a common string? Is there an easier way?
Thanks.
Edited by: brad84 on Feb 28, 2008 8:30 AM

edepas wrote:
At the messaging server, run hashdir <username>. This will show the subdirectory under your message store that you should cd to in order to get to your user's mailbox (for example 11/22). For instance, with a single-partition, primary-only store, the message store would be located at <msg-srvr-base>/data/store/partition/primary/=user. Then the user's mailbox would be at <msg-srvr-base>/data/store/partition/primary/=user/11/22. To get to the mail folders, just cd =<username>.An easier way I find to determine the path of a mailbox is to do the following:
./mboxutil -lxp user/<uid>/<mailbox>e.g.
# ./mboxutil -lxp user/user001/INBOX
  msgs  Kbytes last msg         partition   quotaroot mailbox path and acl
     0       0 2008/02/06 02:33 primary         10240 user/user001/INBOX /opt/SUNWmsgsr/data/store/partition/primary/=user/60/d6/=user001 user001 lrswipcda
Once in the mail folders, run an rm -r on the spam folder. You'd need to re-create the spam folder, perhaps using an IMAP connection. If you want to find and remove emails that contain a certain header string, you can do this by using the imexpire utility. For example if you had emails with "Subject: Reminder notice for XYZ event" you would do the following:
1. Create a file with the rule to remove the messages:
cat /tmp/delete.rule
Rule1.regexp: 1
Rule1.folderpattern: user/.*/INBOX
Rule1.Subject: Reminder notice for XYZ event
2. Run the rule in debug mode for the user to confirm it will delete the emails
./imexpire -n -d -v3 -u <username> -f /tmp/delete.rule
e.g.
# ./imexpire -n -d -v3 -u user001 -f /tmp/delete.rule
loading ExpireRule: Rule1
        FolderPattern: user/.*/INBOX
        Subject: Reminder notice for XYZ event
        Action: discard
user/[email protected]/INBOX: exists (1) largest (564) oldest (1204257435) qused (564)
applying ExpireRule: user/[email protected]/INBOX
        Subject: Reminder notice for XYZ event
        Action: discard
deleting user/user001/INBOX UID 100
user/user001/INBOX: deleted 1 messages
3. Once you are happy that the imexpire is behaving correctly, run the same command without the "-n" option.
In the case of spamassassin, the spam folder gets created automatically by the spam filtering software itself.Just to clarify -- it is actually the "fileinto:" sieve filter action in the messaging server option.dat configuration file that causes the emails to get posted into the spam folder. If the spam folder doesn't exist Messaging Server creates it.
Regards,
Shane.

Similar Messages

  • How do I delete 88,000 emails on Mail

    I use the email from my COX Internet provider account on Safari and only once in awhile the MAIL application opens up because, for example, I am sending the link to a Web page to someone. For whatever reason, if I do end up opening MAIL, it takes a long time to open all my various mail account on COX, GMAIL, YAHOO, and download new and old emails.   I see that on, one COX account alone, there are 88,000 messages, mostly unread.  I tried to sort via incoming date and deleting them using select shift to highlight pages of the messages and hitting delete. Even if that works, I see that it will take unacceptable amounts of my time and I might even then have to empty the TRASH on Safari to finally get rid of all of them. That takes more hours when the computer, not me, will be working.
    Anyway, looking at various support pages I've not found out how to delete either all, or most of the old emails on MAIL and still have them on my accounts in the IP Cox mail, gmail and yahoo.  The INBOXES on those are not close to being as bad as the situation on the MAIL app. MAIL seems to have emails back to when I bought the computer.  Maybe if I straighten it out, I might find MAIL more useful.
    Of course, I suppose I could just leave the MAIL inbox full of 88,000 since it does not seem to do any harm, except to make me not want to use MAIL.
    Preferably, it would be nice to clean up the application, but I do not know how.

    Hi Donald,
    click on "Mailbox" then "Restore" (the very last option in the dropdown menu). Mail will empty the inbox (ALL MESSAGES WILL BE DELETED FROM YOUR INBOX) and will try to reload all the messages right from the mail server(s). If you want to keep the inbox empty simply disconnect your computer from the Internet before clicking "Restore" and change the account settings so that Mail doesn't check your accounts on startup and/or automatically (you'll find that in the account settings).
    I hope, this is the solution you were looking for.
    Sebastian

  • BOE XI 3.1: How to batch delete 10,000+ history files?

    Hi,
    Does anyone know how to batch delete 10,000+ history files?
    Thanks,
    Vicky

    If you contact support, they will provide you with a script that fixes this.
    Also, Service Market Place has a note on it about this :
    SAP Business Objects Enterprise Daylight Savings Brief
    Applies to: All Business Objects Enterprise XI r2, and XI 3.x Environments
    Brief: Due to Daylight Savings Time changes that went into effect in North America on March 13, 2011 there is an increased potential of scheduling issues to appear in Business Objects Enterprise XI r2 and XI 3.x environments. If you encounter any potential Daylight Savings Time issues please refer to the SAP Knowledge bases below for potential resolutions and if required please raise a Message for Processing to SAP Active Global Support.
    Business Objects Enterprise XI r2:
    1448881 - Multiple instances spawned after daylight savings time change
    Business Objects Enterprise XI 3.x:
    1568239 - After DST change Schedules fail in Business Objects Enterprise XI 3.1 with: Object could not be scheduled within the specified time interval

  • How do i delete all my contacts in mail address book

    how so i delete all my contacts in mail address book, i have 1,042,000 blank contacts.

    In Lion, the user's LIBRARY folder is hidden. So, it's not visible automatically.
    Open Finder.
    At the menu items at the top of your screen, click on GO (where you see Finder, File, Edit, View, Go, Help)
    Next within the GO options, select the 'Go to Folder' option. You will see a window open to enter text.
    Enter ~/Library and click the GO button.
    Now you'll be in your user LIBRARY where you need to be to get to your address book file previously mentioned.
    You want to open the Application Support folder then from inside there open the AddressBook folder. Then you can follow Barney's instructions.

  • How do i delete  multiple emails at one time from iphone Mail account with iphone 4s?

    how do i delete  multiple emails at one time from iphone Mail account with iphone 4s?

    Better than that!
    http://www.youtube.com/watch?v=fKa-KFjUIGE
    Select a message, hold the move button, deselect the message while still holding the move button.
    A new window appears allowing you to move all messages to the trash.
    Bingo!

  • How do I delete more than 1 email at a time in my inbox - on my iPhone or iPad?

    How do I delete more than 1 email at a time in my inbox - on my iPhone or iPad?
    I've tried "marking" them - but can't move to trash?

    How to Mass Delete Emails from iPhone and iPad Inbox (with video)
    http://suiteminute.com/how-to-mass-delete-emails-from-iphone-and-ipad-inbox/
     Cheers, Tom

  • How do I delete  one item at a time from trash?

    How does one delete one item at a time from trash?

    In general, one doesn't.
    I suggest you create a new folder (I use "Trash Soon") on the desktop near the trash icon. Move all the stuff out of the Trash bin into the Trash Soon Folder. Then move the things you really want to eliminate to the Trash can. Empty Trash.
    DO NOT store anything you want to keep in the real Trash can. There are many activities that may cause "Empty Trash" a a side-effect.
    If you have multiple drives, The Trash is an illusion created for your convenience. The actual Items may be on several different drives, but all marked as "in Trash". Moving them to a folder on a different drive may cause unexpected copying.

  • How can I delete my old app store account from update on my IMac

    How can I delete my old app store account from update on my IMac

    All items that you download from the iTunes store are tied to the account that downloaded them, so only that account can download updates to its apps.
    If you are referring to apps from the Mac App Store then you will be better off asking in the Using Mac App Store forum (this is the iTunes Store forum).

  • How can i delete one of my 5 computers from itunes? i need to rigistre a new computer...

    How can i delete one of my 5 computers from itunes? i need to rigistre a new computer...

    1)  Open itunes on the computer you want to deactivate. Make sure you are logged in.  Under the "Store" menu, pull down top "De-authorize this computer"
    2)  If you no longer have, or access to, the computer(s) you want to deauthorise,
    Log in to iTunes,  go to "view your account info" on the itunes store,
    Deauthorise all five,
    (Please Note: this can only be done Once every 12 months)
    Then re-authorize your current Computer(s) one at a time..
    Authorise / Deauthorise About  > 
    http://support.apple.com/kb/HT1420

  • How do I delete 9.4 GB of email from my ipad?

    How do I delete 9.4 GB of email from my ipad so I have enough space for ios 7?

    You must select all ur mails and delete them at the same time, then go to the trash folder and delete all mails from there too, also delete mails from send folder and from every folder, that make recovery all those GB you have storaged

  • HT5465 how can i delete a contact ( or all contacts ) from i phone ios7 ?

    how can i delete a contact ( or all contacts ) from i phone - ios7.0.2  ?

    The fact that those internal contacts lists aren't editable is an irritation to many. I've submitted feedback to Apple several times on this, asking that in a future OS release they should either
    Provide a way to directly access that list of 'Recent Addressees' and Delete unwanted ones, or
    If not that, then at least mode it so that addressses selected from that list bubble up to the top, therefore over time moving the unused ones down out of sight.
    Other have added their own ideas, and the more they hear on this topic the more likely a future fix will become. If you feel that you would like the change, then put together your best case for it and make your wishes known directly to apple via their established Feedback links:
    http://www.apple.com/feedback/ipad.html

  • Each song on my iTunes has a duplicate. How do I delete all duplicates and prevent this from happening again in the future?

    Each song on my iTunes has a duplicate. How do I delete all duplicates and prevent this from happening again in the future?

    After I had updated to Itunes 11 (also on Windows 7), I had the same experience, but I suspect that it was because I accepted a proposal to set up an external media library in order to simplify security backups. An associated result was that I had lost all of my playlists!
    What I did was to restore the entire library off my Ipod, using a very good program called PodToPC (a free download is available) selecting an option to replace all of the stuff in the Itunes library. I use the Ipod Classic simply because it has a large capacity to hold my collection of CD and Vinyls. No way was I going to modify duplicates of 10000 tracks in 750 playslists by hand!  I did have a few residual problems with some of the playlist specs but, after a few hours of work all was restored.
    I hope this is useful.

  • How do I delete a row in Microsoft Access from a vi using the database toolkit

    Using the database toolkit 1.01 how can I delete a row from my vi

    Bambi,
    I know you already got the answer from Jeremy in the LabVIEW Forum, but I wanted to place this link here so that other users could see the answer.
    How do I delete a row in Microsoft Access from a vi using the database toolkit
    Evan

  • How do I delete all my old itunes library from my iphone 4?

    I bought a new laptop so I created a new Itunes Library. I tried to sync it to my iphone but the old library on my Iphone won't delete. How do I delete it?

    "How do I delete all my apps and pictures from the Ipod Touch? "
    You don't.
    "Also can you set up Find my Ipod through Itunes?:"
    No

  • How can I delete pictures imported on my ipad from my camera with usb jack ?, How can I delete pictures imported on my ipad from my camera with usb jack ?

    How can I delete pictures imported on my ipad from my camera with usb jack ?, How can I delete pictures imported on my ipad from my camera with usb jack ?
    I have hundreds of pictures and I want to delete completely the imported files.
    Thanks

    The links below have instructions for deleting photos.
    iOS and iPod: Syncing photos using iTunes
    http://support.apple.com/kb/HT4236
    iPad Tip: How to Delete Photos from Your iPad in the Photos App
    http://ipadacademy.com/2011/08/ipad-tip-how-to-delete-photos-from-your-ipad-in-t he-photos-app
    Another Way to Quickly Delete Photos from Your iPad (Mac Only)
    http://ipadacademy.com/2011/09/another-way-to-quickly-delete-photos-from-your-ip ad-mac-only
    How to Delete Photos from iPad
    http://www.wondershare.com/apple-idevice/how-to-delete-photos-from-ipad.html
    How to: Batch Delete Photos on the iPad
    http://www.lifeisaprayer.com/blog/2010/how-batch-delete-photos-ipad
    (With iOS 5.1, use 2 fingers)
    How to Delete Photos from iCloud’s Photo Stream
    http://www.cultofmac.com/124235/how-to-delete-photos-from-iclouds-photo-stream/
     Cheers, Tom

Maybe you are looking for