Do not warn about duplicate Message-IDs by default.
This commit is contained in:
parent
1b7ab09f24
commit
4fdde09fc4
10
README
10
README
|
@ -3,8 +3,8 @@ archivemail - archive and compress old mail in your mailbox
|
||||||
|
|
||||||
'archivemail' is a tool written in Python for organising and storing old
|
'archivemail' is a tool written in Python for organising and storing old
|
||||||
email choking any of your mailboxes. It can move messages older than a
|
email choking any of your mailboxes. It can move messages older than a
|
||||||
certain number of days to a separate 'archive' mailbox which can be
|
certain number of days to a separate 'archive' mbox-format mailbox which
|
||||||
compressed with bzip2, gzip or compress.
|
can be compressed with bzip2, gzip or compress.
|
||||||
|
|
||||||
For example, have you been subscribing to the 'linux-kernel' mailing list
|
For example, have you been subscribing to the 'linux-kernel' mailing list
|
||||||
for the last 6 years and ended up with an 160-meg mailbox that 'mutt' is
|
for the last 6 years and ended up with an 160-meg mailbox that 'mutt' is
|
||||||
|
@ -16,6 +16,6 @@ just the most recent messages.
|
||||||
overhead on your mail reader. The number of days before mail is considered
|
overhead on your mail reader. The number of days before mail is considered
|
||||||
'old' is up to you, but the default is 180 days.
|
'old' is up to you, but the default is 180 days.
|
||||||
|
|
||||||
'archivemail' currently works on mbox-format mailboxes, and requires python
|
'archivemail' currently works on mbox-format and maildir-format mailboxes,
|
||||||
v2.0 or greater. It also supports deleting old mail instead of archiving
|
and requires python v2.0 or greater. It also supports deleting old mail
|
||||||
it. It currently only works on Unix platforms.
|
instead of archiving it.
|
||||||
|
|
|
@ -35,8 +35,8 @@ import tempfile
|
||||||
import time
|
import time
|
||||||
|
|
||||||
# global administrivia
|
# global administrivia
|
||||||
__version__ = "archivemail v0.10"
|
__version__ = "archivemail v0.1.0"
|
||||||
__rcs_id__ = "$Id$"
|
__cvs_id__ = "$Id$"
|
||||||
__copyright__ = """Copyright (C) 2002 Paul Rodger <paul@paulrodger.com>
|
__copyright__ = """Copyright (C) 2002 Paul Rodger <paul@paulrodger.com>
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."""
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."""
|
||||||
|
@ -121,7 +121,6 @@ class StaleFiles:
|
||||||
class Options:
|
class Options:
|
||||||
"""Class to store runtime options, including defaults"""
|
"""Class to store runtime options, including defaults"""
|
||||||
archive_suffix = "_archive"
|
archive_suffix = "_archive"
|
||||||
warn_duplicates = 1
|
|
||||||
compressor = None
|
compressor = None
|
||||||
compressor_extension = None
|
compressor_extension = None
|
||||||
days_old_max = 180
|
days_old_max = 180
|
||||||
|
@ -135,6 +134,7 @@ class Options:
|
||||||
script_name = os.path.basename(sys.argv[0])
|
script_name = os.path.basename(sys.argv[0])
|
||||||
use_modify_time = 0
|
use_modify_time = 0
|
||||||
verbose = 0
|
verbose = 0
|
||||||
|
warn_duplicates = 0
|
||||||
|
|
||||||
def parse_args(self, args, usage):
|
def parse_args(self, args, usage):
|
||||||
"""Set our runtime options from the command-line arguments.
|
"""Set our runtime options from the command-line arguments.
|
||||||
|
@ -152,12 +152,14 @@ class Options:
|
||||||
["bzip2", "compress", "days=", "delete",
|
["bzip2", "compress", "days=", "delete",
|
||||||
"dry-run", "gzip", "help", "output-dir=",
|
"dry-run", "gzip", "help", "output-dir=",
|
||||||
"quiet", "suffix", "modify-time", "verbose",
|
"quiet", "suffix", "modify-time", "verbose",
|
||||||
"version"])
|
"version", "warn-duplicate"])
|
||||||
except getopt.error, msg:
|
except getopt.error, msg:
|
||||||
user_error(msg)
|
user_error(msg)
|
||||||
for o, a in opts:
|
for o, a in opts:
|
||||||
if o == '--delete':
|
if o == '--delete':
|
||||||
self.delete_old_mail = 1
|
self.delete_old_mail = 1
|
||||||
|
if o == '--warn-duplicate':
|
||||||
|
self.warn_duplicates = 1
|
||||||
if o in ('-n', '--dry-run'):
|
if o in ('-n', '--dry-run'):
|
||||||
self.dry_run = 1
|
self.dry_run = 1
|
||||||
if o in ('-d', '--days'):
|
if o in ('-d', '--days'):
|
||||||
|
@ -460,11 +462,11 @@ Options are as follows:
|
||||||
-m, --modify-time use file last-modified time as date for maildir messages
|
-m, --modify-time use file last-modified time as date for maildir messages
|
||||||
-n, --dry-run don't write to anything - just show what would be done
|
-n, --dry-run don't write to anything - just show what would be done
|
||||||
-o, --output-dir=DIR directory where archive files go (default: current)
|
-o, --output-dir=DIR directory where archive files go (default: current)
|
||||||
--ignore-dupe don't warn about mailboxes with duplicates messages
|
|
||||||
-z, --gzip compress the archive(s) using gzip (default)
|
-z, --gzip compress the archive(s) using gzip (default)
|
||||||
-I, --bzip2 compress the archive(s) using bzip2
|
-I, --bzip2 compress the archive(s) using bzip2
|
||||||
-Z, --compress compress the archive(s) using compress
|
-Z, --compress compress the archive(s) using compress
|
||||||
--delete delete rather than archive old mail (use with caution!)
|
--delete delete rather than archive old mail (use with caution!)
|
||||||
|
--warn-duplicate warn about duplicate Message-IDs in the same mailbox
|
||||||
-v, --verbose report lots of extra debugging information
|
-v, --verbose report lots of extra debugging information
|
||||||
-q, --quiet quiet mode - print no statistics (suitable for crontab)
|
-q, --quiet quiet mode - print no statistics (suitable for crontab)
|
||||||
-V, --version display version information
|
-V, --version display version information
|
||||||
|
|
Loading…
Reference in New Issue