[Dovecot] question about scripts sieves
fakessh
fakessh at fakessh.eu
Fri May 21 15:22:34 EEST 2010
hello list
hello dovecot network
hello all the reader
here is a sieve script
this
########################################
require
["fileinto","regex","comparator-i;ascii-numeric","reject","relational"];
# rule:[spammanage]
if header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"]
["500"] {
reject "NO SPAM";
stop;
}
if header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"]
["100"] {
fileinto "Junk.spam";
stop;
}
if header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"]
["10"] {
fileinto "Junk";
}
elsif anyof (
header :contains "Received"
[ "[4.63.221.224",
"[24.244.141.112",
"[61.171.253.177",
"[63.123.149.", "[63.209.206.", "(63.233.30.73",
"[63.251.200.",
"[64.41.183.","[64.49.250.", "[64.57.188.", "[64.57.221.",
"[64.62.204.",
"[64.70.17.", "[64.70.44.", "[64.70.53.",
"[64.39.27.6", "[64.39.27.7","[64.191.25.","[64.191.36.",
"[64.191.9.",
"[64.125.181.", "[64.191.123.", "[64.191.23.",
"[64.239.182.",
"[65.211.3.",
"[66.46.150.", "[66.62.162.", "[66.118.170.",
"[66.129.124.",
"[66.205.217.", "[66.216.111.", "[66.239.204.",
"[67.86.69.",
"[80.34.206.", "[80.80.98.",
"[81.72.233.13",
"[128.242.120.",
"[157.238.18",
"[168.234.195.18]",
"[193.253.198.57",
"[194.25.83.1",
"[200.24.129.", "[200.161.203.",
"[202.164.182.76]","[202.57.69.116",
"[203.19.220.","[203.22.104.","[203.22.105.",
"[204.188.52.",
"[205.153.154.203",
"[206.26.195.", "[206.154.33.","[206.169.178",
"[207.142.3.",
"[208.46.5.","[208.187.",
"[209.164.27.","[209.236.",
"[210.90.75.129]",
"[211.101.138.199","[211.185.7.125]","[211.239.231.",
"[212.240.95.",
"[213.47.250.139", "[213.225.61.",
"[216.22.79.","[216.39.115.","[216.99.240.",
"[216.126.32.", "[216.187.123.","[217.36.124.53",
"[218.145.25","[218.52.71.103","[218.158.136.115",
"[218.160.42.74", "[218.242.112.4]"
]
)
{
fileinto "Junk";
}
elsif anyof (
header :contains ["SPAM", "X-Spam-hits"]
[ "X_OSIRU_SPAM_SRC"
]
)
{
fileinto "Junk";
}
elsif anyof (
header :contains ["from", "received"]
[".jp ", ".kr ",
".jp>", ".kr>"]
)
{
fileinto "Junk";
}
elsif anyof
(
header :contains "Content-Type"
[
"GB2312",
"big5",
"ECU-KR",
"ECU-TX",
"HZ",
"EUC-JP"
]
)
{
fileinto "Junk";
}
elsif anyof
(
header :regex "Subject" "^=\\?(gb|GB)2312\\?" # Chinese ecoding
at subject
)
{
fileinto "Junk";
}
elsif anyof
(
header :regex "Subject" "^=\\?big5\\?" # Other kind of Chinese
mail
)
{
fileinto "Junk";
}
#################################################
I tested that emails are not from japan and korea
I would like to add one condition:
that is, the emails from japan or korea who are destined for which I am
mailling subscriber does not end up in Junk
and I do the same test in the header: contains "Content-Type"
thanks for your help
thanks for advice
More information about the dovecot
mailing list