Граф коммитов

75 Коммитов

Автор SHA1 Сообщение Дата
Daniel Kesselberg 369def711a
Fix psalm warnings
- Account.getEmail() returns always a string
- Add import for str_contains to DataUriParser
- IspDb.query return outdated docblock
- MimeMessage.parse update return type in docblock
- Suppress undefined function for str_contains (polyfill is shipped with nextcloud/3rdparty)
- Add type cast for IMAPMessage.loadBodyData to detect type properly
- Add type for mapSocketTypeToSecurity
- Suppress undefined class for doctrine

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2022-09-20 11:32:51 +02:00
Anna Larch 2dcf8b9576 Add imip processing
Signed-off-by: Anna Larch <anna@nextcloud.com>
2022-09-09 13:16:23 +02:00
Richard Steinmetz 2c43f6a1c4
Fix conversion of imip data charset encoding
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2022-07-22 10:26:51 +02:00
Anna Larch ee4ddff53b Add iMIP parsing
Signed-off-by: Anna Larch <anna@nextcloud.com>
2022-07-14 12:36:36 +02:00
Christoph Wurst 91610d4224
Add PHP8.1 support
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-23 13:45:29 +02:00
Christoph Wurst 93d11269c2
Fix memory leak when accessing Horde headers
Horde offers access to headers either unparsed, as stream or parsed into
an object. Before the patch we used the latter. That has the current bug
that it opens a PHP memory stream, parses into an object but leaves the
stream open. If this is done thousands of times, there is a considerate
amount of memory that doesn't get freed.

With the patch we request just the stream, trigger the parsing ourselves
and close the stream afterwards. This frees the memory.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-12 14:23:41 +02:00
Anna Larch 2422e15270 Create anti spam report feature
Signed-off-by: Anna Larch <anna@nextcloud.com>
2021-08-24 12:41:14 +02:00
Christoph Wurst 14c72bf356
Do not trim null message IDs
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-08-11 10:00:00 +02:00
Robert Timm b2cdc5a8ac fix: handle invalid imap message id
When IMAPMessage.toDbMessage() encountered an invalid messageId it was
creating a DB Message without messageId. This leads for example to
TagMapper::tagMessage() to fail because it must not be called with a
null messageId.

This patch leverages the functionality to create a valid messageId in
case the messageId was missing completely. It now uses it as well for
invalid messageIds not accepted by Horde_Mail_Rfc822_Identification and
therefore not set by Message.setMessageId().

An example for an invalid messageId I encountered in my inbox is
Message-ID: <359f166ea1b402e793c0801834a9722a-support@aruba-studios.de
(The closing > bracket is missing).

Signed-off-by: Anna Larch <anna@nextcloud.com>
2021-08-06 18:52:26 +02:00
Daniel Kesselberg bcf4789e3c
Show inline attachments for plain text emails.
We distinguish between attachments (content-disposition: attachment) and inlineAttachments (content-disposition: inline).

For html messages we have a filter to replace a reference inside the message with an url to embed the attachment into the message.

