Deleting emails from a sender after x days?

I accomplished this by creating a new rule that automatically moved all emails from a specific sender into a folder.

This folder then had AutoArchive (Right click folder, Properties) set up to permanently delete items older than x days.


Using the outlook scheduler you can add a task to delete all emails from folders older than a certain amount of time. Also in the same rule you can empty the trash of all items older than a certain amount of time. Automate when it runs and you have solved your problem. On my mac the scheduler lives under the tools menu.

enter image description here


Here's another way to do this natively via Outlook that's not posted here. I've referenced and quoted the source to preserve the content here since I've found this detail helpful in helping others with this same task in the past in both a business and home based environments.

Create a rule to delete mail after a number of days

You can combine a Rules Wizard rule with the AutoArchive feature of Microsoft Outlook to automatically delete messages as they age. There are two ways you can do this:

  1. Create a rule that moves messages meeting certain criteria to a folder. Configure the folder's Archive setting to delete messages.
  2. Setting an expire date on messages as they arrive.

In either case, AutoArchive will delete the messages for you once they age.

If you need help configuring autoarchive settings, watch the tutorial: Configuring AutoArchive settings in Microsoft Outlook.

Move messages to a new folder

  1. Create a rule that moves messages to a folder.
  2. Switch to this folder, then right click on the folder and choose Properties.
  3. On the AutoArchive tab, choose how often to clean out items and whether they should be archived or deleted.

enter image description here

Set an expiration date on the messages

Follow these steps to create a run a script rule to add an expire date and then configure AutoArchive to delete the messages.

When a message is expired it's displayed in the message list in a gray strikethrough font.

Check macro security settings. Macro security should be set to Low during testing. Once you verify the macro works, you can use SelfCert to sign the macro, at which point you will change the security setting to allow signed macros only.

In Outlook 2010 and 2013, click File, Options, Trust Center. Click the Trust Center Settings button then Macro Security. Select the bottom option for Low security. In Outlook 2007, look on the Tools menu for Trust Center, then Macro Security. In older versions of Outlook, go to Tools, Macros, Macro Security.

  1. Press Alt+F11 to open the VBA Editor.
  2. Right click on Project1 and choose Insert > Module
  3. Add the macro below to the new module.
  4. Create a rule, selecting Run a Script as the action. If you set all of the conditions in the rule, you can delete the If...Then and End If lines.
  5. Create a filter for your view that hides expired messages between AutoArchive runs.

enter image description here

  1. Configure AutoArchive to delete expired messages

enter image description here

The macro will set the message to expire in 1 day. You can use .5 to expire the message after 12 hours.

If you use conditions in the rule to filter the messages, you can remove the If...Then and End If lines from the code.

Sub SetExpire(Item As Outlook.MailItem)

If Left(LCase(Item.Subject), 7) = "weather" Then
    Item.ExpiryTime = Now + 1
    Item.Save
End If

End Sub

source