Commit Graph

1229 Commits

Author SHA1 Message Date
Igor Almeida
73a3767d11 IMAP folder: expose the message keywords
The keywords are in the flag string, so imaputil can just strip the
usual \Flags.

Signed-off-by: Igor Almeida <igor.contato@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-11-22 19:51:02 +01:00
Igor Almeida
4e2de8f58a Maildir repository: add config keys for IMAP keywords
This commit assembles a dictionary mapping user-specified IMAP keywords
to Maildir lower-case flags, similar to Dovecot's format
http://wiki2.dovecot.org/MailboxFormat/Maildir

Configuration example:

[Repository Local]
type = Maildir
localfolders = ~/Maildir/
customflag_a = $label1
customflag_b = $Forwarded
customflag_c = Junk

Signed-off-by: Igor Almeida <igor.contato@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-11-22 19:50:43 +01:00
Igor Almeida
c52ca66874 Maildir folder: extract lower-case letters (custom flags) from filename
Remove filtering that was previously done to avoid errors in flag
handling.

Signed-off-by: Igor Almeida <igor.contato@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-11-22 19:50:22 +01:00
Nicolas Sebrecht
86a91f28c0 v6.6.0-rc3
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-11-05 09:26:01 +01:00
Nicolas Sebrecht
04babea607 bump from imaplib2 v2.51 to v2.52
Thanks-to: Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-11-05 09:07:31 +01:00
Nicolas Sebrecht
74e5ff5785 Merge branch 'renard-timestap-maildir' into next 2015-11-04 10:37:57 +01:00
Valentin Lab
b2adf2d258 fix: avoid writing password to log
Github-fix: #266
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-11-04 08:00:50 +01:00
Sébastien Gross
3b30c4aa93 add new config option filename_use_mail_timestamp
If this value is true, use (if possible) a timestamp based on message
Date or Delivery-date headers. The current system time is used
otherwise.

filename_use_mail_timestamp and utime_from_header are now completely
separated option that do not interfere one with other.

To handle this feature in a multithread context we use a hash to count
the number of mail with the same timestamp. This method is more accurate
than using the old lasttime and timeseq variables.

Signed-off-by: Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-11-04 00:56:46 +01:00
Max Vilimpoc
1becbff786 enable SSL by default
Fix-github-issue: #263
Signed-off-by: Max Vilimpoc <github@vilimpoc.org>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-10-29 16:13:44 +01:00
Nicolas Sebrecht
b7fec93661 v6.6.0-rc2
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-10-15 04:55:34 +02:00
Nicolas Sebrecht
91d089641b bump imaplib2 from v2.50 to v2.51
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-10-15 04:15:37 +02:00
Nicolas Sebrecht
2a637bd457 bump impalib2 from v2.49 to v2.50
Allows ssl3 protocol to not be available.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-10-13 14:37:43 +02:00
Nicolas Sebrecht
63db8776e0 Noninteractive: add minor comment
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-10-13 00:52:43 +02:00
Ben Boeckel
e18428b25b UIBase: add a syslog ui
Rather than having an option for syslog output, make a separate UI
option.

Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-10-13 00:48:18 +02:00
Nicolas Sebrecht
3daddb9b33 folder/IMAP: minor indent fix
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-10-13 00:45:51 +02:00
Ben Boeckel
428bb77984 Noninteractive: fix docstring for Basic
Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-10-13 00:40:27 +02:00
Janna Martl
ee0de28cc4 utime_from_header: handle out-of-bounds dates
Handle case where email's internal time is erroneously so large as to
cause overflow errors when setting file modification time with
utime_from_header = true.

Reported-by: Cameron Simpson <cs@zip.com.au>
Signed-off-by: Janna Martl <janna.martl109@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-10-12 16:19:23 +02:00
Ben Boeckel
f03afcd224 imapserver: add a tls_level option
Allow the user to block usage of known-bad versions of SSL and TLS.

Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-10-12 15:54:15 +02:00
Nicolas Sebrecht
9bb27de375 do use the XOAUTH2 url if configured
fix regression introduced by af640208e1.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-10-12 07:51:05 +02:00
Nicolas Sebrecht
af640208e1 make XOAUTH2 configuration option optional
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-10-12 07:42:30 +02:00
Nicolas Sebrecht
ebb2124dbb Merge branch 'Frizlab-gmail-oauth-2' into next 2015-10-06 14:25:15 +02:00
Christopher Corley
f7efaa2093 learn XOAUTH2 authentication
Signed-off-by: François Lamboley <francois.lamboley@happn.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-10-06 14:24:42 +02:00
Nicolas Sebrecht
cc3cbaea05 bump imaplib2 from v2.48 to v2.49
Includes changes to new TLS option.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-09-30 13:29:59 +02:00
Prashant Sachdeva
2f1c856c04 fix status code to reflect success or failure to sync
Return value set to 1 if sync failed and error is thrown. Otherwise set to 0 if successful.

Signed-off-by: Prashant Sachdeva <sachdevp@cs.ubc.ca>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-09-29 08:31:46 +02:00
Nicolas Sebrecht
fb12fc1975 v6.6.0-rc1
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-09-28 03:09:43 +02:00
Nicolas Sebrecht
f591fe66cc Merge branch 'mathstuf-syslog-logging' into next 2015-09-27 04:14:54 +02:00
Ben Boeckel
585e5d5e2e logging: add a switch to log to syslog
Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-09-27 04:12:33 +02:00
Nicolas Sebrecht
71dd03e88c Bump imaplib2 from 2.43 to 2.48
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-09-14 14:56:17 +02:00
Nicolas Sebrecht
55ca922dd1 Merge branch 'krafczyk-new-mail-hook-2' into next 2015-09-11 21:04:52 +02:00
Matthew Krafczyk
48bb2f4113 Added the newmail_hook
When new mail arrives, this hook is triggered, allowing the user to
play a sound, or launch a popup.

