Commit Graph

349 Commits

Author SHA1 Message Date
Nikolaus Schulz b7091e90ea Releasing 0.8.0: fix release date in the changelog, and update the project web page 2010-08-09 13:25:41 +02:00
Nikolaus Schulz 945c4bb28e MANIFEST.in: distribute NEWS 2010-08-09 13:16:14 +02:00
Nikolaus Schulz 40a5e6a9f9 Add new file NEWS, gathering noteworthy changes from the changelog 2010-08-09 13:14:23 +02:00
Nikolaus Schulz 5d5408dcd2 Remove release notes
This file is not really suitable to put into a revision control system.
2010-08-09 13:12:13 +02:00
Nikolaus Schulz 5fb60dd522 Regenerate manpage from sgml source 2010-08-09 11:43:30 +02:00
Nikolaus Schulz 8d01846e3f Manpage, TODO, CHANGELOG: document and record wildcard expansion in IMAP mailbox names 2010-08-09 11:43:10 +02:00
Nikolaus Schulz f08403c99b Expand wildcards in IMAP mailbox names
The only non-obvious code change required for this is due to the fact that
computing the archive names has to move into the format-specific archiving
functions, because they can no longer be derived from the mailbox name
beforehand.
2010-08-09 11:32:01 +02:00
Nikolaus Schulz 910b507a2d TODO: drop more obsolete items
In particular:
* we no longer use shutil.copy{,2} to write back a changed mbox
* having temporary mbox files in the same directory as the originals doesn't
  make sense anymore since we no longer commit them with rename(2)
* the --archive-name option is now implemented
2010-08-08 18:53:11 +02:00
Nikolaus Schulz ca80e185e6 Regenerate manpage from sgml source 2010-07-31 22:08:22 +02:00
Nikolaus Schulz 3a6e4072b0 Manpage: various updates
Document the --archive-name option, and explain the basic idea of deriving the
archive filename from the mailbox earlier and more prominently.  Also document
how archivemail tries not to create hidden archive files, and remove some
obsolete notes.
2010-07-31 22:05:11 +02:00
Nikolaus Schulz 3a9a5cd4b8 New option --archive-name, alias -a, to hard-code the archive filename 2010-07-31 20:49:30 +02:00
Nikolaus Schulz 04bf8eaa23 test suite: fix buggy test of --suffix and --prefix option parsing 2010-07-31 20:49:30 +02:00
Nikolaus Schulz 0921a1c91a test suite: replace some plain assertions with TestCase.assertEqual() 2010-07-31 20:49:30 +02:00
Nikolaus Schulz 40ba265fde Rename variables in make_archive_name()
Archive name prefixes may contain path components, thus renaming some
variables accordingly.
2010-07-31 20:49:29 +02:00
Nikolaus Schulz f1f34ca46e Don't create hidden archives when archiving mailboxes with leading dots in the name
When archiving a mailbox with leading dots in the name and no archive name
prefix specified, strip the dots off the archive name.  This is targeting
Maildir++ subfolders.
2010-07-31 20:49:29 +02:00
Nikolaus Schulz 67f23e1af4 Only use the default archive name suffix when the user specified no affix
Also add more archive name affix testing to the test suite.
2010-07-31 20:49:29 +02:00
Nikolaus Schulz b6bc92c34f New option --archive-prefix, alias -p
Technically, this works just like the --suffix option.  This commit also
updates the manpage accordingly.

Currently, the prefix is not checked for slashes, so it could contain path
components.  (The same applies for the suffix, btw).  Since the expanded
string is prepended to the archive base name, this can be used to dynamically
configure the archive directory, depending on the archive cutoff date.  I'm
not sure if this can be considered a reasonable feature, though.
2010-07-31 20:49:03 +02:00
Nikolaus Schulz f22fe4decd Detect and never archive IMAP server pseudo mbox messages
IMAP servers (Dovecot and UW-IMAP at least) may store mailbox meta data for
mboxes in a pseudo message.  Such messages are now detected and never archived.

This commit includes a test case in the test suite.
2010-07-30 19:15:21 +02:00
Nikolaus Schulz d99b4b4414 Give the changelog some more love
Add references to bug numbers and be more verbose.
2010-07-30 15:42:26 +02:00
Nikolaus Schulz e9446e2fc4 test suite: test unlocking an mbox after dotlocking failed with EACCES 2010-07-30 13:30:20 +02:00
Nikolaus Schulz eadedf27d0 Fix crash when unlocking an mbox after dotlocking failed with EACCES
If we don't have sufficient permissions to create a dotlock for an mbox file,
record that, and don't try to remove the dotlock when unlocking the mbox
later.
2010-07-30 13:24:36 +02:00
Nikolaus Schulz 71485f2469 index.html: reword pointer to the Suse Build Service to be more generic
Better don't write "soon there will be... <foo>" and don't be specific about
available versions.  Writing it more generically means lesser maintenance. :)
2010-07-30 12:29:18 +02:00
Nikolaus Schulz db8eb62c16 Regenerate manpage from the sgml source 2010-07-30 12:29:14 +02:00
Nikolaus Schulz 6813e21d54 Updated the manpage date 2010-07-30 12:25:56 +02:00
Nikolaus Schulz 1c412524f2 Document in the manpage that archivemail locks the archive mbox 2010-07-30 12:25:55 +02:00
Nikolaus Schulz 03932a8cb2 Remove the notes about setuid support from the manpage
This feature has been removed.
2010-07-29 22:55:00 +02:00
Nikolaus Schulz 280113982f Replace distutils MANIFEST with MANIFEST.in template
Recent distutils versions always generate a new MANIFEST, overwriting our
custom one.  See Python bug #8688.
2010-07-29 22:12:52 +02:00
Nikolaus Schulz a102b5baf9 Rename archivemail.py to archivemail
On Unix, most scripts don't come with a file extension, it's not needed, and
we distribute the script as "archivemail" anyway.  And most importantly, I
like it better without the extension. :)

