From 5c6fdd8ccf2652e37040988e361ed860859f21a4 Mon Sep 17 00:00:00 2001 From: Baraka Kinywa Date: Sat, 29 Jun 2024 18:18:41 +0200 Subject: [PATCH] [DOC]Email filters: Cypht documentation about sieve filters --- email-filters.html | 169 +++++++++++++++++++++++++++++++++++++++++++++ features.html | 3 + 2 files changed, 172 insertions(+) create mode 100644 email-filters.html diff --git a/email-filters.html b/email-filters.html new file mode 100644 index 0000000..5e3c291 --- /dev/null +++ b/email-filters.html @@ -0,0 +1,169 @@ + + + + + + Email filters + + + + + + +
+ +
+ +
+

Email filters

+

Cypht now supports Sieve, a powerful email filtering language that gives you complete control over your inbox. With Sieve, you can create complex filters to sort, move, delete, and flag your emails automatically. You can also use Sieve to create custom notifications and alerts.

+

Here are just a few of the things you can do with Sieve:

+
+ +
+

To get started with Sieve in Cypht, simply go to your config file (hm3.ini for Cypht 1.4.x or .env for Cypht 2.0.x) and enable the Sieve filter engine by enabling modules[ ]=sievefilters or by adding sievefilters on CYPHT_MODULES variable like: + +

modules[]=sievefilters #For Cypht 1.4.x
+CYPHT_MODULES="sievefilters" #For Cypht 2.0.x
+ Once you have enabled the Sieve filter engine, you can create and manage your filters in the Filters section of the Cypht interface. You can create new filters, edit existing filters, and delete filters as needed. +

+

How to create a Sieve filter in Cypht?

+

+ To create a Sieve filter in Cypht follow these steps: +

+ + +
+

+ And there you go: 😄Enjoy filters with Cypht. +

+

Creating custom notifications and alerts: +

+

You can also use Sieve to create custom notifications and alerts for important emails. For example, you could create a filter that sends you a notification every time you receive an email from your boss. + + To create a custom notification or alert in Cypht, simply go to your settings and click on the "Filters" tab. Then, select the E-mail account you want for filters and click on the "Add Script" button. + In the "Filter name" field, enter a name for your new filter. In the "Filter script" field, enter your Sieve code. + + In addition to the Sieve code for filtering emails, you will also need to add the following code to your filter script: +

require ["fileinto", "imap4flags", "notify"];
+
+# Set variables
+set "boss_email" "boss@example.com";
+
+# Rule to match emails from your boss
+if address :is "from" "${boss_email}" {
+    # Notify you of the new email
+    notify :message "You have a new email from your boss!" :options ["Important"] :method "mailto:your-email@example.com";
+}
+

+

Some examples of Sieve filters: +

+

+ The following are some examples of Sieve filters that you can use in Cypht: +

# Filter out spam and unwanted emails
+require ["fileinto"];
+# Move all emails from the sender "spam@example.com" to the "Spam" folder
+if address :from "spam@example.com" {
+    fileinto "Spam";
+}
+        
+
# Organize your inbox automatically
+require ["fileinto"];
+# Move all emails from the sender "john.doe@example.com" to the "Work" folder
+if address :from "john.doe@example.com" {
+    fileinto "Work";
+}
+# Move all emails with the subject "Important" to the "Important" folder
+if header :subject "Important" {
+  fileinto "Important";
+}
+        
+

+

Related links:

+ http://sieve.info/
+ https://p5r.uk/blog/2011/sieve-tutorial.html
+ https://www.fastmail.com/help/technical/sieve.html
+ https://docs.gandi.net/en/gandimail/sieve/sieve_tutorial.html +

+
+ + + + + diff --git a/features.html b/features.html index f831a1b..2fdbbfa 100644 --- a/features.html +++ b/features.html @@ -151,6 +151,9 @@

List of Features

the menu without having to enter them again. This is particularly useful for parameters of searches that are used frequently. Saved search parameters can also be deleted later. +
  • + Sieve filters can be created to automatically move, copy, or delete messages based on specific criteria such as sender, subject, keywords, or recipient. This allows for efficient organization and management of incoming emails, saving time and improving productivity. Sieve filters can be easily edited or deleted as needed. For more information on how to create and manage Sieve filters, see Email filters. +