2017-04-04 92 views
0

Procmail將所有新電子郵件直接保存在所需的maildir文件夾而不是maildir /新。我的.procmailrc文件如下:procmail不保存電子郵件maildir /新

SHELL=/bin/bash 
LINEBUF=4096 
PATH=/bin:/usr/bin:/usr/local/bin:/opt/local/bin 
VERBOSE=off 
MAILDIR=/mnt/data/maildir 
DEFAULT=$MAILDIR/inbox/ # See the slash! 
LOGFILE=$HOME/procmaillog 
FORMAIL=/opt/local/bin/formail 
SENDMAIL=/usr/sbin/sendmail 

# Nuke duplicate messages 
:0 Wh: msgid.lock 
| $FORMAIL -D 8192 msgid.cache 
:0 a: 
$MAILDIR/duplicates 

# SpamAssassin sample procmailrc 
:0fw: spamassassin.lock 
* < 256000 
| spamassassin-5.24 

# 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: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 
$MAILDIR/junk 

# All mail tagged as spam (eg. with a score higher than the set threshold) 
:0: 
* ^X-Spam-Status: Yes 
$MAILDIR/junk 

:0: 
* ^List-id: .*(somelist_id|someother_list_id|etc) 
$MAILDIR/nerdy_groups_and_lists 

# 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/' 
} 

問題是不是在尋找例如我的電子郵件/mnt/data/maildir/junk/new/mnt/data/maildir/nerdy_groups_and_lists/new我發現他們分別在/mnt/data/maildir/junk/mnt/data/maildir/nerdy_groups_and_lists,mu4e找不到它們。我究竟做錯了什麼?

+0

您是來自未來還是您錯誤地輸入了SpamAssassin的版本號?最新版本是3.4.1。 – tripleee

+0

@triplee:'spamassassin-5.24 --version'結果爲 'SpamAssassin version 3.4.1 perl version 5.24.1';) –

回答

1

傳遞到maildir文件夾中的語法需要在目錄名稱上有明顯的尾部斜線。正如你所發現的,沒有斜線,Procmail用舊的舊格式寫入,在目錄本身中創建單調編號的文件。 (還有一種MH模式,它使用MH約定創建文件,它使用dir/.,並帶有斜線和點。)

相關問題