| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Centralize the status flags according to IMAP
possibilities into ImapClient.
Change-Id: I1019a9348f53ce98124baf297136f6e285c996dd
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
| |
Doesn't look like this is meant for public consumptions, just as
implementation detail on qmailnamespace.cpp.
Change-Id: I7dd2c3507890c954fc657214114c2581198d9921
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
Reviewed-by: Damien Caliste <dcaliste@free.fr>
|
|
|
|
|
|
| |
Change-Id: I1ab2e545d793b40435dd804403b9262ca644f337
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
Reviewed-by: Damien Caliste <dcaliste@free.fr>
|
|
|
|
|
|
|
|
|
| |
This fixes a symlink vulnerability caused by truncating
/tmp/qmf-messageserver-requests on startup.
Task-number: QTPLAYGROUND-56
Change-Id: I6e152e7ff1a84008e42f6abf5d0684af51220c33
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
| |
Add new method QMail::isMessageServerRunning() as clients have checked the
message server lock file in order to determine whether the server was running.
Change-Id: I0fcc55ae1d4d96a484257ece0c4fdd1bcf0b20d6
Reviewed-by: Damien Caliste <dcaliste@free.fr>
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
| |
Using DBus with a well known name already ensures that only a single instance
can run. Thus refactor the constructor into init method which can fail in case
of DBus errors and exit gracefully without dumping core.
Also exit gracefully in case of database incompatibility
Change-Id: I290cd438d47ea56cef4865a565c305cc2f884906
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
| |
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 <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this new method, a SmtpService can inquire the
capabilities without having to fake a message transmission
without any message. The capability fetching is
done with a dedicated client, so actions sent to the
service can be honoured while fetching.
Fetching capabilities does not require to log in, thus
it can be run any time, even with unset credentials.
Capabilities are reflected in new entries in the account.
They are fetched when the service is created for a given
account.
Change-Id: Ibcefc2f92fdaa5ec3f36f937db8d8b278b3a4f6a
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 00ab90b1c58f655fa33b487c7ed1a634c84a1a41.
This is not needed anymore since configuration is now
reloaded when newConnection() is called, ensuring latest
configuration data when running.
Additionally, calling setAccount() on account modification
may be a bit dangerous since account may be modified during
sending.
Change-Id: Iac28e541e2ec7fae93f549c4bd1794ba05fb811b
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
| |
Additionally, 'success' member was unused and removed.
Change-Id: Id593bb27c29ac605f8b5891e014886cccb2f197c
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
| |
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 <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
| |
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 <pvuorela@iki.fi>
|
|
|
|
|
| |
Change-Id: I18816772a2ce5a925cd35e73c7140dc1482d9bb5
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
| |
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 <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
| |
By default, coin is running a configuration with
TestOnly feature. But, we want to build the code
here. Tests will come later.
Change-Id: Ib50c4998e6a7c55e9f2173536f468364341bf012
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
| |
Add a dependencies.ymal file and a module_config.yaml.
The module_config.yaml is doing nothing, just making the CI
happy. After switch to cmake a simple build can be used.
Change-Id: Ic9a8af8dd478a3fdd9d6f1a8b6b78292eb705bf2
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This seems quite useless. With QMF_NO_WIDGETS it builds a plugin which
more or less has a class that returns a displayname string for itself.
With widgets it also creates a configuration widget which doesn't
have anything to adjust (storagelocations.cpp having only hard-coded empty
location).
Change-Id: I0cbbf07010a8e926101bcae9b24618b1980b0d27
Reviewed-by: Damien Caliste <dcaliste@free.fr>
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
|
|
|
|
|
|
|
|
| |
Add decryption interface to the crypto service
and implement it for PGP keys via gpgme.
Change-Id: Ib74fe36a4af69fe788bf1841ba5621ec0f3d593e
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
| |
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 <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
| |
Make sign() API to operate on a pointer on a
part, instead of a reference, to emphasis the
fact that it will change the part itself, making
it a multipart/signed container.
Change-Id: I55a1e2d15ee170909ae4aa8f2c0e8f8e88c9134c
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
| |
I doubt this has been used anywhere in long time. Also for email client
example it feels a bit strange. And there's was nothing setting it
enabled on the example.
Change-Id: I7a408ed490a84789000f2db8eebfa8324b493846
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
|
|
|
|
|
|
|
|
| |
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 <matthew.vogt@qinetic.com.au>
|
|
|
|
|
|
|
|
|
| |
Added by commit df5d21792b09f for searching plugins, and the
usage removed later by commit 8889bda929. No other needs so removing
the DEFINES.
Change-Id: Icebbc49268b32fd4a6cccc9c388ad4608a8ce488
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
messageserver.pri not used anywhere.
Neither PLUGIN_INTERNAL definition is no longer used anywhere.
The common.pri isn't too good a common file as it's mostly included
outside the src tree, only src/tools/messageserver uses it from the
actual sources. Hence removing QMF_ENABLE_LOGGING shouldn't affect
anything since it's used only in the libqmfclient for one thing.
To use that properly one has needed the definition value passed
externally.
The win/mac special case release mode I didn't understand too well
and neither did qtbase run_pro2cmake.py I was testing to proceed with
cmake build. Unsure was that CONFIG_WIN working even in qt5 or was that
some earlier thing.
The mac bundle would have been used only for unit tests and such, so
feels pointless. As neither target now even works because of d-bus ipc,
let's just remove this part.
Removing these makes the common.pri even more pointless so just moved
the INSTALL=target to few places that were using the common.pri
Change-Id: Ibfe6da554e0d452e09d08e184e22508c1af958e0
Reviewed-by: Damien Caliste <dcaliste@free.fr>
Reviewed-by: Christopher Adams <chris.adams@qinetic.com.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only one place using ENFORCE and even that could be better explicitly
handling the error case -> Remove.
Removed extra wrappers for Q_DECL_EXPORT/IMPORT. QMF_VISIBILITY not used
anywhere, thus removed. Also removed SINGLE_MODULE_QTOPIAMAIL, assuming
no need these days.
Change-Id: I86796ce16ab74cfd349cb199b41f41a052116bbd
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Reviewed-by: Damien Caliste <dcaliste@free.fr>
Reviewed-by: Christopher Adams <chris.adams@qinetic.com.au>
|
|
|
|
|
|
|
|
|
| |
Avoid link issues with certain Qt versions,
when using QCOMPARE() with static int values
clashes with methods returning uint.
Change-Id: I1eb20dbf6d140e77234e794cb1500288ea5637ba
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When saving an attachment to disk, and the
destination file already exists, the previous
solution was to change the destination to
something like <random chars>.<filename>.
This patch changes this scheme to something
like <filename>(XX).<ext>.
Change-Id: Ia7055c0862660c734c70f864fc6e34e7f890b261
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, setBody() is called to set content to an
empty part. Everywhere in the code, this method is
called like an initializer, or behind a test checking
that the part is indeed MultipartNone.
But setBody() being in the public API, nothing
restrain the user to call it on a part that
already contains something, including several
subparts.
Ensure that subparts are removed when setting
a body with content. Similar to what is done in
addAttachmentsToMultipart(), unset the attachment
flag if the part we set a body to is actually a
message itself.
Change-Id: I245c5543cd85afed1176987e190900ff930efdbb
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
| |
Allow to list *.asc and *.sig (i.e. signature data)
as attachments when they are not used in a
multipart/signed context. Only hide such files
when they are used as second part in a
multipart/signed email.
Change-Id: Ie4ac7af88f30c817b10c044d986aba44e27faaf1
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <matthew.vogt@qinetic.com.au>
Reviewed-by: Damien Caliste <dcaliste@free.fr>
Reviewed-by: Christopher Adams <chris.adams@qinetic.com.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Regression on the D-Bus ipc which introduced
e.g. Q_DECLARE_USER_METATYPE(QMailMessagePart) on qmailmessage.h.
On Qt6 the qRegisterMetaType() ends up instantiating
template<QDebug> QMailMessagePartPrivate::serialize(type)
which then fails to build due to not having << operator for
combination of QDebug and QMailMessagePartContainer::Location.
Compiler ends up spewing pages and pages of errors and warnings.
Not entirely following what's causing the difference to Qt5, and
how QDebug serialize() works with one class but not on other, but
suppose this explicit operator should be clean enough and avoiding
side-effects on the actually running code.
Change-Id: I4939e89d625ac06c682adbb5e31803e1ef019fd1
Reviewed-by: Damien Caliste <dcaliste@free.fr>
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
|
|
|
|
|
|
|
|
|
|
|
| |
QWARN() is deprecated in Qt6 and QByteArray::count() in Qt 6.4.
Both easy to avoid.
Translatable output in a unit test seems silly.
Change-Id: I9fab798cff548534789bb2830c00c650bed84143
Reviewed-by: Damien Caliste <dcaliste@free.fr>
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
|
|
|
|
|
|
|
|
| |
Qt 5.15 replaced QAbstractSocket::error with errorOccurred, and the
old name removed in Qt6.
Change-Id: Id09b1594ea2e2c10b663ecdbb7380897c2d31725
Reviewed-by: Christopher Adams <chris.adams@qinetic.com.au>
|
|
|
|
|
|
|
|
|
| |
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 <dcaliste@free.fr>
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
|
|
|
|
|
|
|
|
| |
This method is called by a timer and must be
a slot.
Change-Id: I3428174771320263d1fb667d55cff2a5c95878f7
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With QCop IPC implementation, received
signals where put in a message queue to
be processed in the next event loop
iteration. This is not needed anymore
with the DBus implementation, since
the receiving process lives in a different
thread and already submit received
signals in the event loop of the main
thread.
Change-Id: I4ebfb2b03f7ab21a27642d380b5dc2fe5c281791
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
| |
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 <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
| |
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 <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <matthew.vogt@qinetic.com.au>
|
|
|
|
|
|
|
|
|
| |
Avoid unused variable, QString conversion from ascii and move
fall through note so GCC detects it.
Change-Id: Id50a2b90c8c8c345a117c713849f65f45515eddb
Reviewed-by: Christopher Adams <chris.adams@qinetic.com.au>
Reviewed-by: Damien Caliste <dcaliste@free.fr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
That's actually a violation of the spec (RFC 2047):
https://tools.ietf.org/html/rfc2047#section-5
Each 'encoded-word' MUST represent an integral number of characters.
A multi-octet character may not be split across adjacent 'encoded-
word's.
but if charsets match, the data can be concatenated first and then
converted to characters. Which is what all other email clients seem
to be doing - I haven't found a single one which wouldn't handle it.
Change-Id: I5bbb785343ad60459fa6e52f5728fd796c7e5961
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
Reviewed-by: Christopher Adams <chris.adams@qinetic.com.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two IPC mechanisms in QMF:
- one between the messageserver and clients
to perform actions like fetch emails,
search, etc.
- one between every mailstore instances
to notify other instances of changes
in the mail database.
QCop being discontinued, this patch switchs
to use DBus as an IPC transport layer.
The first mechanism is implemented by registering
an object on the session bus (/messageserver)
providing a service (org.qt.messageserver).
The second mechanism is implemented by
registering each client as an object to the
session bus (/mailstore/client) for the
interface org.qt.mailstore. Other clients
can then listen to updated() signal on this
interface.
DBus IPC requires to implement operator<<()
and operator>>() with QDBusArgument for the
objects that need to be transported. In all
cases, each objects are serialised up to
unitary elemental elements like int, byte
arrays, etc. Except for the QMailKeyArgument
that uses first a serialisation into a
byte array before being sent. This is due to
the recursive declaration of QMailKeyArgument
with the subKeys members, not working well
with QDBusArgument serialisation.
Change-Id: I8f10b8b00f73d4b75dad778b591159a765e9fb89
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ActionObserver is responsible to spawn
ActionInfo objects when actionStarted() is
received from IPC. Then, the newly created
ActionInfo listens as normal Action for update
signals over IPC.
But, depending when the ActionInfo creation
is actually done, it may have missed IPC update
signals. To avoid this, the observer is sharing
its QMailMessageServer, and the newly created
ActionInfo can connect to signals that are still
pending in the message server.
Change-Id: I152fdcbeee7a902a0c54b58a28476cdfb31d4dbc
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a race condition in the way the observer
is listening on activity change for the actions it
is supervising. Indeed, the servicehandler is
emitting actionStarted() signal, and then
activityChanged(). The observer may receive these
signals asynchronously. But with the current
implementation, the observer starts listening at
activityChanged() after it has received the
actionStarted() one. The race condition appears
then if the servicehandler emits the activityChanged
before the observer received the actionStarted()
one.
This patch should correct this race condition by
making the observer always listen to activityChanged()
and deal with it if the activity corresponds to an
action it is supervising.
Change-Id: I339be274152e648dda50e8bb4667a8fdd70e4cba
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The possibility to transfer from client to the mail
server new or modified emails by file has been
deprecated by the usage of QMailMessageMetaDataList.
The client side implementation is already using only
the new method. So remove the server side implementation
and IPC interface.
Change-Id: I50df8ab04692748e3a1b66341f3b4cd05cc58501
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The QMailStorePrivate implementation is using cache
for read account, emails... This patch makes this
cache aware of a possible disconnection and
reconnection to the other store clients. The cache
is cleared on reconnection if the database was touched
since the last disconnection.
Change-Id: If85c66e3981b66d05ea201f72eefa3c3329bd813
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The newCountChanged signal is not used anymore
in the message server. Remove the client code
exposing it.
Remove also client method acknowledgeNewMessages()
since it's linked to newCountChanged signal to
reset the counters.
Remove the internal QMailMessageServerPrivate::initialize()
since it's not called from anywhere and the server
has no slot for this signal.
Change-Id: Id5a67c22eae2c7190c3e02ed0681eab7037f1fcc
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
|