New: howto/move.detected.spam.to.junk.folder.md.

This commit is contained in:
Zhang Huangbin 2015-01-07 09:55:25 +08:00
parent 2d5efe2576
commit 5986b487b2
5 changed files with 95 additions and 66 deletions

View File

@ -0,0 +1,39 @@
# Move detected spam to Junk folder
To move detected spam to user's Junk folder, you need to enable global sieve
script in Dovecot.
You can find sample sieve rule file `/var/vmail/sieve/dovecot.sieve.sample`
if you chose `/var/vmail` to store mailboxes during iRedMail installation.
If you have a custom mailbox storage directory, the sample sieve rule file
should be `sieve/dovecot.sieve.sample` under that directory. If you cannot
find it, you can still download one from iRedMail project:
[here](https://bitbucket.org/zhb/iredmail/src/default/iRedMail/samples/dovecot/dovecot.sieve)
This file must be owned by user `vmail` and group `vmail`, permission `0500`.
Now open Dovecot config file `/etc/dovecot/dovecot.conf` (on Linux/OpenBSD)
or `/usr/local/etc/dovecot/dovecot.conf` (FreeBSD), find parameter `sieve_before =`
like below:
```
# Part of file: /etc/dovecot/dovecot.conf
plugin {
...
#sieve_before =
...
}
```
Uncomment it and set its value to `/var/vmail/sieve/dovecot.sieve` (Note:
use the correct path on your server).
```
sieve_before = /var/vmail/sieve/dovecot.sieve
```
Restart Dovecot service to enable it.
Note: we don't use `sieve_default =` for global sieve script, because it
will be ignored if users have their own personal sieve rule files.

View File

@ -62,6 +62,7 @@
<li><a href="ldap.user.mail.forwarding.html">LDAP: User mail forwarding.</a></li>
<li><a href="mailbox.sharing.html">Mailbox sharing (Sharing IMAP folder with other users)</a></li>
<li><a href="monitor.incoming.and.outgoing.mails.with.bcc.html">Monitor incoming and outgoing mails with BCC</a></li>
<li><a href="move.detected.spam.to.junk.folder.html">Move detected spam to Junk folder</a></li>
<li><a href="pipe.incoming.email.for.certain.user.to.external.script.html">Pipe incoming email for certain user to external script </a></li>
<li><a href="recalculate.mailbox.quota.html">Force Dovecot to recalculate mailbox quota</a></li>
<li><a href="reset.user.password.html">Reset user password</a></li>

View File

@ -0,0 +1,53 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Move detected spam to Junk folder</title>
<link href="./css/markdown.css" rel="stylesheet"></head>
</head>
<body>
<div id="navigation">
<a href="http://www.iredmail.org" target="_blank">iRedMail web site</a>
// <a href="./index.html">Document Index</a>
</div><h1 id="move-detected-spam-to-junk-folder">Move detected spam to Junk folder</h1>
<p>To move detected spam to user's Junk folder, you need to enable global sieve
script in Dovecot.</p>
<p>You can find sample sieve rule file <code>/var/vmail/sieve/dovecot.sieve.sample</code>
if you chose <code>/var/vmail</code> to store mailboxes during iRedMail installation.
If you have a custom mailbox storage directory, the sample sieve rule file
should be <code>sieve/dovecot.sieve.sample</code> under that directory. If you cannot
find it, you can still download one from iRedMail project:
<a href="https://bitbucket.org/zhb/iredmail/src/default/iRedMail/samples/dovecot/dovecot.sieve">here</a></p>
<p>This file must be owned by user <code>vmail</code> and group <code>vmail</code>, permission <code>0500</code>.</p>
<p>Now open Dovecot config file <code>/etc/dovecot/dovecot.conf</code> (on Linux/OpenBSD)
or <code>/usr/local/etc/dovecot/dovecot.conf</code> (FreeBSD), find parameter <code>sieve_before =</code>
like below:</p>
<pre><code># Part of file: /etc/dovecot/dovecot.conf
plugin {
...
#sieve_before =
...
}
</code></pre>
<p>Uncomment it and set its value to <code>/var/vmail/sieve/dovecot.sieve</code> (Note:
use the correct path on your server).</p>
<pre><code> sieve_before = /var/vmail/sieve/dovecot.sieve
</code></pre>
<p>Restart Dovecot service to enable it.</p>
<p>Note: we don't use <code>sieve_default =</code> for global sieve script, because it
will be ignored if users have their own personal sieve rule files.</p><p style="text-align: center; color: grey;">Document published under a <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">CC BY-ND 3.0</a> license. If you found something wrong, please do <a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.<!-- Google Analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-3293801-14");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body></html>