With a little trick we can still load the script as a module from the test
suite.
2010-07-29 21:35:58 +02:00
Nikolaus Schulz b47cc46fbf README: drop warning that the test suite is slow
With the recent optimizations of the test suite, it has become quite fast.
2010-07-29 21:32:37 +02:00
Nikolaus Schulz febd030e14 Drop .py extension from the unittest script 2010-07-29 21:02:12 +02:00
Nikolaus Schulz a04226580b Bump version to 0.8.0 2010-07-29 21:02:07 +02:00
Nikolaus Schulz 89cff1807c Updated changelog, which was very outdated 2010-07-29 20:39:50 +02:00
Nikolaus Schulz 0eddfe7357 Updated copyright year 2010-07-29 20:39:46 +02:00
Nikolaus Schulz af3bb16a4c Updated TODO, dropping a lot of obsolete items
Notable items that are now resolved or implemented:
    * archives are now locked
    * the mbox classes have been refactored to a cleaner design
    * we moved from flock locking to fcntl
    * the setuid() feature is long gone
    * symlink attacks for tempfiles are not possible (that is really an
      ancient TODO item from the original author)
    * the test suite now has a lot of maildir test cases
2010-07-29 19:49:42 +02:00
Nikolaus Schulz 368f312e2d test suite: add more maildir test cases
Maildir testing should now be roughly on par with mbox testing.
2010-07-29 19:29:53 +02:00
Nikolaus Schulz 2ce89ef508 test suite: remove unused remove() methods from maildir classes
For cleanup of temporary files, we lean on shutil.rmtree anyway, so don't
bother wasting more code on this.
2010-07-29 15:46:15 +02:00
Nikolaus Schulz 7058290c2e test suite: remove incomplete MH testing code
I just discovered that archivemails MH support is broken with respect to
message flags, and in my opinion it doesn't make much sense to test
known-broken functionality.

In fact there may well be zero archivemail users with MH mailboxes; MH is
basically an obsolete format, and any archivemail user with MH mailboxes would
probably have complained about lost message flags.
2010-07-29 15:46:15 +02:00
Nikolaus Schulz 0dfae37e04 test suite: first shot at implementing maildir test cases 2010-07-29 15:46:10 +02:00
Nikolaus Schulz 78c4c6e3da test suite: remove obsolete $Id$ subversion keyword 2010-07-29 14:41:05 +02:00
Nikolaus Schulz d845ab862e test suite: cleanup of the mbox testing code
This code is complex, too complex actually.  Rename some methods and
variables, rework some code and and add some explaining comments in order to
make it it least a bit easier to understand.
2010-07-29 14:41:00 +02:00
Nikolaus Schulz 584918b265 test suite: remove obsolete test that we preserve mbox file modes
This test case is obsolete since we no longer replace the mbox file with a new
copy but rewrite it.
2010-07-29 13:32:20 +02:00
Nikolaus Schulz 9ff7774aba Fix TempMbox.saveas() to unregister the right file from _stale 2010-07-28 15:28:39 +02:00
Nikolaus Schulz e5ee9b98c1 Python language fix: replace C-style boolean values "1" and "0" with True/False 2010-07-19 01:40:25 +02:00
Nikolaus Schulz 7269c32734 Remove unused variable 2010-07-19 01:40:25 +02:00
Nikolaus Schulz 80b3483439 Python language fix: remove parentheses around asserted expressions
assert is not a function.
2010-07-19 01:40:25 +02:00
Nikolaus Schulz 2d15728c2d Add a note about the race window when resetting an mbox file timestamp 2010-07-19 01:40:25 +02:00
Nikolaus Schulz dcf849afeb TODO: new items: make IMAP test suite with no network I/O; drop .py extension 2010-07-19 01:40:25 +02:00
Nikolaus Schulz 573f2b9358 Warn if the temporary directory is not empty on cleanup 2010-07-19 01:40:25 +02:00
Nikolaus Schulz 4fb833176e When creating a dotlock, register it slightly earlier for cleanup
This closes a very unlikely window where we could create a dotlock file, but
then encounter an error and fail to clean up the dotlock.
2010-07-19 01:40:25 +02:00
Nikolaus Schulz 2b7baaf294 In verbose mode, say that we're about to dotlock an mbox before trying to do so 2010-07-19 01:40:25 +02:00