如何设置 Mutt 和 Spamassassim

如何设置 Mutt 和 Spamassassim

我有 Mutt 来访问和阅读我的 gmail,但在收件箱中,它包含 gmail 界面隐藏在两个选项卡(我认为它们称为标签)中的所有邮件,称为“社交”和“促销”。

我想切换到仅限控制台的邮件界面,但看到所有这些额外的垃圾邮件是难以忍受的!考虑到我使用的是 IMAP 而不是 POP,我对可用于处理此问题的选项有点模糊……而且,我不相信我会在本地提取这些消息来帮助 Spamassassin 等工具提供帮助。

理想情况下,我想访问邮件,对其进行排序并丢弃垃圾邮件,然后在 Mutt 中显示已清理的收件箱,这也反映在 gmail 服务器上。

我浏览了许多不同的在线页面,但所有与 fetchmail、procmail,尤其是 Spamassassin 相关的页面似乎都与运行您自己的邮件服务器(不使用托管邮件服务器)的主题相关。 Mutt 的手册对我来说就像读一本关于脑部手术的书,我不知道该去哪里寻找我认为很多人都会有的解决方案......如何在使用时清理 Gmail穆特。

我已经附加了我的 muttrc、.procmail 和 .forward...我还从 Arch 存储库安装了 spamassassin,但我不确定将其指向何处或如何确保我已获得此系统集成甚至就在此时上演。

任何帮助表示赞赏。

set ssl_starttls=yes
set ssl_force_tls=yes
set imap_user = '[email protected]'
set imap_pass = 'XXXXXXXXX'
set from='[email protected]'
set realname='XXXXXXXXX'
set folder = imaps://imap.gmail.com/
set spoolfile = imaps://imap.gmail.com/INBOX
set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
set header_cache = "~/.mutt/cache/headers"
set message_cachedir = "~/.mutt/cache/bodies"
set certificate_file = "~/.mutt/certificates"
set smtp_url = 'smtps:// [email protected]:[email protected]:465/'
set move = no
set imap_keepalive = 900
mailboxes +GMail/INBOX +GMail/Social +GMail/Promotions
set sort=threads
set sort_browser=date
set sort_aux=reverse-last-date-received
set editor=nvim


source ~/.mutt/mutt-colors-solarized/mutt-colors-solarized-light-256.muttrc



# Sanely handle multi-part messages (prefer text part, but yield to
# mailcap-configured rendering for html-only)
alternative_order text/plain text/html
auto_view text/html

set sleep_time = 0

bind pager j next-line
bind pager k previous-line
bind attach,index,pager \CD next-page
bind attach,index,pager \CU previous-page
bind pager g top
bind pager G bottom
bind attach,index g first-entry
bind attach,index G last-entry

这是~/.procmail

# SpamAssassin sample procmailrc
#
# Pipe the mail through spamassassin (replace 'spamassassin' with 'spamc'
# if you use the spamc/spamd combination)
#
# The condition line ensures that only messages smaller than 250 kB
# (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
# isn't bigger than a few k and working with big messages can bring
# SpamAssassin to its knees.
#
# The lock file ensures that only 1 spamassassin invocation happens
# at 1 time, to keep the load down.
#
:0fw: spamassassin.lock
* < 256000
| spamassassin

# Mails with a score of 15 or higher are almost certainly spam (with 0.05%
# false positives according to rules/STATISTICS.txt). Let's put them in a
# different mbox. (This one is optional.)
:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
almost-certainly-spam

# All mail tagged as spam (eg. with a score higher than the set threshold)
# is moved to "probably-spam".
:0:
* ^X-Spam-Status: Yes
probably-spam

# Work around procmail bug: any output on stderr will cause the "F" in "From"
# to be dropped.  This will re-add it.
:0
* ^^rom[ ]
{
  LOG="*** Dropped F off From_ header! Fixing up. "

  :0 fhw
  | sed -e '1s/^/F/'
}

我需要在本地拉取消息并在此处运行它们吗?我很困惑,但我知道一件事......我做了几件事非常错误。

感谢你的帮助!

相关内容