diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
commit | f7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch) | |
tree | a3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /pigeonhole/examples/rfc3028.sieve | |
parent | Initial commit. (diff) | |
download | dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.zip |
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pigeonhole/examples/rfc3028.sieve')
-rw-r--r-- | pigeonhole/examples/rfc3028.sieve | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pigeonhole/examples/rfc3028.sieve b/pigeonhole/examples/rfc3028.sieve new file mode 100644 index 0000000..e8f6972 --- /dev/null +++ b/pigeonhole/examples/rfc3028.sieve @@ -0,0 +1,58 @@ +# +# Example Sieve Filter +# Declare any optional features or extension used by the script +# +require ["fileinto", "reject"]; + +# +# Reject any large messages (note that the four leading dots get +# "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. +Thank you. +.... Fred +. +; + 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, +# or it contains a subject known to be spam, file it away. +# +elsif anyof (not address :all :contains + ["To", "Cc", "Bcc"] "me@example.com", + 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"; + } + |