View File

@ -246,35 +246,7 @@ CRON=1
<h3 id="optional-enable-global-sieve-script-in-dovecot-to-move-spam-to-junk-folder-by-default">[OPTIONAL] Enable global sieve script in Dovecot to move spam to Junk folder by default</h3>
<p>Note: this is an optional step.</p>
<p>To move detected spam to user's Junk folder, you need to enable global sieve
script in Dovecot.</p>
<p>You can find sample sieve rule file <code>/var/vmail/sieve/dovecot.sieve.sample</code>
if you chose <code>/var/vmail</code> to store mailboxes during iRedMail installation.
If you have a custom mailbox storage directory, the sample sieve rule file
should be <code>sieve/dovecot.sieve.sample</code> under that directory. If you cannot
find it, you can still download one from iRedMail project:
<a href="https://bitbucket.org/zhb/iredmail/src/default/iRedMail/samples/dovecot/dovecot.sieve">here</a></p>
<p>This file must be owned by user <code>vmail</code> and group <code>vmail</code>, permission <code>0500</code>.</p>
<p>Now open Dovecot config file <code>/etc/dovecot/dovecot.conf</code> (on Linux/OpenBSD)
or <code>/usr/local/etc/dovecot/dovecot.conf</code> (FreeBSD), find parameter <code>sieve_before =</code>
like below:</p>
<pre><code># Part of file: /etc/dovecot/dovecot.conf
plugin {
...
#sieve_before =
...
}
</code></pre>
<p>Uncomment it and set its value to <code>/var/vmail/sieve/dovecot.sieve</code> (Note:
use the correct path on your server).</p>
<pre><code> sieve_before = /var/vmail/sieve/dovecot.sieve
</code></pre>
<p>Restart Dovecot service to enable it.</p>
<p>Note: we don't use <code>sieve_default =</code> for global sieve script, because it
will be ignored if users have their own personal sieve rule files.</p>
<p>Please follow our separate tutorial <a href="./move.detected.spam.to.junk.folder.html">here</a>.</p>
<h2 id="openldap-backend-special">OpenLDAP backend special</h2>
<h3 id="fix-improper-ldap-query-command-in-domain-transport-query-file">Fix improper LDAP query command in domain transport query file</h3>
<p>Please open file <code>/etc/postfix/ldap/transport_maps_domain.cf</code> (on Linux/OpenBSD)

View File

@ -223,43 +223,7 @@ CRON=1
Note: this is an optional step.
To move detected spam to user's Junk folder, you need to enable global sieve
script in Dovecot.
You can find sample sieve rule file `/var/vmail/sieve/dovecot.sieve.sample`
if you chose `/var/vmail` to store mailboxes during iRedMail installation.
If you have a custom mailbox storage directory, the sample sieve rule file
should be `sieve/dovecot.sieve.sample` under that directory. If you cannot
find it, you can still download one from iRedMail project:
[here](https://bitbucket.org/zhb/iredmail/src/default/iRedMail/samples/dovecot/dovecot.sieve)
This file must be owned by user `vmail` and group `vmail`, permission `0500`.
Now open Dovecot config file `/etc/dovecot/dovecot.conf` (on Linux/OpenBSD)
or `/usr/local/etc/dovecot/dovecot.conf` (FreeBSD), find parameter `sieve_before =`
like below:
```
# Part of file: /etc/dovecot/dovecot.conf
plugin {
...
#sieve_before =
...
}
```
Uncomment it and set its value to `/var/vmail/sieve/dovecot.sieve` (Note:
use the correct path on your server).
```
sieve_before = /var/vmail/sieve/dovecot.sieve
```
Restart Dovecot service to enable it.
Note: we don't use `sieve_default =` for global sieve script, because it
will be ignored if users have their own personal sieve rule files.
Please follow our separate tutorial [here](./move.detected.spam.to.junk.folder.html).
## OpenLDAP backend special