Signed-off-by: Matthew Krafczyk <krafczyk.matthew@gmail.com>
2015-09-11 20:34:38 +02:00
Nicolas Sebrecht
ebf9e24f87 Merge branch 'fix/225' of git://github.com/milouse/offlineimap into milouse-fix/225 2015-09-04 15:50:58 +02:00
Étienne Deparis
41692d0328 Try to fix #225 « Runonce (offlineimap -o) does not stop if autorefresh is declared in DEFAULT section »
Signed-off-by: Étienne Deparis <etienne@depar.is>
2015-09-04 12:12:28 +02:00
Tommie Gannert
a6e7b6627b Add decodefoldernames option to decode IMAP folder names using UTF-7.
Signed-off-by: Tommie Gannert <tommie@gannert.se>
2015-08-29 16:43:33 +01:00
Nicolas Sebrecht
ca1ce256ec v6.5.7
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-05-15 15:20:18 +02:00
Alex Kapranoff
07af72081a report UID validity problem in exit code
Since skipping a folder means no new data is downloaded, the UID validity
problem is a backup failure. Make it possible to alert or work around
it in scripts by signaling with the exit code.

Signed-off-by: Alex Kapranoff <alex@kapranoff.ru>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-05-11 14:38:31 +02:00
Nicolas Sebrecht
c8e5f32eba Merge branch 'kappa-error-in-exit-status' into next 2015-05-10 12:01:09 +02:00
Alex Kapranoff
a817400d76 report exceptions via exit code
Now it is possible to handle failed syncs in scripts.

Signed-off-by: Alex Kapranoff <alex@kapranoff.ru>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-05-10 12:00:23 +02:00
Nicolas Sebrecht
223a7d0f7f Merge branch 'mjhoy-fix-dst' into next 2015-04-09 01:50:51 +02:00
Michael Hoy
8dd146d8fe folder/IMAP: fix datetuple dst check
Signed-off-by: Michael Hoy <mjh@mjhoy.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-04-09 01:50:18 +02:00
Nicolas Sebrecht
c3f3012cfc accounts: remove unused imaplibutil import
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-04-07 16:34:35 +02:00
Nicolas Sebrecht
548fa6e57f v6.5.7-rc4
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-04-07 12:31:51 +02:00
Nicolas Sebrecht
a9ed2ff98a folder/Maildir: fix emailutil import
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-04-07 11:57:30 +02:00
Janna Martl
8096f6cd5b maxage: fix timezone issues, remove IMAP-IMAP support, add startdate option
1. When using maxage, local and remote messagelists are supposed to only
contain messages from at most maxage days ago. But local and remote used
different timezones to calculate what "maxage days ago" means, resulting
in removals on one side. Now, we ask the local folder for maxage days'
worth of mail, find the lowest UID, and then ask the remote folder for
all UID's starting with that lowest one.

2. maxage was fundamentally wrong in the IMAP-IMAP case: it assumed that
remote messages have UIDs in the same order as their local counterparts,
which could be false, e.g. when messages are copied in quick succession.
So, remove support for maxage in the IMAP-IMAP case.

3. Add startdate option for IMAP-IMAP syncs: use messages from the given
repository starting at startdate, and all messages from the other
repository. In the first sync, the other repository must be empty.

4. Allow maxage to be specified either as number of days to sync (as
previously) or as a fixed date.

Signed-off-by: Janna Martl <janna.martl109@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-04-07 11:54:35 +02:00
Nicolas Sebrecht
71693b7d8c Maildir: fix imports of emailutil
Commit 0c17350e4f revisited utime_for_header without taking care of the
imports.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-04-06 23:50:56 +02:00
Abdo Roig-Maranges
c094304f93 make savemessagelabels honor utime_from_header
Previously, syncing labels on a message always resulted in updating the
file modification time, even with utime_from_headers=true

This patch restores the file mtime to the previous value when
utime_from_headers=true, preventing a label synchronization from
breaking the promise that the file mtimes coincide with the header date.

Signed-off-by: Abdo Roig-Maranges <abdo.roig@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-04-06 17:49:36 +02:00
Abdo Roig-Maranges
0c17350e4f decouple utime_from_header from rtime
We were using rtime for two different purposes:
- to store remote internal date
- to use in the utime_from_header option

Let's decouple the utime_from_header logic from rtime, now rtime means
remote internal date.

Signed-off-by: Abdo Roig-Maranges <abdo.roig@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-04-03 11:30:30 +02:00
Nicolas Sebrecht
3a056519f9 Merge branch 'pilou--tests1' into next 2015-04-02 19:32:37 +02:00
Pierre-Louis Bonicoli
1cdf34e100 remove unnecessary imaplib2 workaround
Upstream bug has been fixed, since imaplib2 v2.42 the untagged responses are
flushed (as stated by the documentation).
See https://sourceforge.net/p/imaplib2/bugs/7/

Signed-off-by: Pierre-Louis Bonicoli <pierre-louis.bonicoli@gmx.fr>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-04-02 19:32:15 +02:00
Nicolas Sebrecht
5a4e4fd0c2 rename utime_from_message to utime_from_header
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-03-27 16:50:17 +01:00
Nicolas Sebrecht
05fa311878 Revert "fix: don't loose local mails because of maxage"
This partially reverts commit 25513e9038.
Only changes about dates and times are reverted. The changes about the style are
kept.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-03-26 12:05:11 +01:00