Skip to content

Commit

Permalink
[ISSUE-1257] Delete ContactsCollection
Browse files Browse the repository at this point in the history
- Removed ContactsCollection usage from mailetcontainer.xml in tests
- Removed references of ContactsCollection from documentation
- Removed all code belonging to ContactsCollection
  • Loading branch information
HoussemNasri authored and Arsnael committed Nov 19, 2024
1 parent 5d75ab3 commit cf948ed
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 597 deletions.
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/tmail-backend/configure/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ The mailet configuration requires the following parameters:
* `exchange_type`: type of the exchange. Can be "direct", "fanout", "topic", "headers". Optional, defaults to "direct".

=== Example
This configuration forwards contacts collected by the `ContactsCollection` mailet to OpenPaas through the AMQP protocol.
This configuration forwards contacts extracted by the `ContactExtractor` mailet to OpenPaas through the AMQP protocol.

[source,xml]
----
<mailet match="SenderIsLocal" class="com.linagora.tmail.mailets.ContactsCollection">
<mailet match="SenderIsLocal" class="ContactExtractor">
<attribute>extractedContacts</attribute>
</mailet>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ The user is able to autocomplete over his personal contacts and domain contacts

== Storing account contacts when sending mails

An administrator needs to rely on the `ContactsCollection` mailet in `mailetcontainer.xml` configuration file
in order to extract the recipient contacts of a message and index them asynchronously. This mailet also stores
them as JSON in a specified message attribute.

For example:
An administrator can use a combination of the `ContactExtractor` and `IndexContacts` mailets in the `mailetcontainer.xml` configuration file
in order to extract the recipient contacts of a message and index them asynchronously.

For example, in the configuration below, TMail will extract the list of recipients every time the current user sends an email and store them in the `ExtractedContacts` attribute. Then, the `IndexContacts` mailet will index them to enable the autocomplete feature.
....
<mailet match="SenderIsLocal" class="com.linagora.tmail.mailets.ContactsCollection">
<attribute>ExtractedContacts</attribute>
<mailet match="All" class="ContactExtractor">
<attribute>ExtractedContacts</attribute>
</mailet>
<mailet match="All" class="IndexContacts">
<attribute>ExtractedContacts</attribute>
</mailet>
....

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@
<mailet match="All" class="Sieve"/>
<mailet match="All" class="AddDeliveredToHeader"/>
<mailet match="All" class="org.apache.james.jmap.mailet.filter.JMAPFiltering"/>
<mailet match="SenderIsLocal" class="com.linagora.tmail.mailets.ContactsCollection">
<mailet match="SenderIsLocal" class="ContactExtractor">
<attribute>ContactAttribute1</attribute>
</mailet>
<mailet match="SenderIsLocal" class="com.linagora.tmail.mailets.IndexContacts">
<attribute>ContactAttribute1</attribute>
</mailet>
<mailet match="All" class="com.linagora.tmail.mailets.TmailLocalDelivery"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@
<mailet match="All" class="Sieve"/>
<mailet match="All" class="AddDeliveredToHeader"/>
<mailet match="All" class="org.apache.james.jmap.mailet.filter.JMAPFiltering"/>
<mailet match="SenderIsLocal" class="com.linagora.tmail.mailets.ContactsCollection">
<mailet match="SenderIsLocal" class="ContactExtractor">
<attribute>ContactAttribute1</attribute>
</mailet>
<mailet match="SenderIsLocal" class="com.linagora.tmail.mailets.IndexContacts">
<attribute>ContactAttribute1</attribute>
</mailet>
<mailet match="All" class="com.linagora.tmail.mailets.TmailLocalDelivery"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@
<mailet match="All" class="Sieve"/>
<mailet match="All" class="AddDeliveredToHeader"/>
<mailet match="All" class="org.apache.james.jmap.mailet.filter.JMAPFiltering"/>
<mailet match="SenderIsLocal" class="com.linagora.tmail.mailets.ContactsCollection">
<mailet match="SenderIsLocal" class="ContactExtractor">
<attribute>ContactAttribute1</attribute>
</mailet>
<mailet match="SenderIsLocal" class="com.linagora.tmail.mailets.IndexContacts">
<attribute>ContactAttribute1</attribute>
</mailet>
<mailet match="All" class="com.linagora.tmail.mailets.TmailLocalDelivery"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@
<mailet match="All" class="Sieve"/>
<mailet match="All" class="AddDeliveredToHeader"/>
<mailet match="All" class="org.apache.james.jmap.mailet.filter.JMAPFiltering"/>
<mailet match="SenderIsLocal" class="com.linagora.tmail.mailets.ContactsCollection">
<mailet match="SenderIsLocal" class="ContactExtractor">
<attribute>ContactAttribute1</attribute>
</mailet>
<mailet match="SenderIsLocal" class="com.linagora.tmail.mailets.IndexContacts">
<attribute>ContactAttribute1</attribute>
</mailet>
<mailet match="All" class="com.linagora.tmail.mailets.TmailLocalDelivery"/>
Expand Down

This file was deleted.

Loading

0 comments on commit cf948ed

Please sign in to comment.