Hi,

Having moved from 'mbox' to 'Maildir', I'm trying to use a way to move a spam email to the Junk folder

I declared the junk folder as;

   namespace inbox {
   type = private
   disabled = no
   ignore_on_failure = no
      list = yes
        subscriptions = yes
   #hidden = no
   #inbox = yes
   #prefix = INBOX/

      mailbox "Drafts" {
          auto = subscribe
        special_use = \Drafts
      }
      mailbox "Junk" {
          auto = subscribe
        autoexpunge = 12 weeks
        special_use = \Junk
      }

      mailbox "Trash" {
          auto = no
        autoexpunge = 12 weeks
        special_use = \Trash
      }

      mailbox "Sent" {
          auto = subscribe
        special_use = \Sent
      }


   and spamassassin, very basic

           loadplugin Mail::SpamAssassin::Conf

           required_hits 5
           required_score 5
           rewrite_header subject [** SPAM ** ]
           add_header all Status _YESNO_, score=_SCORE_ required=_REQD_
           tests=_TESTS_ autolearn=_AUTOLEARN_ version=_VERSION_
           spf_timeout 60

           rewrite_header to [Email could be SPAM ]
           fold_headers 0
           #defang_mime 0
           report_safe 0


   and Procmail.. basic and I used what I found  on the webpage :
   https://wiki.dovecot.org/procmail <https://wiki.dovecot.org/procmail>

   DELIVER="/usr/lib/dovecot/deliver -d $LOGNAME"
   SHELL="/bin/bash"
   SENDMAIL="/usr/sbin/sendmail -oi -t"
   LOGFILE="/var/log/procmail.log"
   DEFAULT="/var/spool2/mail/%u
   :0fw
   | /bin/spamc -s any
   #######################################
   #:0
   #* ^X-Spam-Status: Yes
   #$DEFAULT
   #######################################
   :0 w
   * ^X-Spam-Status: Yes
   | $DELIVER -m Junk
   #
   ## deliver to INBOX and stop
   # deliver to INBOX and stop
   :0 w
   | $DELIVER


But with this config, a spam email, stay into the Inbox :-(

/var/log/procmail.log... doesn't exist

Thanks for you help


Reply via email to