2017-04-04 11 views
0

Procmail은 모든 새 전자 메일을 maildir/new 대신 원하는 maildir 폴더에 직접 저장합니다. 내 .procmailrc는 다음과 같습니다.procmail은 maildir/new에 전자 메일을 저장하지 않습니다.

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' 결과는 입니다.'Perl 버전 5.24.1에서 실행되는 SpamAssassin 버전 3.4.1';) –

답변

1

maildir 폴더로 전달하는 구문에는 디렉토리 이름에 중요한 후행 슬래시가 필요합니다. 슬래시가 없다면, Procmail은 디렉터리 자체에 단조롭게 번호가 매겨진 파일을 만드는 오래된 레거시 형식으로 씁니다. (에는 슬래시와 점을 사용하는 MH 규칙을 사용하여 파일을 만드는 MH 모드가 있습니다.