Skip to content

Commit

Permalink
Add readme file, rename license file.
Browse files Browse the repository at this point in the history
  • Loading branch information
n3wjack committed Jul 6, 2020
1 parent 9649bf9 commit 7f6427b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
File renamed without changes.
36 changes: 36 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# IMAP Cleanup

IMAP Cleanup is a small .NET Core application to cleanup an IMAP inbox and leave only a number of most recent messages behind.

It uses SSL by default to connect to the IMAP server.

## Requirements

You need to have the .NET Core 3.1 SDK installed to build this. You can use Visual Studio Community edition to build it.

## Building

There are 3 way to build the project.

1. Use Visual Studio.
2. Run the `build.cmd` script to build a Windows 64-bit self-contained executable.
3. Use the `dotnet` tool from the command line: `dotnet build ImapCleanup.sln`

## Usage

Once built, you can call the executable using command line arguments to point it to your IMAP inbox, like this:

.\ImapCleanup.exe --hostname imap.mailserver.com --port 993 --username jack@foobar.com --password horsestaplebattery --count 500

This will delete all messages, except the 500 most recent ones.

For help, use `.\ImapCleanup.exe /?`

## Disclaimer

This tool deletes emails. **USE AT YOUR OWN RISK.**

This little tool works fine for me. It deletes the oldest messages, leaves the right ones and that's it.
I haven't tested this thoroughly on every possible email server and IMAP configuration in the world. So if this ends up deleting vital emails you're on your own I'm afraid.
Before you point this to anything critical, test it on a dummy inbox with some test emails, just to be sure.

0 comments on commit 7f6427b

Please sign in to comment.