~ubuntu-dev/ubuntu/lucid/dovecot/lucid-201002101901

« back to all changes in this revision

Viewing changes to libsieve/examples/vivil.sieve

  • Committer: Chuck Short
  • Date: 2010-01-21 20:21:25 UTC
  • mfrom: (4.1.11 squeeze)
  • Revision ID: zulcss@ubuntu.com-20100121202125-pme73o491kfwj5nc
* Merge from debian testing, remaining changes:
  + Add new binary pkg dovecot-postfix that integrates postfix and dovecot
    automatically: (LP: #164837)
  + debian/control:
    - add new binary with short description
    - set Architecture all for dovecot-postfix (LP: #329878)
  + debian/dovecot-postfix.postinst:
    - create initial certificate symlinks to snakeoil.
    - set up postfix with postconf to:
      - use Maildir/ as the default mailbox.
      - use dovecot as the sasl authentication server.
      - use dovecot LDA (deliver).
      - use tls for smtp{d} services.
    - fix certificates paths in postfix' main.cf
    - add reject_unauth_destination to postfix' recipient restrictions
    - add reject_unknown_sender_domain to postfix' sender restriction
    - rename configuration name on remove, delete on purge
    - restart dovecot after linking certificates
    - handle use case when postfix is unconfigurated
  + debian/dovecot-postfix.dirs: create backup directory for postfix's config
    configuration
  + restart postfix and dovecot.
  + debian/dovecot-postfix.postrm:
    - remove all dovecot related configuration from postfix.
    - restart postfix and dovecot.
  + debian/dovecot-common.init:
    - check if /etc/dovecot/dovecot-postfix.conf exists and use it
      as the configuration file if so.
  + debian/patches/warning-ubuntu-postfix.dpatch
    - add warning about dovecot-postfix.conf in dovecot default
      configuration file
  + debian/patches/dovecot-postfix.conf.diff:
    - Ubuntu server custom changes to the default dovecot configuration for
      better interfation with postfix.
    - enable sieve plugin.
    - Ubuntu server custom changes to the default dovecot configuration for
      better integration with postfix:
      - enable imap, pop3, imaps, pop3s and managesieve by default.
      - enable dovecot LDA (deliver).
      - enable SASL auth socket in postfix private directory
   + debian/rules:
     - copy, patch and install dovecot-postfix.conf in /etc/dovecot/.
     - build architecure independent packages too
   + Use Snakeoil SSL certificates by default.
     - debian/control: Depend on ssl-cert.
     - debian/patches/ssl-cert-snakeoil.dpatch: Change default SSL cert
       paths to snakeoil.
     - debian/dovecot-common.postinst: Relax grep for SSL_* a bit.
   + Add autopkgtest to debian/tests/*.
   + Fast TearDown: Update the lsb init header to not stop in level 6.
   + Add ufw integration:
     - Created debian/dovecot-common.ufw.profile.
     - debian/rules: install profile.
     - debian/control: suggest ufw.
   + debian/{control,rules}: enable PIE hardening.
   + dovecot-imapd, dovecot-pop3: Replaces dovecot-common (<< 1:1.1). (LP: #254721)
   + debian/control: Update Vcs-* headers.
   + Add SMTP-AUTH support for Outlook (login auth mechanism)
* New upstream release.
* debian/patches/gold-fix.patch: Removed. Fixed upstream.
* Moved libexec to lib corrections in dovecot-managesieve.patch and
  dovecot-managesieve-dist.patch to dovecot-example.patch
* debian/patches/dovecot-mboxlocking.patch: Regenerated to avoid FTBFS
  when quilt isn't installed.
* debian/patches/quota-mountpoint.patch: Removed. Not needed anymore.
* debian/patches/dovecot-quota.patch: Removed. Quotas aren't properly
  enabled unless mail_plugins = quota imap_quota.
* debian/patches/gold-fix.patch: Fixed configure script to build even
  with binutils-gold or --no-add-needed linker flag (Closes: #554306)
* debian/dovecot-common.init: fixed LSB headers. Thanks to Pascal Volk.
  (Closes: #558040)
* debian/changelog: added CVE references to previous changelog entry.
* debian/rules: checked up the build system. It's not fragile anymore.
  (Closes: 493803)
* debian/dovecot-common.postinst: Now invoking dpkg-reconfigure
  on dovecot-common is enough to generate new certificates
  if the previous ones were removed. (Closes: #545582)
* debian/rules: No longer install convert-tool in /usr/bin.
  It isn't an user utility and it should stay in /usr/lib/dovecot
  like all other similar tool.
* New upstream release. (Closes: #557601)
* [SECURITY] Fixes local information disclosure and denial of service.
  (see: http://www.dovecot.org/list/dovecot-news/2009-November/000143.html
  and CVE-2009-3897)
* Added myself to uploaders.
* Switched to the new source format "3.0 (quilt)":
  - removed dpatch from build-depends
  - removed debian/README.source because now we use only standard
    dpkg features
  - regenerated all patches
* Prepared to switch to multi-origin source:
  - recreated dovecot-libsieve.patch and dovecot-managesieve-dist.patch
    starting from the upstream tarball
  - removed all autotools related build-depends and build-conflict
  - renamed dovecot-libsieve and dovecot-managesieve directories
    to libsieve and managesieve.
* debian/rules: Moved the configuration of libsieve and managesieve from
  the build phase to the configuration phase
* Added dovecot-dbg package  with debugging symbols.  Thanks Stephan Bosch.
  (Closes: #554710)
* Fixed some stray libexec'isms in the default configuration.
* New upstream release.
* debian/dovecot-common.init:
  - use $CONF when starting the daemon. (Closes: #549944)
  - always output start/stop messages. (Closes: #523810)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Example Sieve Script
 
2
#   Author: Vivil
 
3
#   URL: http://wiki.fastmail.fm/index.php?title=Vivil
 
4
#   Removed unused notify require
 
5
 
 
6
# *************************************************************************
 
7
require ["envelope", "fileinto", "reject", "vacation", "regex", "relational", 
 
8
"comparator-i;ascii-numeric"];
 
9
 
 
10
 
 
11
if size :over 2048K {
 
12
  reject "Message not delivered; size over limit accepted by recipient";
 
13
  stop;  
 
14
}
 
15
 
 
16
#because of the use of elsif below, none of the "stop;"'s below are needed, but they're good 'defensive programming'. Only the one above is actually needed.
 
17
 
 
18
redirect "login@gmail.dom";
 
19
 
 
20
if header :contains ["from","cc"]
 
21
[
 
22
  "from-begin@beginbeginbeginbeginbeginbeginbeginbeginbegin.fr",
 
23
  "sex.com newsletter",
 
24
  "ad@gator.com",
 
25
  "newsletter@takecareof.com",
 
26
  "from-end@endendendendendendendendendendendendendendendend.fr"
 
27
]
 
28
{
 
29
  discard;
 
30
  stop;
 
31
}
 
32
 
 
33
elsif header :contains ["from"]
 
34
[
 
35
  "mygirlfriend-who-use-incredimail@foo.dom"
 
36
]
 
37
{
 
38
  fileinto "INBOX.PRIORITY";
 
39
  stop;
 
40
}
 
41
 
 
42
#use of "to" field detection next lines is ONLY USEFUL FOR DOMAIN NAME OWNERS if you forward your mail to your fastmail account, some virus/spam send mail to well known addresses as info@willemijns.dom i never use...
 
43
 
 
44
elsif header :contains ["to","cc"]
 
45
[
 
46
  "to-begin@beginbeginbeginbeginbeginbeginbeginbeginbegin.fr",
 
47
  "FTPsebastien@willemijns.dom",
 
48
  "info@willemijns.dom",
 
49
  "webmaster@willemijns.dom",
 
50
  "to-end@endendendendendendendendendendendendendendendend.fr"
 
51
]
 
52
{
 
53
  discard;
 
54
  stop;
 
55
}
 
56
 
 
57
elsif header :contains ["subject"]
 
58
[
 
59
  "subject-begin@beginbeginbeginbeginbeginbeginbeginbeginbegin.fr",
 
60
  "Undeliverable mail: Registration is accepted",
 
61
  "subject-end@endendendendendendendendendendendendendendendend.fr"
 
62
]
 
63
{
 
64
  discard;
 
65
  stop;
 
66
}
 
67
elsif header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"] ["6"]  {
 
68
  fileinto "INBOX.Junk Mail";
 
69
  stop;
 
70
}
 
71
elsif header :contains "from" "reflector@launay.dom" {
 
72
  fileinto "INBOX.TEST";
 
73
  stop;
 
74
}
 
75
elsif header :contains "from" "do-not-reply@franconews.dom" {
 
76
  fileinto "INBOX.TEST";
 
77
  stop;
 
78
}
 
79
elsif header :contains "from" "devnull@news.telefonica.dom" {
 
80
  fileinto "INBOX.TEST";
 
81
  stop;
 
82
}
 
83
elsif header :contains ["to"] ["sebastien@willemijns.dom"] {
 
84
  fileinto "INBOX.PRIORITY";
 
85
  stop;
 
86
}
 
87
elsif header :contains ["to"] ["seb@willemijns.dom"] {
 
88
  fileinto "INBOX.PRIORITY";
 
89
  stop;
 
90
}
 
91
else {
 
92
  fileinto "INBOX";
 
93
}
 
94
# ********************************************************************