Sendmail:スパムフォルダを自動的に作成する方法は?

Sendmail:スパムフォルダを自動的に作成する方法は?

私は通常のメールとスパムにうまく機能するメールサーバー(sendmail + dovecot + procmail + spamassassin)を持っています。各ユーザーに対して「スパム」というフォルダを作成し、そこにすべてのスパムを入れようとしています。私はprocmailrcをこのように設定しました

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

sendmailを再起動しますが、スパムフォルダは作成されず、メールは... dev / nullに送信されますか?スパムフォルダを自動的に作成する方法は?

ベストアンサー1

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/

鳩に

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
  }

おすすめ記事