If you have a list of person that you send mail to you will experiense soon or later that mail will bounce.When people change their mail adresses, quit etc you need to check your adresses.
One way are to use PowerShell to look in an mailbox for Undeliverable mails and then make a list of themwithout duplicates.
$olApp = New-Object -com Outlook.Application$namespace = $olApp.GetNamespace("MAPI")$myMailbox = $namespace.Folders.Item("Mailbox - My Mailbox")$myInbox = $myMailbox.Folders.Item("Inbox")$myFolder = $myInbox.Folders.Item("System med")
foreach ($myitems in $myFolder.items){ if ($myitems.subject = "Undeliverable") { $mytest = $myitems.body | Out-File -FilePath "c:\mail.txt" -Append } }
$topers = Select-String -Path "c:\mail.txt" -Pattern "To: <"$topers | foreach {$_ -replace ">", "" -replace "To: <", "" -replace "c:\\mail.txt:","" -replace "\d","" -replace ":",""} | Out-File -FilePath "c:\topers.txt" -Append
Get-Content c:\topers.txt | Select-Object -Unique | Out-File -FilePath "c:\bounce.txt" -Append