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 "user@dom.tld" pass "xxxxxx" preconnect "date >> ~/fetchmail.log"
ssl
fetchall
keep
no rewrite
mda "/usr/bin/procmail ~/.procmailrc";
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-29ecd0d5a557@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