Alternc  3.2
Alternc logiel libre pour l'h├ębergement
 All Data Structures Namespaces Files Functions Variables Pages
avelsieve-config.php
Go to the documentation of this file.
1 <?php
2 
3 // WARNING: Do not edit this file, edit the one in /etc/alternc/templates and launch alternc.install again.
4 
5 /**
6  * User-friendly interface to SIEVE server-side mail filtering.
7  * Plugin for Squirrelmail 1.4+
8  *
9  * Licensed under the GNU GPL. For full terms see the file COPYING that came
10  * with the Squirrelmail distribution.
11  *
12  * This file contains configuration parameters for SIEVE mail filters plugin
13  * (aka avelsieve)
14  *
15  * @version $Id: config_sample.php 1025 2009-05-21 08:35:24Z avel $
16  * @author Alexandros Vellis <avel@users.sourceforge.net>
17  * @copyright 2002-2004 Alexandros Vellis
18  * @package plugins
19  * @subpackage avelsieve
20  */
21 
22 /**
23  * Debug Mode. Enable this (change to 1) if you need to send a bug report,
24  * or to 2 or 3 if you are a developer!
25  *
26  * Valid values:
27  * 0 = No debugging output
28  * 1 = Normal debugging output
29  * 2 = Firebug-enhanced debugging output
30  * 3 = Enhanced debugging output and no Sieve capabilities checks - enables
31  * all UI features!
32  */
33 if(!defined('AVELSIEVE_DEBUG')) {
34  define('AVELSIEVE_DEBUG', 0);
35 }
36 
37 /* ======================================================================== */
38 /* =================== IMAP Server / SIEVE Setup ========================= */
39 /* ======================================================================== */
40 
41 /** @var string Backend to use. Available backends are:
42  * 'ManageSieve': Uses the ManageSieve protocol. e.g. Cyrus
43  * 'File': Writes files straight to disk. e.g. Exim4, Dovecot LDA.
44  */
46 $avelsieve_backend = 'ManageSieve';
47 
48 
49 
50 /* ======================================================================== */
51 /* =================== ManageSieve Backend Options ======================== */
52 /* ======================================================================== */
53 
54 /* Port where timsieved listens on the Cyrus IMAP server. Default is 2000. */
55 
56 /** DEBIAN CHANGE: Depsite upstream's intention Debian changed this default
57  * distribution wide to 4190 which is thus default here.
58  */
59 
60 global $sieveport;
61 $sieveport = 2000;
62 
63 /**
64  * @var string Space separated list of preferred SASL mechanisms for the
65  * authentication to timsieved. e.g. "PLAIN DIGEST-MD5";*/
66 
68 $sieve_preferred_sasl_mech = 'PLAIN';
69 
70 /**
71  * @var boolean Disable STARTTLS for ManageSieve. You can set this to true,
72  * if you do not wish to use encryption via TLS mechanisms (i.e. the server
73  * is not configured properly, or this is a local connection and TLS is not
74  * needed.
75  * Note that STARTTLS is supported only in PHP5+. In PHP4 this option will
76  * have no effect and STARTTLS will be disabled anyway.
77  *
78  * DEBIAN CHANGE:
79  * To properly work with a default cyrus installation on the same host as
80  * SquirrelMail $avelsieve_disabletls defaults to true.
81  */
83 $avelsieve_disabletls = true;
84 
85 /* ======================================================================== */
86 /* ======================= File Backend Options =========================== */
87 /* ======================================================================== */
88 
90 $avelsieve_file_backend_options = array(
91  'avelsieve_default_file' => "$data_dir/$username.sievesource"
92 );
93 
94 /* ======================================================================== */
95 /* ====== Implementation- and Server-Specific Options ==================== */
96 /* ======================================================================== */
97 
98 
99 /* In Cyrus 2.3+, the notification action is a bit more complex than the
100  * others. The oldcyrus variable is for supporting the partially implemented
101  * notify extension implementation of Cyrus < 2.3. If you have Cyrus < 2.3,
102  * just set this to true.
103  *
104  * This only changes the informational / help text displayed in avelsieve.
105  *
106  * Cyrus < 2.3 : $from$, $env-from$, $subject$
107  * Cyrus 2.3+ : $from$, $env-from$, $subject$, $text$, $text[n]$
108  */
110 $avelsieve_oldcyrus = true;
111 
112 /* If you have Cyrus with an lmtpd that can understand the "auth" argument to
113  * the :envelope test as the SMTP/LMTP auth, or any other Sieve implementation,
114  * then you can enable this to provide this functionality to the user.
115  *
116  * This was not clarified in the base spec of RFC 3028. It will be done
117  * correctly in a new version of Cyrus, based on a new draft / spec.
118  */
120 $avelsieve_enable_envelope_auth = true;
121 
122 /* Some Implementations of Sieve need certain things in order to operate
123  * correctly. If you use any of the following server implementations, you MUST
124  * set this variable to the corresponding value for the filtering to work
125  * correctly.
126  * Valid values are:
127  * - Any RFC3028-mostly-compatible implementation: '' (empty).
128  * - Exim MTA: 'exim'
129  * - MFL (as supported by mvmf): 'mfl'
130  */
132 $avelsieve_custom_sieve_implementation = '';
133 
134 
135 /* For delivery agents that don't know how to handle some mailbox prefixes, you
136  * can enable this option. Example for Dovecot LDA: 'INBOX.';
137  */
139 $avelsieve_striproot = '';
140 
141 /* If the backend does not support capabilities reporting, such as the File
142  * Backend, then you should define which capabilities are used by the server
143  * implementation.
144  *
145  * The following are the capabilities supported by Exim4 as of Exim version
146  * 4.60, according to README.SIEVE. You can change them if a new version of
147  * Exim provides more functionality:
148  * 'envelope', 'fileinto', 'copy', 'vacation', 'comparator-i;ascii-numeric'
149  *
150  * The following are the capabilities that are suported by MFM, according to:
151  * http://www.mvmf.org/mfl/language.shtml#sieve
152  * 'envelope', 'fileinto', 'reject', 'relational', 'subaddress', 'regex',
153  * 'editheader', 'copy', 'vacation', 'comparator-i;ascii-casemap',
154  * 'comparator-i;octet'
155  *
156  * The following capabilities have been reported to work with Dovecot LDA:
157  * 'envelope', 'fileinto', 'copy', 'vacation', 'comparator-i;ascii-numeric',
158  * 'imapflags', 'subaddress','relational','regex'
159  *
160  */
162 $avelsieve_hardcoded_capabilities = array(
163  'envelope', 'fileinto', 'copy', 'vacation', 'comparator-i;ascii-numeric'
164 );
165 
166 
167 /** @var boolean Enable ImapProxy mode.
168  * If you use imapproxy, because imapproxy cannot understand and proxy the
169  * SIEVE protocol, you must connect to the SIEVE daemon (usually on the IMAP
170  * server) itself. So you need to set $imapproxymode to true, and define a
171  * mapping, from the imapproxy host (usually localhost) to your real IMAP
172  * server (usually the same that is defined on Imapproxy's configuration).
173  *
174  * This will not work if you use a perdition-style proxy, where different users
175  * go to different IMAP servers; it applies mostly to people running imapproxy
176  * for speed and want a quick hack. */
177 
179 $avelsieve_imapproxymode = false;
180 $avelsieve_imapproxyserv = array(
181  'localhost' => 'imap.example.org'
182 );
183 
184 /** @var boolean Ldapuserdata mode: Gets user's email addresses (including
185  * mailAlternate & mailAuthorized) from LDAP Prefs Backend plugin's cache */
186 
188 $avelsieve_ldapuserdatamode = false;
189 
190 /** @var array Map of cyrus administrator users, for proxy authentication */
191 
193 $avelsieve_cyrusadmins_map = array(
194  'cyrusimap' => 'cyrussieve'
195 );
196 
197 
198 
199 /* ======================================================================== */
200 /* =============== Avelsieve Interface / Behavior Setup ================== */
201 /* ======================================================================== */
202 
203 /* Be conservative to our updates on the SIEVE server? If true, a button
204  * entitled "Save Changes" will appear, which will give the user the
205  * functionality to register her changes. 'false' is recommended. */
207 
208 /* Use images for the move up / down, delete rule buttons and STOP? */
209 
210 $useimages = true;
211 
212 /* Translate the messages returned by the "Reject" and "Vacation" actions? The
213  * default behaviour since 0.9 is not to translate them. Change to true if in
214  * an intranet environment or in a same-language environment. */
215 
217 $translate_return_msgs = false;
218 
219 /* Theme to use for the images. A directory with the same name must exist under
220  * plugins/avelsieve/$imagetheme, that contains the files: up.png, down.png,
221  * del.png, dup.png, edit.png, top.png, bottom.png. */
222 
223 $imagetheme = 'famfamfam';
224 //$imagetheme = 'bluecurve_24x24';
225 //$imagetheme = 'bluecurve_16x16';
226 
227 /* Number of items to display _initially_, when displaying the header match
228  * rule */
229 global $startitems;
230 $startitems = 3;
231 
232 /* Maximum number of items to allow in one header match rule. */
233 global $maxitems;
234 $maxitems = 10;
235 
236 /* Headers to display in listbox widget, when adding a new header rule. */
237 
238 global $headers;
239 $headers = array(
240  'From', 'To', 'Cc', 'Bcc', 'Subject', 'Reply-To', 'Sender', 'List-Id',
241  'MailingList', 'Mailing-List', 'X-ML-Name', 'X-List', 'X-List-Name', 'X-Mailing-List',
242  'Resent-From', 'Resent-To', 'X-Mailer', 'X-Mailing-List',
243  /* debian and ubuntu flags */
244  'X-PTS-Package', 'X-Loop', 'X-Debian-PR-Message', 'X-Debian-PR-Package',
245  'X-Debian-PR-Keywords', 'X-Debian-PR-Source', 'X-PTS-Keyword',
246  'X-Debian', 'X-Debian-Package',
247  'X-Launchpad-Bug', 'X-Launchpad-Bug-Private', 'X-Launchpad-Bug-Security-Vulnerability',
248  'X-Launchpad-Message-Rationale', 'X-Generated-By',
249  /* debian and ubuntu flags end */
250  'X-Spam-Flag', 'X-Spam-Status',
251  'X-Priority', 'Importance', 'X-MSMail-Priority', 'Precedence',
252  'Return-Path', 'Received', 'Auto-Submitted',
253  'X-Spam-Flag', 'X-Spam-Status','X-Spam-Tests'
254  );
255 
256 /* Available :method's for the :notify extension (if applicable) */
258 $notifymethods = array(
259 'mailto', 'sms'
260 );
261 /* use the value "false" if you want to provide a simple input box so that
262  * users can edit the method themselves : */
263 //$notifymethods = false;
264 
265 
266 /* Capabilities to disable. If you would like to force avelsieve not to display
267  * certain features, even though there _is_ a capability for them by
268  * Cyrus/timsieved, you should specify these here. For instance, if you would
269  * like to disable the notify extension, even though timsieved advertises it,
270  * you should add 'notify' in this array: $force_disable_avelsieve_capability =
271  * array("notify");. This will still leave the defined feature on, and if the
272  * user can upload her own scripts then she can use that feature; this option
273  * just disables the GUI of it. Leave as-is (empty array) if you do not need
274  * that.
275  *
276  * Look in $implemented_capabilities array in include/constants.inc.php for
277  * valid values */
278 
279 // $disable_avelsieve_capabilities = array("notify");
281 $disable_avelsieve_capabilities = array();
282 
283 /* Display Filters link in the top Squirrelmail header? */
284 
286 $avelsieveheaderlink = true;
287 
288 /* Default rules table display mode, one of 'verbose' or 'terse' */
290 $avelsieve_default_mode = 'terse';
291 
292 
293 
294 /* ======================================================================== */
295 /* ========================= Custom rules Configuration =================== */
296 /* ======================================================================== */
297 
298 /**
299  * @var array
300  * List of additional rules to enable. This must be the numeric id of the
301  * rule.
302  *
303  * 10: Spam Rule (as existed in Avelsieve)
304  * 11: Junk-Mail Rule (new-style SPAM Rule, only one exists per Sieve script)
305  * 12: Global Whitelist (only one exists per Sieve script)
306  * 13: Custom Sieve Code (allows users to enter whatever Sieve code they like -
307  * Alpha/Experimental)
308  *
309  * Example:
310  * array(11, 12);
311  */
313 $avelsieve_enable_rules = array();
314 
316 $avelsieve_rules_settings = array();
317 foreach($avelsieve_enable_rules as $r) {
318  if(file_exists(SM_PATH . 'plugins/avelsieve/config/rule.'.$r.'.php')) {
319  require(SM_PATH . 'plugins/avelsieve/config/rule.'.$r.'.php');
320  } else {
321  require(SM_PATH . 'plugins/avelsieve/config/rule.'.$r.'.default.php');
322  }
323 }
324 
325 /* Please keep the following setting false; it is alpha + needs Squirrelmail
326  * to be patched in three or four places. */
327 
329 
330