0

I have a mailserver(sendmail+dovecot+procmail+spamassassin) Works fine,for normal mail,for spam i want to create a folder called "Spam" for every user and put all spam mail there. I configured procmailrc as this

:0:
* ^X-Spam-Status: Yes
Spam

Restarted sendmail,but no spam folder is created and mail is sent at...dev/null? How to create automatically a spam folder?

2

1 Answer 1

0

Solution found on procmail

DEFAULT=/var/spool/mail/$LOGNAME/new
ORGMAIL=/var/spool/mail/$LOGNAME
MAILDIR=/var/spool/mail/$LOGNAME
DELIVER="/usr/lib/dovecot/deliver -d $LOGNAME"
LOGFILE=/root/procmail.log
VERBOSE=yes

# deliver spam to spam folder

:0
* ^X-Spam-Status: Yes
.Spam/

And on dovecot

inbox = yes
  #mailbox name {
    # auto=create will automatically create this mailbox.
    # auto=subscribe will both create and subscribe to the mailbox.
    #auto = no

    # Space separated list of IMAP SPECIAL-USE attributes as specified by
    # RFC 6154: \All \Archive \Drafts \Flagged \Junk \Sent \Trash
    #special_use =
  #}

  # These mailboxes are widely used and could perhaps be created automatically:
  mailbox Drafts {
    special_use = \Drafts
    auto = create
  }
  mailbox Spam {
    special_use = \Junk
    auto = subscribe
  }
  mailbox Trash {
    special_use = \Trash
    auto = create
  }

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.