0

I've a debian (9.6) system with standard mbox mailing over postfix (2.9.6-2).

My ~/.procmailrc is very simple:

LOGFILE=/tmp/procmailoggy
LOGABSTRACT=yes
VERBOSE=yes

:0c  
| /home/user/import_email.sh

and my ~/.forward file:

"|IFS=' ' && exec /usr/bin/procmail || exit 75 user"

I'd like the mail to be stored as normal and execute the import_email.sh program once, but it gets executed twice (the mail gets stored normally).

How do I achieve that the program gets executed only once?

Here's the log:

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
user2194805
  • 1,201
  • 1
  • 17
  • 35

0 Answers0