Commit 9d99e3ed authored by Laurent Montel's avatar Laurent Montel 😁

continue

parent e69cbc65
require "reject";
require "subaddress";
require "fileinto";
require "imap4flags";
#SCRIPTNAME: Script part 0
# Sieve filter
# Declare the extensions used by this script.
#
# Messages bigger than 100K will be rejected with an error message
#
if size :over 100K
{
reject text:
I'm sorry, I do not accept mail over 100kb in size.
Please upload larger files to a server and send me a link.
Thanks.
.
;
} elsif address :all :is [ "From", "To" ] "mailinglist@blafasel.invalid"
{
fileinto "INBOX.mailinglist";
} elsif anyof (not address :all :contains [ "To", "Cc", "Bcc" ] "me@blafasel.invalid"
, header :matches "Subject" [ "*money*", "*Viagra*" ]
)
{
fileinto "INBOX.spam";
} else {
keep;
}
\ No newline at end of file
# Sieve filter
# Declare the extensions used by this script.
#
require ["fileinto", "reject"];
# Messages bigger than 100K will be rejected with an error message
#
if size :over 100K {
reject "I'm sorry, I do not accept mail over 100kb in size.
Please upload larger files to a server and send me a link.
Thanks.";
}
# Mails from a mailing list will be put into the folder "mailinglist"
#
elsif address :is ["From", "To"] "mailinglist@blafasel.invalid" {
fileinto "INBOX.mailinglist";
}
# Spam Rule: Message does not contain my address in To, CC or Bcc
# header, or subject is something with "money" or "Viagra".
#
elsif anyof (not address :all :contains ["To", "Cc", "Bcc"] "me@blafasel.invalid",
header :matches "Subject" ["*money*","*Viagra*"]) {
fileinto "INBOX.spam";
}
# Keep the rest.
# This is not necessary because there is a "implicit keep" Rule
#
else {
keep;
}
require "subaddress";
require "fileinto";
#SCRIPTNAME: Script part 0
if address :detail :is "to" "shopping"
{
fileinto "shoppingMania";
stop;
}
\ No newline at end of file
if address :detail "to" "shopping" { fileinto "shoppingMania"; stop; }
##### Send some of my mail to my brother.
# ':matches' is used for wildcard matches;
# *: zero or more characters
# ?: a single character
# This example matches 'Summer vacation photos' ,
# and also 'Istanbul vacation photo'
require "ihave";
require "foreverypart";
#SCRIPTNAME: Script part 0
#Script name: not condition
if allof (not header :is "Content-Type" "sdfsdf"
, ihave "xvwx"
)
{
break;
}
\ No newline at end of file
require "ihave";
require "foreverypart";
#Script name: not condition
if allof (not header :is "Content-Type" "sdfsdf"
, ihave "xvwx"
)
{
break ;
}
......@@ -143,6 +143,9 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts_data()
QTest::newRow("test-date") << QStringLiteral("test-date") << false << true;
QTest::newRow("redirect") << QStringLiteral("redirect") << false << true;
QTest::newRow("convert-action") << QStringLiteral("convert-action") << false << true;
QTest::newRow("address-with-default-all-parameter") << QStringLiteral("address-with-default-all-parameter") << false << true;
QTest::newRow("not-condition2") << QStringLiteral("not-condition2") << false << true;
QTest::newRow("address-with-default-is-parameter") << QStringLiteral("address-with-default-is-parameter") << false << true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment