Always keep Junk Mail folder empty in Outlook 2007

Posted on 2009-05-01
Last Modified: 2012-08-13
We currently have SBS 2003 with only a handful of clients.  One person in management is insisting to have an empty junk mail folder.  We currently have Vamsoft installed which tags all spam as ***SPAM***.  

When I select "Permanently delete suspected junk-email instead of movitin it to the Junk E-Mail folder" in the Junk Mail Settings, it doesn't work... but that's what we need it to do.  
Question by:erikandre
    LVL 15

    Expert Comment

    Create an outlook rule that checks the subject for ***SPAM*** and set the rule to delete the email.


    Author Comment

    Well, I have that in place, however, the Junk Mail folder still collects the emails and does nothing.  I think the rules only apply to messages that were not already pre-sorted into the Junk Mail folder.
    LVL 15

    Accepted Solution

    You could set archiving on the junk mail folder, to autoarchive anything over 1 day old, and delete it instead of saving it.  That's in the folder properties, archive tab.

    You can create a macro to do it at the touch of a button:

    LVL 76

    Assisted Solution

    by:David Lee
    Hi, erikandre.

    How about a macro that deletes items as they hit the junk mail folder?  Something like the code in the snippet.  It will delete items as they arrive in the junk mail folder.  Follow these instructions to use it.

    1.  Start Outlook
    2.  Click Tools->Macro->Visual Basic Editor
    3.  If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
    4.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
    5.  Edit the code as needed.  I included comment lines wherever something needs to or can change
    6.  Click the diskette icon on the toolbar to save the changes
    7.  Close the VB Editor
    8.  Click Tools > Trust Center
    9.  Click Macro Security
    10. Set Macro Security to "Warnings for all macros"
    11. Click OK
    12. Close Outlook
    13. Start Outlook.  Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run.  Say yes.

    Dim WithEvents olkFolder As Outlook.Items
    Private Sub Application_Quit()
        Set olkFolder = Nothing
    End Sub
    Private Sub Application_Startup()
        Set olkFolder = Outlook.Session.GetDefaultFolder(olFolderJunk).Items
    End Sub
    Private Sub olkFolder_ItemAdd(ByVal Item As Object)
    End Sub

    Open in new window

    LVL 3

    Assisted Solution

    Disable junk email filtering in your Outlook.
    Tools | Options | Junk E-mail | No Automatic Filtering. And make sure
    your Blocked Senders list is empty.

    Now your Outlook rule should work.


    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Email statistics and Mailbox database quotas You might have an interest in attaining information such as mailbox details, mailbox statistics and mailbox database details from Exchange server. At that point, knowing how to retrieve this information …
    Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
    In this video we show how to create a Distribution Group in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >>…
    In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now