GFI
English Deutsch Français Italiano Nederlands Español
Forums  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Member List  Search  FAQ  Ticket List  Log Out

 

Solution for Not Archiving Spam

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Messaging] >> GFI MailArchiver for Exchange >> Solution for Not Archiving Spam Page: [1]
Login
Message << Older Topic   Newer Topic >>
Solution for Not Archiving Spam - 10.Jun.2008 12:10:16 PM   
FresnoDoug

 

Posts: 34
Joined: 28.Nov.2007
Status: offline
I think I have my solution to prevent MailArchiver from archiving spam. First, I configured as many of the MailEssential filters as possible to simply delete the spam. Then, I changed the filters that were set to "Move to user's junk mail folder" to "Move to subfolder of user's mailbox" and set the folder name to "Junk E-mail."  This has the same effect for the user -- the mail is moved to the Junk E-mail folder -- but the mail is not archived.

Then, I created custom toolbar button named "This is NOT Spam" that the user can click to identify false-positives in the Junk E-mail folder. This button runs a macro that does three things: (1) copy the email to the public "This is legitimate mail" folder; (2) copy the email to the "Archive" mailbox (that's the journaling mailbox); (3) move the email to the user's inbox.

Here is the code:

Public Sub ThisIsNotSpam

   If ActiveExplorer.Selection.count < 1 Then
       MsgBox "Please select a mail item.", vbCritical, "Error"
       Exit Sub
   End If

   Dim valitem As Object
   Set valitem = ActiveExplorer.Selection(1)
   If TypeName(valitem) <> "MailItem" Then
       MsgBox "Please select a mail item.", vbCritical, "Error"
       Exit Sub
   End If

   Dim item As MailItem
   Dim item2 As MailItem
   Dim item3 As MailItem

   Dim gfi As MAPIFolder
   Dim inbox As MAPIFolder
   Dim archive As MAPIFolder
   Dim ns As NameSpace
   
   Set ns = GetNamespace("MAPI")
   Set inbox = ns.GetDefaultFolder(olFolderInbox)
   Set gfi = GetFolder("Public Folders\All Public Folders\GFI AntiSpam Folders\This is legitimate email")
   Dim archiveRecipient As Recipient
   Set archiveRecipient = ns.CreateRecipient("Archive")
   archiveRecipient.Resolve
   Set archive = ns.GetSharedDefaultFolder(archiveRecipient, olFolderInbox)
  
   Dim count As Long
   Dim i As Long
   count = ActiveExplorer.Selection.count
   If count = 0 Then Exit Sub
   For i = 1 To count
       Set item = ActiveExplorer.Selection(1)
       Set item2 = item.Copy
       Set item3 = item.Copy
       item.Move inbox
       DoEvents
       item2.Move gfi
       DoEvents
       item3.Move archive
       DoEvents
   Next

End Sub

So far it seems to be working well.
Post #: 1
RE: Solution for Not Archiving Spam - 10.Jun.2008 2:49:59 PM   
John Letourneau

 

Posts: 907
Joined: 28.Apr.2008
From: Clayton, NC
Status: offline
FresnoDoug,

Thanks for posting this.  I'm sure there are members of this forum that will appreciate your work.

_____________________________

Regards,
John Letourneau - Technical Support Representative
GFI Software - www.gfi.com

(in reply to FresnoDoug)
Post #: 2
RE: Solution for Not Archiving Spam - 8.Jul.2008 2:27:19 AM   
Deriuz

 

Posts: 30
Joined: 1.Jul.2008
Status: offline
are there any alternatives if we didn't use MailEssential filter?

thanks

(in reply to John Letourneau)
Post #: 3
Page:   [1]
All Forums >> [Messaging] >> GFI MailArchiver for Exchange >> Solution for Not Archiving Spam Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


   © 2008. All rights reserved. GFI Software Home Products Download Trials Support Ordering Site Map About Us Contact us
GFI solutions: Exchange anti spam filter - exchange anti virus - isa server - network vulnerability scanner - event log management - USB security software - exchange archiving - fax server software