Hello
I'm using fetchamil / procmail to fetch mails from an POP server and parse
it then launch a script or system call :


# cat .fetchmailrc
set logfile fetchmail.log
poll imaps.dom.tld proto POP3
user "u...@dom.tld" pass "xxxxxx" preconnect "date >> ~/fetchmail.log"
ssl
fetchall
keep
no rewrite
mda "/usr/bin/procmail ~/.procmailrc";

# cat .procmailrc
LOGFILE=procmail.log
VERBOSE=yes
:0
* ^Message-ID: \/.*
#| /usr/bin/curl http://mail.dom.tld/script.php?messageid=$MATCH
| echo "whoami" > test.txt


This work fine when calling fetchamil as root with "fetchamil -f
.fetchmailrc". But when calling fetchmail from a dedicated user, the
external script in procmail is not called. It's written in the logfile that
:

procmail: [25332] Mon Jun 19 16:20:28 2023
procmail: Assigning "MATCH="
procmail: Matched "<9088600d-446a-96b4-4043-29ecd0d5a...@dom.tld>"
procmail: Match on "^Message-ID: \/.*"
procmail: Assigning "LASTFOLDER= echo "whoami" > test.txt"
 Subject: test
  Folder:  echo "whoami" > test.txt
 1824
procmail: Executing " echo "whoami" > test.txt"

but nothung happens.
Am I missing something ?
Regards
Cédric

Reply via email to