Update readme and increase to version 1
This commit is contained in:
parent
41611197e8
commit
609e75e43d
3 changed files with 48 additions and 4 deletions
48
README.md
48
README.md
|
@ -10,7 +10,7 @@
|
||||||
sudo python3 setup.py install
|
sudo python3 setup.py install
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows (from PowerShell)
|
### Windows (from PowerShell, untested)
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
& $(where.exe python).split()[0] setup.py install
|
& $(where.exe python).split()[0] setup.py install
|
||||||
|
@ -19,5 +19,49 @@ sudo python3 setup.py install
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
remove_duplicate_imap_messages.py [--debug-level|-d CRITICAL|ERROR|WARNING|INFO|DEBUG|NOTSET] # Other parameters
|
Usage: remove_duplicate_imap_messages.py [OPTIONS]
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-d, --debug-level [CRITICAL|ERROR|WARNING|INFO|DEBUG|NOTSET]
|
||||||
|
Set the debug level for the standard output.
|
||||||
|
-l, --log-file TEXT File to store all debug messages.
|
||||||
|
-n, --dummy Don't do anything, just show what would be
|
||||||
|
done.
|
||||||
|
-s, --imap-server TEXT IMAP server
|
||||||
|
-p, --imap-port INTEGER RANGE IMAP server port [1<=x<=65535]
|
||||||
|
-u, --imap-user TEXT User name to use for the connection to the
|
||||||
|
IMAP server [required]
|
||||||
|
-P, --imap-password TEXT Password to connect to the IMAP server.
|
||||||
|
Warning! Use a configuration file to avoid
|
||||||
|
revelaing your passwords. [required]
|
||||||
|
-S, --ssl BOOLEAN Whether to use a secure connection or not.
|
||||||
|
-m, --mailbox TEXT IMAP mailboxes to check. Will compare
|
||||||
|
messages between all mailboxes. Default:
|
||||||
|
INBOX
|
||||||
|
-m, --method [full|headers] Method to decide messages are duplicated.
|
||||||
|
The 'full' method will check that the whole
|
||||||
|
message and headers are the same. The
|
||||||
|
'headers' method will check that selected
|
||||||
|
headers (with --header) are the same.
|
||||||
|
-f, --header TEXT Fields to compare when method is 'headers'
|
||||||
|
--config FILE Read configuration from FILE.
|
||||||
|
--help Show this message and exit.
|
||||||
```
|
```
|
||||||
|
### The 'full' method.
|
||||||
|
This method will take all information of the message (headers, dates, recipients, sender, subject, body, ...) and create a code (SHA256 hash), if the code is the same for another message then they are consider duplicates.
|
||||||
|
|
||||||
|
### The 'header' method
|
||||||
|
This method will take only the select headers (at least one) and create a code (SHA256 hash), if the code is the same for another message then they are consider duplicates.
|
||||||
|
Some common headers are:
|
||||||
|
- Subject
|
||||||
|
- Body
|
||||||
|
- To
|
||||||
|
- From
|
||||||
|
- Reply-To
|
||||||
|
And there is a RFC (Request For Comments with more) https://www.rfc-editor.org/rfc/rfc2076 but ultimately you can add any custom header to a message with the right client or server tools.
|
||||||
|
|
||||||
|
## Security
|
||||||
|
|
||||||
|
- Try first with the --dummy run to see how many messages will be deleted, because there won't be any prompts and messages get deleted (almost) inmediately.
|
||||||
|
- Don't pass the password in the command line, use the --config file to store parameters and protect it with the right permissions.
|
||||||
|
- Use SSL or your messages and credentials will be visible in your network (and any networks you need to go throw to get to your mail server).
|
||||||
|
|
|
@ -7,7 +7,7 @@ Homepage = "https://susurrando.com"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "remove_duplicate_imap_messages"
|
name = "remove_duplicate_imap_messages"
|
||||||
version = "0.0.2"
|
version = "1.0.0"
|
||||||
description = "Given an IMAP folder look for duplicate messages and optionally delete them"
|
description = "Given an IMAP folder look for duplicate messages and optionally delete them"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [{ name = "Antonio J. Delgado", email = "ad@susurrando.com" }]
|
authors = [{ name = "Antonio J. Delgado", email = "ad@susurrando.com" }]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[metadata]
|
[metadata]
|
||||||
name = remove_duplicate_imap_messages
|
name = remove_duplicate_imap_messages
|
||||||
version = 0.0.2
|
version = 1.0.0
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
packages = remove_duplicate_imap_messages
|
packages = remove_duplicate_imap_messages
|
||||||
|
|
Loading…
Reference in a new issue