Eric spotted a bug where messages retrieved via FAST (i.e. straight from the database) were
not assigned their proper EmailLocations, which has a lot of ramifications when more emails
are being requested.
This adds facilities to issue FETCH BODY<partial> syntax commands to IMAP server. Only
thing that is missing is the ability to specify body MIME parts, which can be added later.
(At that time we'll want to include support for the FETCH BODYSTRUCTURE command.)
This is a necessary component for threading (#3808).
The entire database module now uses Transactions in order to guarantee atomicity of all
operations. However, due to limitations in SQLHeavy and its implementation of async, we
can't use it (and SQLite's) transactional models. This patch introduces a rather hamhanded
transactional model where the entire database is locked for each request using a
NonblockingMutex. This is the safest approach, but certainly not an optimal one. When
SQLHeavy's code is in place, hopefully we can rip this out with a minimum of fuss.
Mailing list groups aren't completely accounted for in Geary (#3713) but in the last commit
I skipped one place they can easily be dealt with. This takes care of that.
message (email), suitable for decoding a message off the wire or converting a
human-generated form into something suitable for pushing on the wire via SMTP.
Email addresses were being stored in the database in a human-readable fashion, not proper
quoted RFC 822 format. This fixes that, as well as another error this exposed in
MessageListCellRenderer dealing with situations where no From: is available. Courtesy
Charles Lindsay.
Commands were build with their commands prior to this change, for various reasons (mostly as
a convenience for myself). This is not technically a good way to do things, it's far better
if the Tag is assigned right before the Command is sent to ensure they go out in order.
This bug was exacerbated by rapidly switching between folders. This patch introduces a
Cancellable to most of the requests the client performs so it can cancel old requests when
the user switches folders. This fixed some issues but exposed others.
Testing this demonstrates another bug: #4233
This adds a new flag when listing messages, FAST. This indicates that the caller wants
messages that are immediately available to the Folder, avoiding a round-trip to the server
(or even disk) if possible. Not all folders will support FAST, but it can be used (as it is
now in the client) to quickly populate the message list and then initiate a connection in
the background to get the straight dope.
This adds an SMTP library into Geary that can perform basic client submission of emails.
The interface is exposed generically through the Geary.EngineAccount interface.
This commit introduces a Scheduler module which deals with the problem of scheduling on the
idle or timeout queue unowned SourceFuncs (because the idle and timeout functions require
owned delegates). It also takes care of a handful of places where an out parameter was not
being set before the method returned, which Vala's new code analysis now picks up.
This commit finishes the second half of #3793 by detecting when messages have been deleted
(or moved out of) an open folder and notifying the system of the change. The nonblocking
synchronization primitives have been beefed up and may be broken out to a separate library
some day.
This commit also introduces the ReplayQueue, which replays events that occur on the server
locally. This class will probably become much more important as time goes on, perhaps used
to store user events that are replayed on the server as well.
This commit represents the first half of this ticket, as it only monitors additions (new
emails) in the folder. A second commit will follow for monitoring removals (deleted emails)
in the folder.
The commit for #3851 changed the semantics of how messages are stored in the local cache,
and not all the code was properly updated to recognize that, particularly in EngineFolder.
This patch also introduces EmailIdentifier, which allows for a mail message to be fetched by
a unique identifier rather than its position in the folder list. This is much more
efficient and less error-prone, and means that Email objects don't have to be updated if
their position changes (although there are still some questions in that area). For IMAP,
this means being able to use the message's UID.
Caused by a valac bug set off by a generic function designed to convert a Gee List to a Vala
array. Rather than fight it I've removed the function and added to FetchCommand a
constructor to build the command using a Gee Collection.
The SQLite Geary.Folder implementation now uses reference semantics, so when it's reselected
the same Folder object is used and in-memory state is consistent. Also found an off-by-one
error when first querying an IMAP Folder that caused the most recent new email not to be
downloaded the first time. Fixed as well in this commit.
It's vital that the message table always have a contiguous list of messages from the highest (newest) to the oldest requested by the user. If the user requests messages early enough that there would be a gap, the missing patch in the middle needs to be downloaded (UIDs, at least) to hold their position in the database. Prior commit downloaded too many; this change makes sure only messages not being requested by user but unavailable in the database are prefetched.
Needed to rethink storage strategies as I researched this and realized that a true scarce database -- where the database is sparsely populated both in columns and rows -- is not feasible due to IMAP's UID rules. The strategy now means that the database rows are contiguous from the highest (newest) message to the oldest *requested by the user*. This is a better situation than having to download the UID for the entire folder.
This commit adds support for IMAP-specific properties, of which UIDValidity is crucial toward completing #3805. The additional code is to integrate these tables into the SQLite Geary backend and to make sure this information is requested from the IMAP server.
NOTE: This commit changes the database schema. Old databases will need to be blown away before running.
Fields added. However, it would be nice to use formatting to separate them from the body of the message. This is not easy with Gtk.TextView/Gtk.TextBuffer; see https://bugzilla.gnome.org/show_bug.cgi?id=59390. This may push us to move to Webkit earlier rather than later.
This ticket enables this, however IMAP properties are not yet coming up from the local database yet, so this isn't technically complete. That work will be included in the commit for #3805, which requires those properties.