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
discard;
}
if size :over 550 { # this is a comment
discard;
}
......
require "fileinto";
if anyof (
not exists ["From", "Date"],
header :contains "from" "fool@example.edu"
)
require "fileinto";
if anyof (
not exists ["From", "Date"],
header :contains "from" "fool@example.edu"
)
{
discard;
discard;
}
if header :contains "from" "coyote"
if header :contains "from" "coyote"
{
fileinto "popbox"; # "pop://sam:passwed@fw";
fileinto "popbox"; # "pop://sam:passwed@fw";
}
......
if header :contains :comparator "i;octet" "Subject"
"MAKE MONEY FAST" {
discard;
}
if header :contains :comparator "i;octet" "Subject"
"MAKE MONEY FAST"
{
discard;
}
......
require "fileinto";
if header :contains "from" "coyote" {
discard;
} elsif header :contains ["subject"] ["$$$"] {
discard;
} else {
fileinto "INBOX";
}
require "fileinto";
if header :contains "from" "coyote"
{
discard;
}
elsif header :contains ["subject"] ["$$$"]
{
discard;
}
else
{
fileinto "INBOX";
}
......
require [ "redirect" ];
if header :contains ["From"] ["coyote"] {
redirect "acm@example.edu";
} elsif header :contains "Subject" "$$$" {
redirect "postmaster@example.edu";
} else {
redirect "field@example.edu";
}
if header :contains ["From"] ["coyote"]
{
redirect "acm@example.edu";
}
elsif header :contains "Subject" "$$$"
{
redirect "postmaster@example.edu";
}
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" {
reject
"I am not taking mail from you, and I don't want
your birdseed, either!";
}
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" {
fileinto "INBOX.harassment";
}
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"] {
discard;
}
if header :contains ["from"] ["idiot@example.edu"]
{
discard;
}
......
if address :is :all "from" "tim@example.com" {
discard;
}
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
}
{
# 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";
}
{
# 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 {
fileinto "/home/sam/p/gnu/mailutils/cmu-sieve/sv/inbox";
if size :over 20
{
fileinto "/home/sam/p/gnu/mailutils/cmu-sieve/sv/inbox";
}
if address :domain :is "to" "uwaterloo.ca" {
redirect "dom@is.uw";
if address :domain :is "to" "uwaterloo.ca"
{
redirect "dom@is.uw";
}
if header :is "Status" "RO" {
redirect "status@is.ro";
if header :is "Status" "RO"
{
redirect "status@is.ro";
}
keep;
keep;
......
require "envelope";
if envelope :all :is "from" "tim@example.com" {
discard;
}
if envelope :all :is "from" "tim@example.com"
{
discard;
}
......
......@@ -4,62 +4,62 @@ require [ "comparator-i;octet", "comparator-i;ascii-casemap" ];
# Idiom to determine existence of a header.
if header :contains [ "x-sweetheart", "x-unlikely" ] ""
{
stop;
}
{
stop;
}
if header :is "return-PATH" "<>"
{
fileinto "mbox.complex.null-path";
}
{
fileinto "mbox.complex.null-path";
}
if header :matches "newsgroups" "comp.os.*"
{
fileinto "mbox.complex.news-comp-os";
}
{
fileinto "mbox.complex.news-comp-os";
}
elsif exists "newsgroups"
{
fileinto "mbox.complex.news";
}
{
fileinto "mbox.complex.news";
}
if size :over 10000
{
fileinto "mbox.complex.large";
# redirect "root@microsoft.com";
}
{
fileinto "mbox.complex.large";
# redirect "root@microsoft.com";
}
elsif allof ( size :over 2000 , size :under 10000 )
{
fileinto "mbox.complex.largeish";
}
{
fileinto "mbox.complex.largeish";
}
elsif size :over 100
{
fileinto "mbox.complex.smallish";
}
{
fileinto "mbox.complex.smallish";
}
else
{
# Too small to bother reading.
discard;
}
{
# Too small to bother reading.
discard;
}
if exists "x-redirect"
{
redirect "sroberts@uniserve.com";
}
{
redirect "sroberts@uniserve.com";
}
# if header :contains ["to", "cc"] "bug-mailutils@gnu.org"
# {
# fileinto "./mbox.mailutils.out";
# keep;
# {
# fileinto "./mbox.mailutils.out";
# keep;
# if header :contains ["to", "cc"] "bug-mailutils@gnu.org"
# {
# fileinto "./mbox.mailutils.out";
# keep;
# }
# {
# fileinto "./mbox.mailutils.out";
# keep;
# }
# else
# {
# stop;
# discard;
# }
# {
# stop;
# discard;
# }
# Keep (don't delete) messages, even if filed into another mailbox.
keep;
......
if exists "X"
{
{
keep;
}
}
......
......@@ -4,11 +4,11 @@ if allof(
size :over 10 ,
exists "x-caffeine"
)
{
fileinto "jetfuel";
}
{
fileinto "jetfuel";
}
else
{
fileinto "decaf";
}
{
fileinto "decaf";
}
......
require "fileinto";
if header :contains ["to", "cc"] "bug-mailutils@gnu.org"
{
fileinto "=l.mailutils";
}
{
fileinto "=l.mailutils";
}
......