none
deleting emails with a specific subject from a single user mailbox RRS feed

  • Question

  • we are exchange 2007 on SP1. we do not have an edge server, only a hub server.

    A user mailbox was flooded with 11000 "Undeliverable:" emails in the last 2 days, the source being "DSA". I am still finding out why this has happened. As for now, I have set up a rule to silently drop all emails with this specific subject.

    now the user wanted our team to delete all of these 11000 emails from his mailbox.

    we gave the appropriate permission to the users mailbox by running the command

    Get-Mailbox -Identity “abc@domain.com” | Add-MailboxPermission -User itadmin@domain.com -AccessRights FullAccess -InheritanceType all

    Then I ran the below command

    Get-Mailbox -Identity “abc@domain.com” | Export-Mailbox -SubjectKeywords "Undeliverable:" -IncludeFolders "\Inbox" -StartDate "09/22/2014" -EndDate "09/23/2014" -DeleteContent -Confirm:$false

    The command ran for a while, showing it was deleting 19000 odd emails with the below summary


    [PS] C:\Windows\System32>Get-Mailbox -Identity "abc@domain.com" | Export-Mailb
    ox -SubjectKeywords "Undeliverable:" -IncludeFolders "\Inbox" -StartDate "09/22/
    2014" -EndDate "09/23/2014" -DeleteContent -Confirm:$false



    TargetMailbox                    :
    TargetServer                     :
    TargetDatabase                   :
    MailboxSize                      : 733800KB
    IsResourceMailbox                : False
    SIDUsedInMatch                   :
    SMTPProxies                      :
    SourceManager                    :
    SourceDirectReports              :
    SourcePublicDelegates            :
    SourcePublicDelegatesBL          :
    SourceAltRecipient               :
    SourceAltRecipientBL             :
    SourceDeliverAndRedirect         :
    MatchedTargetNTAccountDN         :
    IsMatchedNTAccountMailboxEnabled :
    MatchedContactsDNList            :
    TargetNTAccountDNToCreate        :
    TargetManager                    :
    TargetDirectReports              :
    TargetPublicDelegates            :
    TargetPublicDelegatesBL          :
    TargetAltRecipient               :
    TargetAltRecipientBL             :
    TargetDeliverAndRedirect         :
    Options                          : DeleteSourceContent
    SourceForestCredential           :
    TargetForestCredential           :
    TargetFolder                     :
    PSTFilePath                      :
    RsgMailboxGuid                   :
    RsgMailboxLegacyExchangeDN       :
    RsgMailboxDisplayName            :
    RsgDatabaseGuid                  :
    StandardMessagesDeleted          : 0
    AssociatedMessagesDeleted        : 0
    DumpsterMessagesDeleted          : 19020
    MoveType                         : DeleteOnly
    MoveStage                        : Completed
    StartTime                        : 9/23/2014 7:29:01 PM
    EndTime                          : 9/23/2014 7:32:19 PM
    StatusCode                       : 0
    StatusMessage                    : Messages have been deleted from the source m
                                       ailbox.
    ReportFile                       : C:\Program Files\Microsoft\Exchange Server\L
                                       ogging\MigrationLogs\export-Mailbox20140923-
                                       192900-8103154.xml

    However, when I open the user's mailbox all of the emails still exist. kindly help me understand where I am going wrong and how I can delete all these emails.

    Thank You

    Philip

    Tuesday, September 23, 2014 5:11 PM

Answers

  • Hi,

    Please make sure you have the proper permission before run Export-Mailbox cmdlet.
    1. Exchange Server Administrator role and local Administrator group for the target server.
    2. Full access to the source and target mailboxes.

     

    Best Regards,
    Allen Wang

    Thursday, September 25, 2014 1:29 PM
    Moderator

All replies

  • Are they still specifically in the Inbox?

    I was thinking that the account might have "Deny" permissions to the user's mailbox but it looks like it can access the mailbox and delete items.

    StandardMessagesDeleted          : 0
    AssociatedMessagesDeleted        : 0
    DumpsterMessagesDeleted         : 19020


    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

    Tuesday, September 23, 2014 5:52 PM
  • Yes they are all sitting in the inbox
    Tuesday, September 23, 2014 7:41 PM
  • Hi,

    Please make sure you have the proper permission before run Export-Mailbox cmdlet.
    1. Exchange Server Administrator role and local Administrator group for the target server.
    2. Full access to the source and target mailboxes.

     

    Best Regards,
    Allen Wang

    Thursday, September 25, 2014 1:29 PM
    Moderator
  • Dear Allen, 

    Commandlet Seach-Mailbox appeared only in Exchange 2010 if i am not mistaken...

    Sunday, October 5, 2014 6:00 AM
  • Hi Akelsey,

    Thanks for your notification, I have modified my post above.

     

    Thanks

    Sunday, October 5, 2014 6:24 AM
    Moderator