[Dovecot] Move messages marked as Spam

Michel Bulgado michel at casa.co.cu
Wed Oct 7 22:10:46 EEST 2009


On Wed, 2009-10-07 at 18:39 +0200, Thomas Leuxner wrote:
> Am 07.10.2009 um 18:29 schrieb michel at casa.co.cu:
> >> 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.
> 
> That's what the option -n is for, as Steffen  stated...
> 


I made some corrections to my script, with the intention of moving those
messages marked as spam into a folder called spam. 

continue to enter the inbox folder but not move. 

this is my dovecot config:

# 1.1.18: /etc/dovecot.conf
# OS: Linux 2.6.18-164.el5 x86_64 CentOS release 5.3 (Final) ext3
listen: *
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
mail_uid: 501
mail_gid: 501
mail_location: maildir:/var/spool/virtualmail/%d/%n
mail_debug: yes
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib64/dovecot/imap
mail_plugin_dir(imap): /usr/lib64/dovecot/imap
mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3
lda:
  postmaster_address: postmaster at home.com
  mail_plugins: cmusieve quota
auth default:
  passdb:
    driver: ldap
    args: /etc/dovecot-ldap.conf
  userdb:
    driver: prefetch
  userdb:
    driver: ldap
    args: /etc/dovecot-ldap-userdb.conf
  socket:
    type: listen
    master:
      path: /var/run/dovecot/auth-master
      mode: 384
      user: vmail
plugin:
  quota_warning: storage=95%% /usr/local/bin/quota-warning.sh 95
  quota: maildir
  quota_rule: *:storage=40M
  sieve_global_path: /etc/dovecot/sieve
  sieve_global_dir: /etc/dovecot/sieve/global-default.script

global-default.script
#####################

require ["include"];
include :global "global-spam.script";


global-spam.script
###################

require "fileinto";

if header :contains "X-Bogosity" "Spam" {
        fileinto "Spam";
        stop;
}



Message header:
################
X-Bogosity: Spam, tests=bogofilter, spamicity=1.000000, version=1.2.1


Postfix - Master.cf
###################

dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f
${sender} -d ${recipient} -n


And i still seeing this in my logs:
mailserver deliver(michel at casa.co.cu): Per-user script path is unknown.
See http://wiki.dovecot.org/LDA/Sieve#location




there may be something that is not seeing or ignoring me this

Greetings
Michel






More information about the dovecot mailing list