| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously to 8e1451a8, the change of state in IMAP
protocol was log with MessagingState category which
was disabled. Create here a specific new category
to avoid having the state changes printed out with
the normal IMAP logging by default. It's now possible
to get the state logging by using QT_LOGGING_RULES
environment variable without recompiling.
Change-Id: I7bfee95bd8dd483b2716e60b2866e778861c61ef
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
| |
If the connection already breaks while waiting for
the credentials to be fetched, it should not report
error or proceed to login.
Change-Id: I68a6f95232bdde03cc6cd52a2e0bf3cdfc989772
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Replace the custom logging mechanism with QLoggingCategory.
Also declare the warnings with the proper category.
Change-Id: If87d53d27ea0c65abd434af9f99fe49ce634d6dd
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
| |
Change-Id: I57c6ed78099b3359a16ce807da95325e755f0197
Reviewed-by: Pekka Vuorela <[email protected]>
Reviewed-by: Damien Caliste <[email protected]>
Reviewed-by: <[email protected]>
|
|
|
|
|
|
|
| |
Change-Id: Iebfffe7a6d5b2db40f0508ecd7c8ccddfa6665a6
Reviewed-by: Damien Caliste <[email protected]>
Reviewed-by: <[email protected]>
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tests can be run with `ctest`. The `--verbose`
option makes the output of each test visible.
Fix also minor failures:
- make qlogsystem test locale independent,
- make qmailstore test properly listening to
the messagePropertyUpdated() signal.
IMAP, POP and SMTP tests are declared as always
failing for the moment, since they try to
connect to a mail server (but they are still
useful for debug purposes).
Change-Id: I7ae548110a8eeb37bd07b031a8433d38ea53529e
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, login is deferred until all
configured push folders have been established
(or failed), when push email is enabled.
This does not work for a newly created account
where there is no folder registered.
This patch ensures that the code continues
to the login when push email is enabled but
when there is no valid configured folders.
Change-Id: I397d4d2616c3c6cebc9a3f4dcc03f4b5e3564ebe
Reviewed-by: Guido Berhoerster <[email protected]>
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just passing QMailMessageKey() ended up with empty search query and
then crashing on QStringList::takeFirst().
Added similar error handling as CreateState::transmit() and
RenameState::transmit() have.
Change-Id: I6fdaa8ac11507dd880676d1f020c53d4964c85aa
Reviewed-by: Damien Caliste <[email protected]>
Reviewed-by: <[email protected]>
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Fix a regression introduced in 679b6a2d. The setIdlingForFolder()
is also called on idle renewal, when the main session is in logout
state. There is no need to ask for a login then.
Change-Id: Iec6649a529a2d2b5b9b9d817f0ea2df5ff03f383
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The IdleProtocol was delaying its signal emission
of openRequest in case of an error. Then the client
emitted restartPushEmail and the service was immediately
calling initiatePushEmail(). This is the case when
the error happened in the idle protocol.
But the service is already having a delayed machinery
to restart the idle session in case an error happens
in the main client session.
This patch is removing the delay timer in IdleProtocol
so any error happening there is immediately reported to
the service, which decides to delay the call to
initiatePushEmail(). This requires some safe guards
to be added in the service to ensure that the delay
is applied only once even when there are several
push folders emitting errors.
Change-Id: I2b49c0445640d58bb391088b602f152cfe45eb49
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Use a common QTimer in ImapClient for every
IdleProtocol, so the network accesses to renew
the idling connections are all done in a close-
by period of time, allowing the radio to sleep
for a longer time between wakes-up.
Change-Id: I7c9378a0af74015a34fd6cc98fa9517433d28392
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no need anymore to delay IMAP
start on push enabled. If an error occurs
and idling can't be established, there
are already two exponential timers:
- one in ImapService that restart idling
for errors happening in the main client
session.
- one in IdleTransport that delays the
emission of restartPushEmail signal
on error in the idle connection.
Change-Id: I6ccbd7fccc0d36f40d2dc2ca6ddf7b6f099f1638
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The errorOccurred signal is only emitted for client
session, and not for idle connections (there are
reporting via the client itself, which emits
restartPushEmail signal for idle errors).
It is thus necessary to report any error the client
is emitting. If the client session was launched to
establish idle connections and these sessions are not
running, then one should retry to reestablish the
idle connections later.
Without the patch, in case of a non responding server
(connection to a captive portal without network
granted yet), the client error was not reported when
the connection could not be established. It was
accepted wrongly as succeeded when a new attempt to establish
idle connections was made and Source::retrievalCompleted()
was emitted when queueing the idle folder for scan.
But with the retry timeout becoming larger and larger,
the strategy expiry timeout finally kicked in and the
service was fully restarted.
Change-Id: I206e77f221d2a7c4bdfcee1952dbe1127431e6d6
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid the case of calling disable() in the
callback for any other case than when the account
is disabled.
In particular, don't call disable() + enabled()
to apply a change. The only account change that
requires to stop (and restart) a running client
is a change in the idle folder list. In that case,
there is no need to kill and restart the client,
just restarting the idle function is enough.
Change-Id: Ica39c1c09bb5b156670a0f1301bc6dc9703a7451
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Makes the idle state to rely on _monitored and
_waitingForIdleFolderIds variables only.
_monitored is the set of IdleProtocol listening
to changes in a folder. _waitingForIdleFolderIds
is a subset of _monitored, listing folder where
the protocol was started, but has not reached yet
the idling status.
_idlesEstablished can be replaced by a combination
of the two, being true when and only when some
folders are monitored and all of them are in the
idling state.
Old variable _waitingForIdle is not needed anymore
if monitor() function is modified to ensure that
the list of folders given as argument is properly
transformed into monitored folders, and only these
folders as argument. Calling monitor on the same
list is a no operation, making _waitingForIdle
completely obsolete.
A new closeIdleConnections() function is added
to the public API of ImapClient, since there was
previously no mean to close idle connections,
except by killing the client itself. This is
achieved internally by closing non desired
idle protocols in monitor() before checking if
the settings are push enabled.
Change-Id: I8c62b6d5ff7150ee2c90d7dcfec3bd44f66cf7b6
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
| |
Change-Id: If39a2c6d106c88a0f3bc059db1d8f40957649193
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid a complete restart of the client on setting
changes. Reload of the configuration was already
done at each new connection. But completion of the
client task may take time and settings could be
changed in-between.
Let instead the client reports a failure if the
settings are not correct. Doing a deletion of the
client and a recreation of the client on setting
changes won't allow a running task to complete anyway.
Change-Id: Icf11e6f33a5574d8cd7ccd07fe2f3f06e2d5d558
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
There is no need to maintain _accountWasEnabled
variable, since a client is created when enabled
and deleted when disabled. Testing _client can
play its role.
Change-Id: I37bbb1bd58368bad626994ce89544ba4dfbaa45c
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
| |
Change-Id: Id4cac8f496e9734f8f9b514e5d6c9234d0438508
Reviewed-by: <[email protected]>
Reviewed-by: Damien Caliste <[email protected]>
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Fixed also a copy-paste error on qmailthreadsortkey_p.h.
Change-Id: Ide4bb24e69a94f64c9521f5c4cce7a33921fab11
Reviewed-by: <[email protected]>
Reviewed-by: Damien Caliste <[email protected]>
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
| |
Change-Id: Ifa2dad56db9667fcbeaff4c618a8a8de75d693c4
Reviewed-by: Damien Caliste <[email protected]>
Reviewed-by: Pekka Vuorela <[email protected]>
Reviewed-by: <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The qmfclient was using this just to get storage info, which is
somewhat out of scope for the class api anyway. And also the
"errorMessage" meaning out-of-space error was bad API.
Got rid of OS specific storage calculation in favor of QStorageInfo
and streamlined the error string method.
To me the implementation feels like trying a bit too much to check the
available space, but I'll not touch that now.
Change-Id: Ice4256c0cdf3fa3dc52c1354ab07a433862e66ae
Reviewed-by: Damien Caliste <[email protected]>
Reviewed-by: <[email protected]>
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
| |
Centralize the status flags according to IMAP
possibilities into ImapClient.
Change-Id: I1019a9348f53ce98124baf297136f6e285c996dd
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While an idle connection is setting up, the main
client, with the credentials, may not yet have
fetched and receive the credentials. Thus,
authentication of within the idle protocol may
fail.
This patch delays sendLogin() for idle protocols
waiting for the credentials to be ready.
Change-Id: If14a4104f5943dcb32eda7fd969623a1ab362b0f
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
A client is created by the corresponding service.
A service is linked to an account on construction.
There is no use case to change the account during
the life time of a client.
Change-Id: I43c60741d28b011bef9c7770433557cf54e870e6
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
| |
This function is not used and can be a source of bugs
because it assume its argument to be UTF8 encoded while
it converts the output to latin1.
Change-Id: Ib7209b15959741cc10ebebb2cbceefc42fb753f6
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Credentials for authentication can be username /
passwords or something more complex. The storage
for such data can also be done outside QMF. So
this commit introduce a plugin mechanism to get
such credential data.
Change-Id: I26ec6e98b5e900a9f93c420b00f0253f2abad25c
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
This API change allows to create the
service configuration in each plugin
with its object constructor instead
of its name.
Change-Id: I77b253a795d6b452fbeb650cf80d925e5c53e724
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adjust source code where necessary like:
- #include <private/...> cannot be used since
private is the installation path, but not
the path used in the sources,
- fix map definition in qmailservice.xml,
- had to add #include <qmailstore.h> to
qmailserviceaction.h since qt_add_dbus_adaptor
can only include one header,
- add a method using QDBusVariant in
ServiceHandler so the adaptor can call it.
Change-Id: Idbecf4214dffdf523ccd8558370e8d2854b5d99a
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
This class is not simply a factory creating instances
of crypto plugins, but it's more like a service,
providing methods on QMailMessagePart to execute
cryptographic operations like signing or signature
verification.
Change-Id: I74f65f27137e3bfe78c0f9614728eca37a031b0c
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
| |
For what I can tell, this was something in Qt Mobility long time ago.
Shouldn't be a thing anymore.
Change-Id: Ice7bf7ffb9c561f0757c970eed7804508c1735f3
Reviewed-by: Matthew Vogt <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoiding a lot of compiler noise from -Wsuggest-override.
Also removed the now even reduntant virtual keywords on overridden
methods as per qt coding conventions. And wrapped some overly long
lines touched by the changes.
Change-Id: I4e7febfa9554dfa7f366a1aabba6133a9f6c5614
Reviewed-by: Matthew Vogt <[email protected]>
Reviewed-by: Damien Caliste <[email protected]>
Reviewed-by: Christopher Adams <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Allows connections to be made to servers even when the TLS
certficiate is not trusted (e.g. broken certificate chain).
Change-Id: If912be7d7e4824f243471b40ef5c4d5acb0c31ab
Reviewed-by: Damien Caliste <[email protected]>
Reviewed-by: Matthew Vogt <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Some servers(e.g yandex.ru) do not support AUTHENTICATE PLAIN in a
single command, according to RFC4616 this way is optional, so we always
perform the authentication in two stages that is guarantee to be supported
by all implementations of the protocol.
Change-Id: I56ea5a4acaf446fdea14543416866442c27dc074
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Use the announced capabilities in SMTP/IMAP
plugin to setup the authentication method
to use. Add handling for error 504 on
authentication in SMTP.
Change-Id: I556281895e650768537fc6169816c3e8e6a81362
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The replied flag (\Answered in IMAP protocol) is
properly set for a new mail. But it was not set
on a qresync action (fetching mail updates).
The forwarded flag ($Forwarded as an extension
in IMAP protocol), was detected in the received flags
but was not set or updated in created QMailMessages.
Change-Id: I78eb16650dc706e08fee1c6aab68d601159a52e4
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduces a CalendarCancellation flag similar to the
QMailMessage::CalendarInvitation to be matched against the
QMailMessage::status() bitfield.
While the CalendarInvitation flag indicates that the message contains an
attachment of type text/calendar with "REQUEST" method, the
CalendarCancellation flag indicates that there's an attachment of type
text/calendar with "CANCEL" method type. In other words, a calendar
event cancellation.
For reference, the "CANCEL" method of the Content Type header is
described in RFC2447 (iMIP) Section 2.4 [1] in combination with the
RFC2446 (iTIP) sections 3.2 and 3.2.5 [2]
[1] https://tools.ietf.org/html/rfc2447#section-2.4
[2] https://tools.ietf.org/html/rfc2446#section-3.2
Change-Id: I1ef1d8a070e527552dae1ebe1677156bc07ba04d
Reviewed-by: Matthew Vogt <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Avoid unused variable, QString conversion from ascii and move
fall through note so GCC detects it.
Change-Id: Id50a2b90c8c8c345a117c713849f65f45515eddb
Reviewed-by: Christopher Adams <[email protected]>
Reviewed-by: Damien Caliste <[email protected]>
|
|
|
|
|
|
|
|
|
| |
When the structure of the email is received in
an IMAP transfer, set or not the encryption
flag, as it is done for attachments.
Change-Id: Ief42663d2c38c19b1cd29c21b35f67e4cfcb1fb2
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
The behavior should be equivalent to old QRegExp::lastIndexIn(str).
Without this fix, we never hit the "detach" which causes a variety
of further issues when creating the QMailMessage.
Change-Id: Ib9b91cd16e1d9cb6eeb1c255eea06ab387c2b9b4
Reviewed-by: Pekka Vuorela <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Ensures that cmake files are generated appropriately.
Change-Id: I2521114a527510ff7bf2e73092251147157a29d1
Reviewed-by: Damien Caliste <[email protected]>
Reviewed-by: David Llewellyn-Jones <[email protected]>
Reviewed-by: Christopher Adams <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
A crash occurs in case the timer is active and the object is destroyed.
Created by Valério Valério <[email protected]>, 23 Feb 2015.
Change-Id: I95725448eff61a9e51eff0c5dd8fe0e33b971b08
Reviewed-by: Christopher Adams <[email protected]>
Reviewed-by: Matthew Vogt <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Some servers only advertise full capabilities after sucessful login,
so we need to check if IDLE connection needs to be established in such
cases.
Created by Valério Valério <[email protected]>, 11 May 2015.
Change-Id: I307f7be0e07b1639c80f01a3205bcff9de96525a
Reviewed-by: Christopher Adams <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When new folders are received from the server, the client-side
SynchronizationEnabled flag must be set for them. Previously they were
always set to true, but if they're inside a folder that isn't being
synced, this probably doesn't reflect the user's intent.
This change makes it so that for IMAP any new folders received from the
server will have the SynchronizationEnabled flag set to whatever value
their parent has it set to. If they have no parent (i.e. are in the root
folder) then the flag is set to true as before.
Change-Id: If43d5e2b4469a402d203841c04cc4b1b30ffc3b1
Reviewed-by: Christopher Adams <[email protected]>
Reviewed-by: Matthew Vogt <[email protected]>
Reviewed-by: Damien Caliste <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the synchronizationEnabled flag is set to false, a variety
of strategy, like search, folder listing, will not search in
such folders. This is maybe a too restrictive usage of this
flag. This patch change the behavior of this flag to act on
synchronization strategies only, when desired.
It activates it only for message retrieval in all folders.
Change-Id: Iebec872984c7e2650167ae585b06bfa3d8cd6990
Reviewed-by: Christopher Adams <[email protected]>
Reviewed-by: David Llewellyn-Jones <[email protected]>
|
|
|
|
|
|
| |
Change-Id: Ifad72f55ca3988e84749d9f8868ec6d8d6c986ec
Reviewed-by: Christopher Adams <[email protected]>
Reviewed-by: David Llewellyn-Jones <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Any case where the address of an element is taken and stored or
used, must be changed to use QmfList instead of QList, otherwise
non-const operations will cause the reference to become invalid.
Change-Id: Ic0017cb9eddcf27b93d26adb3ea9c71682c4421b
Reviewed-by: Christopher Adams <[email protected]>
Reviewed-by: David Llewellyn-Jones <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The IMAP plugin previously used QNetworkSession to detect changes
in connectivity and attempt to maintain a network connection to
receive IMAP IDLE messages from the server. Unfortunately, however,
QNetworkSession and QNetworkConfiguration no longer exist in Qt6.
This commit introduces a mock IdleNetworkSession class with the
appropriate interface, to ensure that the project can build with
Qt6 and unit tests pass. Clients who wish to use QMF on real
devices should implement IdleNetworkSession using the appropriate
platform APIs available on their target device.
Change-Id: I740ebd28686f5647a327ac7a47916d15ca7eb0ac
Reviewed-by: Christopher Adams <[email protected]>
Reviewed-by: David Llewellyn-Jones <[email protected]>
|
|
|
|
|
|
| |
Change-Id: Ife7188b294dc3d89e8087674825a8805c0121d7b
Reviewed-by: Christopher Adams <[email protected]>
Reviewed-by: David Llewellyn-Jones <[email protected]>
|
|
|
|
|
|
| |
Change-Id: Iabf4dad9998e46163e4f2e2090419c662a817377
Reviewed-by: Christopher Adams <[email protected]>
Reviewed-by: David Llewellyn-Jones <[email protected]>
|