Commit 737e85ae authored by Laurent Montel's avatar Laurent Montel 😁

Add a new line at the end of script

parent 3e8f8dc2
...@@ -6,4 +6,4 @@ require "imap4flags"; ...@@ -6,4 +6,4 @@ require "imap4flags";
if size :under 1 if size :under 1
{ {
addflag [ "\\Deleted", "\\Answered", "\\Flagged" ]; addflag [ "\\Deleted", "\\Answered", "\\Flagged" ];
} }
\ No newline at end of file
...@@ -7,4 +7,4 @@ require "imap4flags"; ...@@ -7,4 +7,4 @@ require "imap4flags";
if ihave "reject" if ihave "reject"
{ {
addflag [ "\\Seen" ]; addflag [ "\\Seen" ];
} }
\ No newline at end of file
...@@ -29,4 +29,4 @@ Thanks. ...@@ -29,4 +29,4 @@ Thanks.
fileinto "INBOX.spam"; fileinto "INBOX.spam";
} else { } else {
keep; keep;
} }
\ No newline at end of file
...@@ -6,4 +6,4 @@ if address :detail :is "to" "shopping" ...@@ -6,4 +6,4 @@ if address :detail :is "to" "shopping"
{ {
fileinto "shoppingMania"; fileinto "shoppingMania";
stop; stop;
} }
\ No newline at end of file
...@@ -12,4 +12,4 @@ if allof (exists "X-Gerrit-Commit" ...@@ -12,4 +12,4 @@ if allof (exists "X-Gerrit-Commit"
setflag [ "\\Seen" ]; setflag [ "\\Seen" ];
fileinto "INBOX/Trash"; fileinto "INBOX/Trash";
stop; stop;
} }
\ No newline at end of file
...@@ -7,4 +7,4 @@ if true ...@@ -7,4 +7,4 @@ if true
{ {
break :name "optional name"; break :name "optional name";
break; break;
} }
\ No newline at end of file
...@@ -11,4 +11,4 @@ if anyof (not address :all :regex [ "to", "cc", "bcc" ] "me(\\\\+.*)?@company\\\ ...@@ -11,4 +11,4 @@ if anyof (not address :all :regex [ "to", "cc", "bcc" ] "me(\\\\+.*)?@company\\\
) )
{ {
discard; discard;
} }
\ No newline at end of file
...@@ -6,4 +6,4 @@ require "convert"; ...@@ -6,4 +6,4 @@ require "convert";
if true if true
{ {
convert "image/png" "image/bmp" ["pix-x=250","pix-y=600"]; convert "image/png" "image/bmp" ["pix-x=250","pix-y=600"];
} }
\ No newline at end of file
...@@ -8,4 +8,4 @@ if true ...@@ -8,4 +8,4 @@ if true
deleteheader :matches "header-str" "header-value"; deleteheader :matches "header-str" "header-value";
deleteheader not :is "header-str" "header-value"; deleteheader not :is "header-str" "header-value";
deleteheader not :matches "" ""; deleteheader not :matches "" "";
} }
\ No newline at end of file
...@@ -11,4 +11,4 @@ if ihave "enclosz" ...@@ -11,4 +11,4 @@ if ihave "enclosz"
. .
; ;
} }
\ No newline at end of file
...@@ -6,4 +6,4 @@ require "extracttext"; ...@@ -6,4 +6,4 @@ require "extracttext";
if true if true
{ {
extracttext :first 11 "voiture"; extracttext :first 11 "voiture";
} }
\ No newline at end of file
## Flag: |UniqueId:2|Rulename: Mail delivery failed <bae.vo.pb+ma@gmail.com> require "body";
if allof ( header :contains "From" "mailer-daemon@foo.de" , header :matches "Subject" "Mail delivery failed: returning message to sender" , size :under 10000 , body :contains :text "<blo@dd.com>" ) require "fileinto";
require "imap4flags";
#SCRIPTNAME: Script part 0
## Flag: |UniqueId:2|Rulename: Mail delivery failed "bae.vo.pb+ma@gmail.com"
if allof (header :contains "From" "mailer-daemon@foo.de"
, header :matches "Subject" "Mail delivery failed: returning message to sender"
, size :under 10000
, body :text :contains "<blo@dd.com>"
)
{ {
fileinto "folder" ; fileinto "folder";
addflag "\\seen" ; addflag [ "\\seen" ];
stop ; stop;
} }
...@@ -8,4 +8,4 @@ require "mailbox"; ...@@ -8,4 +8,4 @@ require "mailbox";
if header :is "Content-Type" "png" if header :is "Content-Type" "png"
{ {
fileinto :copy :create "INBOX"; fileinto :copy :create "INBOX";
} }
\ No newline at end of file
...@@ -6,4 +6,4 @@ if date :is "" "year" "0000" ...@@ -6,4 +6,4 @@ if date :is "" "year" "0000"
{ {
keep :flags [ "\\Flagged", "\\Seen" ]; keep :flags [ "\\Flagged", "\\Seen" ];
keep; keep;
} }
\ No newline at end of file
...@@ -7,4 +7,4 @@ require "include"; ...@@ -7,4 +7,4 @@ require "include";
if mailboxexists "INBOX2" if mailboxexists "INBOX2"
{ {
return; return;
} }
\ No newline at end of file
...@@ -8,4 +8,4 @@ require "foreverypart"; ...@@ -8,4 +8,4 @@ require "foreverypart";
if not envelope :localpart :is "Reply-To" "montel@kde.org" if not envelope :localpart :is "Reply-To" "montel@kde.org"
{ {
break; break;
} }
\ No newline at end of file
...@@ -9,4 +9,4 @@ if allof (not header :is "Content-Type" "sdfsdf" ...@@ -9,4 +9,4 @@ if allof (not header :is "Content-Type" "sdfsdf"
) )
{ {
break; break;
} }
\ No newline at end of file
...@@ -7,4 +7,4 @@ require "enotify"; ...@@ -7,4 +7,4 @@ require "enotify";
if convert "image/jpeg" "image/jpeg" ["pix-x=300","pix-y=200"] if convert "image/jpeg" "image/jpeg" ["pix-x=300","pix-y=200"]
{ {
notify :importance "2" :message "message !!!" ""; notify :importance "2" :message "message !!!" "";
} }
\ No newline at end of file
...@@ -7,4 +7,4 @@ require "copy"; ...@@ -7,4 +7,4 @@ require "copy";
if ihave "redirect" if ihave "redirect"
{ {
redirect :copy "montel@kde.org"; redirect :copy "montel@kde.org";
} }
\ No newline at end of file
...@@ -12,4 +12,4 @@ thanks ...@@ -12,4 +12,4 @@ thanks
. .
; ;
} }
\ No newline at end of file
...@@ -8,4 +8,4 @@ if ihave "reject" ...@@ -8,4 +8,4 @@ if ihave "reject"
{ {
removeflag [ "\\Answered", "\\Flagged", "\\Seen" ]; removeflag [ "\\Answered", "\\Flagged", "\\Seen" ];
removeflag [ "\\Draft" ]; removeflag [ "\\Draft" ];
} }
\ No newline at end of file
...@@ -10,4 +10,4 @@ if true ...@@ -10,4 +10,4 @@ if true
. .
; ;
} }
\ No newline at end of file
...@@ -7,4 +7,4 @@ if header :is "Sender" "owner-ietf-mta-filters@example.org" ...@@ -7,4 +7,4 @@ if header :is "Sender" "owner-ietf-mta-filters@example.org"
set "MyFlags" "\\Flagged $Work"; set "MyFlags" "\\Flagged $Work";
# Message will have both "\Flagged" and $Work flags # Message will have both "\Flagged" and $Work flags
keep :flags [ "${MyFlags}" ]; keep :flags [ "${MyFlags}" ];
} }
\ No newline at end of file
...@@ -5,4 +5,4 @@ require "imap4flags"; ...@@ -5,4 +5,4 @@ require "imap4flags";
if address :all :is "From" "someone@example.org" if address :all :is "From" "someone@example.org"
{ {
setflag [ "\\Seen" ]; setflag [ "\\Seen" ];
} }
\ No newline at end of file
...@@ -5,4 +5,4 @@ require "variables"; ...@@ -5,4 +5,4 @@ require "variables";
if address :detail :matches "to" "*" if address :detail :matches "to" "*"
{ {
set "extension_name" "${1}"; set "extension_name" "${1}";
} }
\ No newline at end of file
...@@ -8,4 +8,4 @@ if envelope :all :contains [ "from", "to" ] "pedophile@yourdomain.com" ...@@ -8,4 +8,4 @@ if envelope :all :contains [ "from", "to" ] "pedophile@yourdomain.com"
{ {
fileinto "c:\\spyfolder"; fileinto "c:\\spyfolder";
keep; keep;
} }
\ No newline at end of file
...@@ -11,4 +11,4 @@ if header :is "" ...@@ -11,4 +11,4 @@ if header :is ""
#FileInto comment #FileInto comment
#comment2 #comment2
fileinto ""; fileinto "";
} }
\ No newline at end of file
...@@ -12,4 +12,4 @@ if header :is "" ...@@ -12,4 +12,4 @@ if header :is ""
#comment2 #comment2
fileinto ""; fileinto "";
} }
\ No newline at end of file
...@@ -12,4 +12,4 @@ if header :is "" #test header ...@@ -12,4 +12,4 @@ if header :is "" #test header
#comment2 #comment2
fileinto ""; fileinto "";
} }
\ No newline at end of file
...@@ -19,4 +19,4 @@ if allof (virustest :value "gt" :comparator "i;octet" "0" #condition1 ...@@ -19,4 +19,4 @@ if allof (virustest :value "gt" :comparator "i;octet" "0" #condition1
, environment "" "" # condition6 , environment "" "" # condition6
) )
{ {
} }
\ No newline at end of file
...@@ -22,4 +22,4 @@ if allof (virustest :value "gt" :comparator "i;octet" "0" #condition1 ...@@ -22,4 +22,4 @@ if allof (virustest :value "gt" :comparator "i;octet" "0" #condition1
) )
{ {
} }
\ No newline at end of file
...@@ -4,4 +4,4 @@ if header :is "X-Spam-Flag" "YES" #1 ...@@ -4,4 +4,4 @@ if header :is "X-Spam-Flag" "YES" #1
#3 #3
{ {
stop; stop;
} }
\ No newline at end of file
...@@ -3,7 +3,8 @@ if false # allof(not header :contains "X-Spam-Flag" "YES") ...@@ -3,7 +3,8 @@ if false # allof(not header :contains "X-Spam-Flag" "YES")
{ {
} }
#SCRIPTNAME: Script part 1 #SCRIPTNAME: Script part 1
if true # allof(not header :contains "X-Spam-Flag" "YES") if true # allof(not header :contains "X-Spam-Flag" "YES")
{ {
} }
\ No newline at end of file
...@@ -11,4 +11,4 @@ if allof (date :is "header" "day" "20" ...@@ -11,4 +11,4 @@ if allof (date :is "header" "day" "20"
) )
{ {
keep; keep;
} }
\ No newline at end of file
...@@ -10,4 +10,4 @@ if allof (envelope :user :is "to" "foo@example.com" ...@@ -10,4 +10,4 @@ if allof (envelope :user :is "to" "foo@example.com"
) )
{ {
stop; stop;
} }
\ No newline at end of file
...@@ -6,4 +6,4 @@ if envelope :all :matches "from" "*jim-???@*" ...@@ -6,4 +6,4 @@ if envelope :all :matches "from" "*jim-???@*"
{ {
discard; discard;
stop; stop;
} }
\ No newline at end of file
...@@ -7,4 +7,4 @@ require "imap4flags"; ...@@ -7,4 +7,4 @@ require "imap4flags";
if environment "PATH" "local folder" if environment "PATH" "local folder"
{ {
keep; keep;
} }
\ No newline at end of file
...@@ -6,4 +6,4 @@ if allof (exists "Date" ...@@ -6,4 +6,4 @@ if allof (exists "Date"
) )
{ {
stop; stop;
} }
\ No newline at end of file
...@@ -10,4 +10,4 @@ if allof (hasflag :is "test" ...@@ -10,4 +10,4 @@ if allof (hasflag :is "test"
) )
{ {
keep; keep;
} }
\ No newline at end of file
...@@ -10,4 +10,4 @@ if anyof (header :contains "Subject" "[kdepim-runtime]" ...@@ -10,4 +10,4 @@ if anyof (header :contains "Subject" "[kdepim-runtime]"
) )
{ {
fileinto "bb"; fileinto "bb";
} }
\ No newline at end of file
...@@ -9,4 +9,4 @@ if allof (header :contains "Content-Type" "value" ...@@ -9,4 +9,4 @@ if allof (header :contains "Content-Type" "value"
) )
{ {
keep; keep;
} }
\ No newline at end of file
...@@ -6,4 +6,4 @@ require "mboxmetadata"; ...@@ -6,4 +6,4 @@ require "mboxmetadata";
if metadataexists "INBOX" "ANNOTATION" if metadataexists "INBOX" "ANNOTATION"
{ {
stop; stop;
} }
\ No newline at end of file
...@@ -7,4 +7,4 @@ if header :regex "subject" ".* \\| Nouveau ticket - .*" ...@@ -7,4 +7,4 @@ if header :regex "subject" ".* \\| Nouveau ticket - .*"
{ {
fileinto :create "GLPI/Nouveaux tickets"; fileinto :create "GLPI/Nouveaux tickets";
stop; stop;
} }
\ No newline at end of file
...@@ -7,4 +7,4 @@ require "imap4flags"; ...@@ -7,4 +7,4 @@ require "imap4flags";
if servermetadataexists "ANNOTATION" if servermetadataexists "ANNOTATION"
{ {
keep; keep;
} }
\ No newline at end of file
...@@ -12,4 +12,4 @@ if allof (spamtest :percent :value "ne" :comparator "i;ascii-numeric" "4" ...@@ -12,4 +12,4 @@ if allof (spamtest :percent :value "ne" :comparator "i;ascii-numeric" "4"
) )
{ {
stop; stop;
} }
\ No newline at end of file
...@@ -12,4 +12,4 @@ if allof (spamtest :count "lt" :comparator "i;ascii-numeric" "5" ...@@ -12,4 +12,4 @@ if allof (spamtest :count "lt" :comparator "i;ascii-numeric" "5"
) )
{ {
stop; stop;
} }
\ No newline at end of file
...@@ -10,4 +10,4 @@ if anyof (header :contains "Subject" "[kdepim-runtime]" ...@@ -10,4 +10,4 @@ if anyof (header :contains "Subject" "[kdepim-runtime]"
) )
{ {
fileinto "bb"; fileinto "bb";
} }
\ No newline at end of file
...@@ -11,4 +11,4 @@ if allof (virustest :count "ge" :comparator "i;ascii-numeric" "5" ...@@ -11,4 +11,4 @@ if allof (virustest :count "ge" :comparator "i;ascii-numeric" "5"
) )
{ {
stop; stop;
} }
\ No newline at end of file
...@@ -13,4 +13,4 @@ dsfgsdfgsdfg ...@@ -13,4 +13,4 @@ dsfgsdfgsdfg
; ;
discard; discard;
} }
\ No newline at end of file
...@@ -16,4 +16,4 @@ if true ...@@ -16,4 +16,4 @@ if true
. .
; ;
} }
\ No newline at end of file
...@@ -6,4 +6,4 @@ require "variables"; ...@@ -6,4 +6,4 @@ require "variables";
if true if true
{ {
set :lowerfirst "25" "variable-lower"; set :lowerfirst "25" "variable-lower";
} }
\ No newline at end of file
...@@ -6,4 +6,4 @@ require "variables"; ...@@ -6,4 +6,4 @@ require "variables";
if size :under 5 if size :under 5
{ {
set "testvariable" "25"; set "testvariable" "25";
} }
\ No newline at end of file
...@@ -153,6 +153,8 @@ void SieveScriptPage::generatedScript(QString &script, QStringList &requires) ...@@ -153,6 +153,8 @@ void SieveScriptPage::generatedScript(QString &script, QStringList &requires)
} }
if (inForEveryPartLoop) { if (inForEveryPartLoop) {
script += QStringLiteral("\n}\n"); script += QStringLiteral("\n}\n");
} else {
script += QLatin1Char('\n');
} }
} }
......
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