Hello I have implemented recently in my work bogofilter utility to mark messages as Spam or Ham, currently is working perfectly, but I want to move those messages marked as spam to a folder called spam. I installed dovecot-sieve with the intention of using fileinto to accomplish this. my question is: where I put this: require "fileinto"; if header :contains "X-Bogosity" "Spam" { fileinto "Spam"; } so that all messages that come to my users go into the spam folder? and how i handle messages that are marked as "Unsure" X-Bogosity: Unsure Thanks Michel
Hello I have implemented recently in my work bogofilter to mark messages as Spam or Ham, currently is working perfectly, but I want to move those messages marked as spam to a folder called spam. I installed dovecot-sieve with the intention of using fileinto to accomplish this. my question is: where I put this: require "fileinto"; if header :contains "X-Bogosity" "Spam" { fileinto "Spam"; } so that all messages that come to my users go into the spam folder? and how i handle messages that are marked as "Unsure" X-Bogosity: Unsure Thanks Michel ---------------------------------------------- Webmail, servicio de correo electronico Casa de las Americas - La Habana, Cuba.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Oct 2009, michel at casa.co.cu wrote:> my question is: where I put this:It depends on your Sieve version: cmusieve needs the script in <user-home>/.dovecot.sieve or you configure one script for all users. libsieve uses <user-home>/.dovecot.sieve, too, and you can configure pre- and post- sieve scripts.> require "fileinto"; > > if header :contains "X-Bogosity" "Spam" { > fileinto "Spam";add stop; here> } > > so that all messages that come to my users go into the spam folder? > > > > and how i handle messages that are marked as "Unsure" > > X-Bogosity: UnsureWell, the same? File it into SPAM_Unsure? Bye, - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBSsyGt3WSIuGy1ktrAQJ5zAf+Is62bD203w5JqfL5nfryBVZKxRQ7vfGM 6qmjonib1dUHUfGpfP6zAb5ZNoTTQSQVZGVqLkrBz3+Us8gD4ECm7UlZHZHi1S6G f1qZw8NO/uM+RuJ22STSU8cUlu+a8lE9d7/le/2PBFZjXOMoVG9hLVsxBmdi2QfC A52Y4llvIz59PMCJHbW0u7KvpmsghMHe15FAhxZSb243sCDVX6hTE8ngbePSddNf O3Rsx8BxKwbEvwnBGyBIewB5SvdlbJAvo4gGOm/VH5Ftd0zP9CHulkKUffjNdy/4 itF9KqteUJJSMWU7CuqYQcL2LIwu8DQCfyhr4RiyVPkFY/MPMKVvjw==iQBp -----END PGP SIGNATURE-----
On Wed, 2009-10-07 at 14:16 +0200, Steffen Kaiser wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tue, 6 Oct 2009, michel at casa.co.cu wrote: > > > my question is: where I put this: > > It depends on your Sieve version: > > cmusieve needs the script in <user-home>/.dovecot.sieve or you configure > one script for all users. > > libsieve uses <user-home>/.dovecot.sieve, too, and you can configure pre- > and post- sieve scripts. > > > require "fileinto"; > > > > if header :contains "X-Bogosity" "Spam" { > > fileinto "Spam"; > > add > > stop; > > here > > > } > > > > so that all messages that come to my users go into the spam folder? > > > > > > > > and how i handle messages that are marked as "Unsure" > > > > X-Bogosity: Unsure > > Well, the same? File it into SPAM_Unsure? > > Bye, > > - --I use dovecot-1.1.18 for which I am using dovecot-sieve-1.1.7 I would define a single script for all my users, according to documentation is declared using the variable sieve_global_path = /etc/dovecot.sieve my script: require "fileinto"; if header: contains "X-Bogosity" "spam" ( fileinto "Spam"; stop; ) my config: mail_plugins = cmusieve quota sieve_global_path = /etc/dovecot.sieve saving changes, the saved messages as spam not moved to the spam folder. when I check in the logs I see this message: Per-user script path is unknown. See http://wiki.dovecot.org/LDA/Sieve # location defining the same path as the previous script in the plugin section, all incoming messages for spam moves, all marked as spam and ham. Plugin { sieve = /etc/dovecot.sieve } mx1 deliver (michel at casa.co.cu): msgid = <1254916568.4acc81d82712a @ home.com>: saved mail to spam a question, after the script run for each incoming message, once the filter matches any message marked as spam, the script create the folder in the mailbox of my users and or i have create manually? thanks
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 7 Oct 2009, Michel Bulgado wrote:> a question, after the script run for each incoming message, once the > filter matches any message marked as spam, the script create the folder > in the mailbox of my users and or i have create manually?There is an option of deliver to control this -n: http://wiki.dovecot.org/LDA Bye, - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBSsyZ2XWSIuGy1ktrAQKE0wgAs1FtReCy6xfYGmn6scAmsFIN3EHE48ke qVV8fARUhEu4AUxJpnH9LWfnBztRQwZ1JfK99WE9OkLwedebf5BR6BZvKbrhyzET 6BQBBx5DP2LxOnqjDXwpufvysYicKQKDXkq8s+RRDXiaaSHkYlMDkuzagctpibpl MM1YC2zjhh/OWG3yfCRgf9oKLd6c1Pfueb0lqetoGAYiDbAl7IfA63kZyv/hM+S5 p0Hc4Tiqiw1Wtlt/qM7y+kEO5By6+6JwWE5RDhKgk13R8hE8FDfjkRMP0VOS9kYP VdehszPJjcbdbvQQny2yN4Pt1Vv/QQrlOmSQU4zJ66Kkbsvybrywtg==Ug5n -----END PGP SIGNATURE-----
Steffen Kaiser <skdovecot at smail.inf.fh-brs.de> escribi?:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Wed, 7 Oct 2009, Michel Bulgado wrote: > >> a question, after the script run for each incoming message, once the >> filter matches any message marked as spam, the script create the folder >> in the mailbox of my users and or i have create manually? > > There is an option of deliver to control this -n: > http://wiki.dovecot.org/LDA > > Bye,no desire to control or limit the script wondered whether the script to run and find some header message marked as spam, is able to create for itself a folder called spam so to move the message to her. ---------------------------------------------- Webmail, servicio de correo electronico Casa de las Americas - La Habana, Cuba.
On Thu, 2009-10-08 at 14:46 +0200, Steffen Kaiser wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Thu, 8 Oct 2009, michel at casa.co.cu wrote: > > > if header :contains "X-Bogosity" "Spam" { > > fileinto "Spam"; > > stop; > > } > > > > server log > > ################ > > mailserver deliver(michel at casa.co.cu): > > msgid=<1255000600.4acdca18a3940 at webmail.sld.cu>: saved mail to Spam > > > > > > I dont know why move all messages , when in the script is only for messages > > marked as "Spam". > > > > I checked the message headers are right > > > > X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.1 > ^^^^^ > > There is the word "Spam" you search for. > > Look at RFC 3028 sec. 2.7.3, I think you need > > if header :contains :comparator "i;octet" > > to have a case-sensitive match. > > I thought there is a ":begin" match type, but the RFC does not list it. > > Or use > > if header :contains "X-Bogosity" "Spam, " { > > Note the ", " . > > Bye, > > - -- > Steffen Kaiser > -----BEGIN PGP SIGNATURE-----the problem was in the script. All messages were moved to the Spam folder because spamicity word. Thanks