我有一个debian(9.6)系统,该标准系统通过后缀(2.9.6-2)进行了标准的mbox邮件发送。
我的〜/ .procmailrc非常简单:
LOGFILE=/tmp/procmailoggy
LOGABSTRACT=yes
VERBOSE=yes
:0c
| /home/user/import_email.sh
和我的〜/ .forward文件:
"|IFS=' ' && exec /usr/bin/procmail || exit 75 user"
我希望邮件能够正常存储,并执行一次 import_email.sh 程序,但是它会执行两次(邮件会正常存储)。
如何实现该程序仅执行一次?
这是日志:
procmail: [2814] Tue Feb 26 13:15:59 2019
procmail: Executing "/home/user/import_email.sh"
procmail: [2814] Tue Feb 26 13:15:59 2019
procmail: Assigning "LASTFOLDER=/home/user/import_email.sh"
procmail: Assigning "PATH=/home/user/bin:/usr/local/bin:/usr/bin:/bin"
procmail: Executing "/home/user/import_email.sh"
procmail: Assigning "LASTFOLDER=/home/user/import_email.sh"
procmail: Locking "/var/mail/user.lock"
procmail: Assigning "LASTFOLDER=/var/mail/user"
procmail: Opening "/var/mail/user"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/mail/user.lock"
procmail: Notified comsat: "user@8128274:/var/mail/user"
From user2@mail2.somedomain.com Tue Feb 26 13:15:59 2019
Subject: aapg
Folder: /var/mail/user 577