Skip to content

Commit

Permalink
[DOC]Email filters: Cypht documentation about sieve filters
Browse files Browse the repository at this point in the history
  • Loading branch information
Baraka24 committed Jun 30, 2024
1 parent 21f80cf commit 5c6fdd8
Show file tree
Hide file tree
Showing 2 changed files with 172 additions and 0 deletions.
169 changes: 169 additions & 0 deletions email-filters.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Email filters</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="img/icon.ico">
<link rel="stylesheet" href="site.css">
</head>
<body>
<header>
<nav class="navbar navbar-expand-lg navbar-dark fixed-top">
<div class="container">
<a class="navbar-brand" href="index.html">
<img src="img/logo.svg" width="120" height="60" alt="">
</a>
<button class="navbar-toggler toggler-home" type="button" data-toggle="collapse"
data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse " id="navbarSupportedContent">
<ul class="navbar-nav ml-lg-auto">
<li class="nav-item">
<a class="nav-link" href="index.html">Home <span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="features.html">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="security.html">Security</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="modules.html">Mods</a>
</li>
<li class="nav-item">
<a class="nav-link" href="license.html">License</a>
</li>
<li class="nav-item">
<!--<a class="nav-link" href="tests.html">Test</a>-->
</li>
<li class="nav-item">
<a class="nav-link" href="documentation.html">Documentation</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://unencumberedbyfacts.com" target="_blank">Blog</a>
</li>
<li class="nav-item">
<a onclick="document.getElementsByClassName('navbar-collapse')[0].style.display='none';"
class="nav-link" href="contribute.html">Contribute</a>
</li>
</ul>
</div>
</div>
</nav>
</header>

<section class="content-section container">
<h2>Email filters</h2>
<p>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.</p>
<p>Here are just a few of the things you can do with Sieve:</p>
<hr>
<ul>
<li>
Filter out spam and unwanted emails. Sieve filters can be used to filter out spam and unwanted emails based on their sender, subject, or content.
</li>
<hr>
<li>
Organize your inbox automatically. Sieve filters can be used to automatically move or copy your emails into different folders based on their sender, subject, or content.
</li>
<hr>
<li>
Forward important emails to specific people. Sieve filters can be used to automatically forward important emails to specific people, such as your manager or your assistant.
</li>
<hr>
<li>
Sieve filters can be used to create custom notifications and alerts for important emails, such as those from your boss or clients. Unlike simply forwarding the email, these notifications and alerts can provide immediate and specific information, ensuring you stay updated without needing to sift through your inbox.
</li>
<hr>
</ul>
<br/>
<p> 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:

<pre>modules[]=sievefilters #For Cypht 1.4.x
CYPHT_MODULES="sievefilters" #For Cypht 2.0.x</pre>
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.
</p>
<h3>How to create a Sieve filter in Cypht?</h3>
<p>
To create a Sieve filter in Cypht follow these steps:
</p>

<ul>
<li>
Go to <b>Settings</b> tab in the sidebar.<br/>Then click on <b>Filters</b> tab, select the E-mail account you want for filters and click on the "Add Filter" button.
</li>
<li>
In the "Filter name" field, enter a name for your new filter. Then, provide other details of the filter:<br>
<ul>
<li><b>Priority</b>: It defines an order value (or priority value) for your filter. Note that filters will run from the lowest to the highest priority value.</li>
<li><b>Test</b>: This will help to combine two or more conditions.</li>
</ul>
</li>
<li>
In the "Conditions section", <br>
you can add one or many conditions to your filter. You can add conditions based on the sender, subject, body, etc. Check out the <a href="documentation.html">documentation</a> page for other information.
</li>
</ul>
<br/>
<p>
And there you go: 😄Enjoy filters with Cypht.
</p>
<h3>Creating custom notifications and alerts:
</h3>
<p>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:
<pre>require ["fileinto", "imap4flags", "notify"];

# Set variables
set "boss_email" "[email protected]";

# 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:[email protected]";
}</pre>
</p>
<h3>Some examples of Sieve filters:
</h3>
<p>
The following are some examples of Sieve filters that you can use in Cypht:
<pre># Filter out spam and unwanted emails
require ["fileinto"];
# Move all emails from the sender "[email protected]" to the "Spam" folder
if address :from "[email protected]" {
fileinto "Spam";
}
</pre>
<pre># Organize your inbox automatically
require ["fileinto"];
# Move all emails from the sender "[email protected]" to the "Work" folder
if address :from "[email protected]" {
fileinto "Work";
}
# Move all emails with the subject "Important" to the "Important" folder
if header :subject "Important" {
fileinto "Important";
}
</pre>
</p>
<h3>Related links:</h3>
<a href="http://sieve.info/">http://sieve.info/</a><br>
<a href="https://p5r.uk/blog/2011/sieve-tutorial.html">https://p5r.uk/blog/2011/sieve-tutorial.html</a><br>
<a href="https://www.fastmail.com/help/technical/sieve.html">https://www.fastmail.com/help/technical/sieve.html</a><br>
<a href="https://docs.gandi.net/en/gandimail/sieve/sieve_tutorial.html">https://docs.gandi.net/en/gandimail/sieve/sieve_tutorial.html</a>
<br/><br/>
</section>

<script src="jquery.slim.min.js"></script>
<script src="bootstrap.bundle.min.js"></script>
</body>
</html>
3 changes: 3 additions & 0 deletions features.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ <h2>List of Features</h2>
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.
</li>
<li>
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 <a href="email-filters.html">Email filters</a>.
</li>
</ul>
<hr>
</section>
Expand Down

0 comments on commit 5c6fdd8

Please sign in to comment.