Commit bd8c3722 bd8c37225f29f412139d2487d8d2772defa6a351 by Sergey Poznyakoff

Fix indentation in Sieve scripts.

* sieve/examples/ex-1.10.2.sv: Use GNU indentation style
* sieve/examples/ex-2.3a.sv: Likewise.
* sieve/examples/ex-2.5.1.sv: Likewise.
* sieve/examples/ex-2.7.3.sv: Likewise.
* sieve/examples/ex-3.1a.sv: Likewise.
* sieve/examples/ex-3.1b.sv: Likewise.
* sieve/examples/ex-3.2.sv: Likewise.
* sieve/examples/ex-4.1.sv: Likewise.
* sieve/examples/ex-4.2.sv: Likewise.
* sieve/examples/ex-4.4a.sv: Likewise.
* sieve/examples/ex-4.4b.sv: Likewise.
* sieve/examples/ex-4.5.sv: Likewise.
* sieve/examples/ex-5.1.sv: Likewise.
* sieve/examples/ex-5.7.sv: Likewise.
* sieve/examples/ex-9.sv: Likewise.
* sieve/examples/ex-save-all.sv: Likewise.
* sieve/examples/example.sv: Likewise.
* sieve/examples/exn-5.4.sv: Likewise.
* sieve/examples/t-complex.sv: Likewise.
* sieve/examples/t-exists.sv: Likewise.
* sieve/examples/t-fileinto.sv: Likewise.
* sieve/examples/t-mailutils.sv: Likewise.
1 parent 5026f51b
if size :under 500K {
if size :under 500K
{
discard;
}
}
keep;
......
if size :over 550 { # this is a comment
if size :over 550 { # this is a comment
discard;
}
}
......
require "fileinto";
require "fileinto";
if anyof (
if anyof (
not exists ["From", "Date"],
header :contains "from" "fool@example.edu"
)
{
discard;
}
if header :contains "from" "coyote"
if header :contains "from" "coyote"
{
fileinto "popbox"; # "pop://sam:passwed@fw";
}
......
if header :contains :comparator "i;octet" "Subject"
"MAKE MONEY FAST" {
if header :contains :comparator "i;octet" "Subject"
"MAKE MONEY FAST"
{
discard;
}
......
require "fileinto";
if header :contains "from" "coyote" {
require "fileinto";
if header :contains "from" "coyote"
{
discard;
} elsif header :contains ["subject"] ["$$$"] {
}
elsif header :contains ["subject"] ["$$$"]
{
discard;
} else {
}
else
{
fileinto "INBOX";
}
......
require [ "redirect" ];
if header :contains ["From"] ["coyote"] {
if header :contains ["From"] ["coyote"]
{
redirect "acm@example.edu";
} elsif header :contains "Subject" "$$$" {
}
elsif header :contains "Subject" "$$$"
{
redirect "postmaster@example.edu";
} else {
}
else
{
redirect "field@example.edu";
}
......
require ["fileinto", "reject"];
require "fileinto";
require ["fileinto", "reject"];
require "fileinto";
# require "vacation";
......
require "reject";
if header :contains "from" "coyote@desert.example.org" {
if header :contains "from" "coyote@desert.example.org"
{
reject
"I am not taking mail from you, and I don't want
your birdseed, either!";
}
}
......
require "fileinto";
if header :contains ["from"] "coyote" {
require "fileinto";
if header :contains ["from"] "coyote"
{
fileinto "INBOX.harassment";
}
......
if size :under 1M { keep; } else { discard; }
if size :under 1M { keep; } else { discard; }
......
if not size :under 1M { discard; }
if not size :under 1M { discard; }
......
if header :contains ["from"] ["idiot@example.edu"] {
if header :contains ["from"] ["idiot@example.edu"]
{
discard;
}
......
if address :is :all "from" "tim@example.com" {
if address :is :all "from" "tim@example.com"
{
discard;
}
}
......
......@@ -3,11 +3,13 @@
# These should be true, then, and not affect the test mbox.
if header :is ["X-Caffeine"] [""] {
if header :is ["X-Caffeine"] [""]
{
discard;
}
}
if not header :contains ["X-Caffeine"] [""] {
if not header :contains ["X-Caffeine"] [""]
{
discard;
}
}
......
......@@ -9,7 +9,7 @@ require ["fileinto", "reject"];
# "stuffed" to three)
#
if size :over 1M
{
{
reject text:
Please do not send me large attachments.
Put your file on a server and send me the URL.
......@@ -18,22 +18,22 @@ Thank you.
.
;
stop;
}
}
#
# Handle messages from known mailing lists
# Move messages from IETF filter discussion list to filter folder
#
if header :is "Sender" "owner-ietf-mta-filters@imc.org"
{
{
fileinto "filter"; # move to "filter" folder
}
}
#
# Keep all messages to or from people in my company
#
elsif address :domain :is ["From", "To"] "example.com"
{
{
keep; # keep in "In" folder
}
}
#
# Try and catch unsolicited email. If a message is not to me,
......@@ -45,15 +45,15 @@ elsif anyof (
header :matches
"subject" ["*make*money*fast*", "*university*dipl*mas*"]
)
{
{
# If message header does not contain my address,
# it's from a list.
fileinto "spam"; # move to "spam" folder
}
}
else
{
{
# Move all other (non-company) mail to "personal"
# folder.
fileinto "personal";
}
}
......
require "fileinto";
fileinto "./_save-all.mbox";
......
# Example sieve script.
require [ "fileinto", "redirect" ];
require [ "fileinto", "redirect" ];
if size :over 20 {
if size :over 20
{
fileinto "/home/sam/p/gnu/mailutils/cmu-sieve/sv/inbox";
}
if address :domain :is "to" "uwaterloo.ca" {
if address :domain :is "to" "uwaterloo.ca"
{
redirect "dom@is.uw";
}
if header :is "Status" "RO" {
if header :is "Status" "RO"
{
redirect "status@is.ro";
}
keep;
keep;
......
require "envelope";
if envelope :all :is "from" "tim@example.com" {
if envelope :all :is "from" "tim@example.com"
{
discard;
}
}
......
......@@ -4,47 +4,47 @@ require [ "comparator-i;octet", "comparator-i;ascii-casemap" ];
# Idiom to determine existence of a header.
if header :contains [ "x-sweetheart", "x-unlikely" ] ""
{
{
stop;
}
}
if header :is "return-PATH" "<>"
{
{
fileinto "mbox.complex.null-path";
}
}
if header :matches "newsgroups" "comp.os.*"
{
{
fileinto "mbox.complex.news-comp-os";
}
}
elsif exists "newsgroups"
{
{
fileinto "mbox.complex.news";
}
}
if size :over 10000
{
{
fileinto "mbox.complex.large";
# redirect "root@microsoft.com";
}
# redirect "root@microsoft.com";
}
elsif allof ( size :over 2000 , size :under 10000 )
{
{
fileinto "mbox.complex.largeish";
}
}
elsif size :over 100
{
{
fileinto "mbox.complex.smallish";
}
}
else
{
# Too small to bother reading.
{
# Too small to bother reading.
discard;
}
}
if exists "x-redirect"
{
{
redirect "sroberts@uniserve.com";
}
}
# if header :contains ["to", "cc"] "bug-mailutils@gnu.org"
# {
......
if exists "X"
{
{
keep;
}
}
......
......@@ -4,11 +4,11 @@ if allof(
size :over 10 ,
exists "x-caffeine"
)
{
{
fileinto "jetfuel";
}
}
else
{
{
fileinto "decaf";
}
}
......
require "fileinto";
if header :contains ["to", "cc"] "bug-mailutils@gnu.org"
{
{
fileinto "=l.mailutils";
}
}
......