| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
| |
Use gzip.GzipFile instead.
|
|
|
|
|
| |
This eliminates a lot of copy-and-paste code, and switches from
os.system("gzip <...>") to gzip.GzipFile.
|
|
|
|
|
|
|
| |
os.utime() uses the utimes(2) system call to set file timestamps. utimes(2)
has a microsecond resolution, but stat(2) may return timestamps with
nanosecond resolution. So, the check that we have properly reset the mbox
file timestamp must allow a minor deviation.
|
|
|
|
|
| |
Nothing serious, but if another client deleted it in the small window after
we checked it, we would have crashed trying to delete a non-existing file.
|
|
|
|
|
|
|
|
|
|
| |
* Make the finalise() methods spot if they have anything to do
* We used to create the temporary mbox files on demand in the message
processing loop, if we needed to write to them. Now we create them
beforehand, but only if they might be needed (e.g. we don't create an
archive if options.delete_old_mail is set).
* The above combined makes the final committing of the changes simpler (a
*lot* simpler for mboxes), and we can dump the Mbox.leave_empty() method.
|
|
|
|
|
| |
This separates write-only mbox access to the temporary mboxes from the read-only
access to the original mbox.
|
| |
|
|
|
|
|
| |
This is WIP to prepare locking for the archive. Since we no longer copy the
whole archive before appending, archiving should also be faster.
|
| |
|
|
|
|
|
|
| |
When committing a changed mbox, don't use os.rename(), and don't open/close
the mbox file to truncate it to zero length. Locking was pretty much broken
before -- at least in theory a quite severe bug.
|
|
|
|
|
|
|
|
| |
* Remove code duplication: restore the mbox timestamps once and for all when
we're done
* Don't bother restoring the file mode when finishing, since this is handled in
RetainMbox.finalise() (and need be)
* Therefore, rename Mbox.reset_stat() to reset_timestamps()
|
|
|
|
|
| |
This is now before we do the sanity checking, so in verbose mode, we don't error
out before having said that we now turn attention to the current mailbox.
|
|
|
|
|
|
| |
This should also protect people relying on the old setuid feature.
If the mailbox is local, by checking the ownership we necessarily check for
existance.
|
|
|
|
|
| |
This used to happen when creating the temporary archive, we now do it before we
start processing the mailbox.
|
|
|
|
|
| |
Remove the checks if the mailbox is a symlink, and if the output directory is
world-writable. Better no security than half-baked security.
|
| |
|
|
|
|
| |
It was not a good idea, and trying to do it right would be too much effort.
|
|
|
|
|
|
| |
I don't think anybody wants to archive folders in shared or public IMAP
namespaces, so we don't bother checking all possible namespaces. The code was
ugly anyway.
|
|
|
|
|
|
| |
archivemail development has moved to git. This patch updates the project
webpage, removes the subversion $Id$ keyword that was stored in
archivemail.__svn_id__, and updates the Makefile.
|
|
|
|
|
|
| |
Only replace the slash with the server's hierarchy delimiter if the latter
actually exists (is not NIL).
|
| |
|
|
|
|
|
| |
This spewed an error when --dry-running.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Automatically add NAMESPACE prefix to the mailbox path if necessary,
* Explicitely check for guessed mailbox names with LIST instead of just trying
to SELECT them.
* Updated documentation about NAMESPACE handling.
|
| |
|
|
|
|
|
| |
No code changes, just moved functions around.
|
|
|
|
|
| |
for it, which was just used to spit a special error message anyway.
|
|
|
|
|
|
| |
The message sequence numbers must be strings, but were generated as integers;
fixed.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Updated documentation, and added a first simple unittest for this.
Closes: #1764846.
|
| |
|
| |
|
|
|
|
|
|
| |
The incompatible changes in mailbox.Maildir triggered an assertion in
_archive_dir(); removing that assertion since it looks not useful anyway.
|
|
|
|
|
| |
expressions.
|
| |
|
|
|
|
|
|
| |
* perhaps integrate --debug-imap into -vv switch
* graceful IMAP connection termination upon error
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
- no locking with archives
- no validation of existing archives
- discomfort with current mbox class design and usage
|
|
|
|
|
| |
Fixed.
|
|
|
|
|
|
|
| |
* rework locking
* IMAP SEARCH BEFORE matching dates only, no time
* document mbox format issues
|
|
|
|
|
|
|
|
|
| |
* look for the timestamp of the latest 'Received' header before resorting to
'Date' or 'Resent-Date'.
* let 'Resent-date' header take precedence over 'Date'.
Document these changes in manpage and changelog.
Closes: #1481316, #1764855, Debian bug #272666.
|
|
|
|
|
|
| |
writing From_ line timestamps, don't use UTC but local time, without timezone
information.
|
|
|
|
|
| |
Reverted that hunk.
|