For plain text messages it's not possible to embed / inline an attachment. In this case we merge inline attachments into attachments.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-07-14 21:24:56 +02:00
dependabot[bot] 705b34b8ba
Bump psalm/phar from 4.7.1 to 4.8.1
Bumps [psalm/phar](https://github.com/psalm/phar) from 4.7.1 to 4.8.1.
- [Release notes](https://github.com/psalm/phar/releases)
- [Commits](https://github.com/psalm/phar/compare/4.7.1...4.8.1)

---
updated-dependencies:
- dependency-name: psalm/phar
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-07-14 15:45:01 +02:00
Anna Larch d1741deefc Tag messages in classifier
Signed-off-by: Anna Larch <anna@nextcloud.com>
2021-06-22 11:19:10 +02:00
Anna Larch 6fce9e02fb Add $ back to label creation process
Signed-off-by: Anna Larch <anna@nextcloud.com>
2021-06-21 10:32:45 +02:00
Anna Larch 93519a7212 Cast Evolution Labels to our implementation
Signed-off-by: Anna Larch <anna@nextcloud.com>
2021-06-15 16:08:19 +02:00
Christoph Wurst b61983e6e1
Merge pull request #5080 from nextcloud/fix/4463/adds-text-calendar-attachment-support
Adds support for text/calendar attachment
2021-06-10 08:25:23 +02:00
Daniel Kesselberg 6c834c1540
Add custom user tags
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-05-28 22:45:52 +02:00
Cyrille Bollu aa6bbb2e09 Adds a fallback when attachment is a text/calendar an no attachment
name can be found

Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
2021-05-28 14:49:22 +02:00
Cyrille Bollu 63a6817023 Adds support for text/calendar attachments
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
2021-05-28 14:27:54 +02:00
Thomas Citharel cc68b3d834
Correctly truncate multibyte strings to fit into the database
Same as https://github.com/nextcloud/server/pull/26755

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-26 10:55:49 +02:00
Anna Larch bab20674a3 Filter nonjunk and forwarded
Signed-off-by: Anna Larch <anna@nextcloud.com>
2021-04-15 15:51:58 +02:00
Cyrille Bollu 9dfd838dda
Uses Horde_Mime_Part->isAttachment() as much as possible.
Creates a new 'inlineAttachments' property for IMAPMessages to hold those 'inline attachments' (that's MIME parts having their content-disposition header set to 'inline')

Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-03-25 17:22:34 +01:00
Anna Larch 83a58623b1
Add tagging to messages
Signed-off-by: Anna Larch <anna@nextcloud.com>
2021-03-22 18:06:02 +01:00
Cyrille Bollu 17d61fc7c9
Do not forward inline images at attachments
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
2021-03-11 14:03:33 +01:00
Christoph Wurst 16c1f64f23
Generate an IMAP message ID when it's missing
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-03-10 09:55:40 +01:00
Anna Larch 4cc2dd73fd Save important flag to IMAP if permflags enabled
Signed-off-by: Anna Larch <anna@nextcloud.com>
2021-02-26 14:45:01 +01:00
Christoph Wurst d03f30e7f0
Avoid usage of Horde header query as it causes issues with php8
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-02-18 15:50:44 +01:00
Cyrille Bollu ea362877b1 Avoids using iconv with '//IGNORE' flag if possible
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
2021-02-02 15:50:51 +01:00
Cyrille Bollu 8f402ab8db Makes sure email subject is valid UTF-8
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
2021-02-01 13:55:55 +01:00
dependabot-preview[bot] 4039442918 Bump nextcloud/coding-standard from 0.4.0 to 0.5.0
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/nextcloud/coding-standard/releases)
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud/coding-standard/compare/v0.4.0...v0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-18 11:49:49 +01:00
Daniel Kesselberg dce93038e5 Sent and request mdn (read confirmation)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-01-14 13:11:42 +01:00
Christoph Wurst ca1b379a5f
Add forward as attachment
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-17 08:38:10 +01:00
Cyrille Bollu 67d75c3173
Add original attachments when forwarding a mail
Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 15:05:45 +01:00
Christoph Wurst 0a1e1ad8bc
Fix more type and nullable errors
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-09 10:30:55 +02:00
Christoph Wurst e0498435f1
Fix wrong documented type
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-09 09:52:21 +02:00
Christoph Wurst 7143b9cb68
Fix psalm errors
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-08 15:36:42 +02:00
Christoph Wurst e0818beaf8
Add a debug-only file download for threading data
Threading still doesn't work for some messages. To debug this more
easily, especially for non devs, this adds a new action menu entry to
download all relevant threading data as a simple JSON. The maintainers
can then look at those files, put them into unit tests and see why they
messages don't group.

Again, this entry won't be shown on production instances but only if
debug mode is enabled.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-09-23 09:55:34 +02:00
Christoph Wurst 9498ebac6e
Rework the routing
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 20:21:40 +02:00
Christoph Wurst b7e2e390a7
Clean up mix up of ID, UID and UUID
* ID is supposed to be the database ID
* UID is the IMAP UID
* UUID is the globally unique identifier used in the front-end

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-17 15:26:22 +02:00
Christoph Wurst dc2cd0cea5
Store the `references`, `in-reply-to` and the thread root id
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-03 16:38:17 +02:00
Christoph Wurst ecea39df8c
Simplify seen/unseen flag to the IMAP standard
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-05-12 13:55:01 +02:00
GretaD 85577232d3
Add mark as junk
Signed-off-by: GretaD <gretadoci@gmail.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-05-12 13:54:55 +02:00
Christoph Wurst e8772dabcc
Make it possible to mark messages important
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-23 09:48:59 +02:00
Christoph Wurst 7f32cfe657
Update to nextcloud coding standard v0.3.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-14 16:06:46 +02:00
Christoph Wurst 5cff39b7ce
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 14:02:00 +01:00
Christoph Wurst ac4a7ba08f
Add psalm and apply auto fixes
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-02-26 14:10:51 +01:00
Christoph Wurst 90a90dd24d
Add a lazy structure analyzation to get the attachments icon back
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-02-10 13:32:34 +01:00
Christoph Wurst c287787f8d
Add a cache for IMAP message in the database
Co-authored-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-01-31 16:43:51 +01:00
Christoph Wurst 7942f00f94
Show embedded messages as attachments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-01-24 14:52:07 +01:00
Christoph Wurst 95037723a9
Fix vanishing newlines of plaintext drafts
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-01-13 18:47:08 +01:00
Christoph Wurst 150716df34
Use KItinerary to extract information from emails and attachments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-01-08 14:01:06 +01:00