Ubuntu 18.04, running postfix and procmail I have a .procmailrc and a .forward and all that. I configured procmail to log to a specific file, and the only way I can get it to work is by setting that file to be world readable and writable. Obviously this is no good. How do I determine what user account procmail is using to access files so I can lock it down to that account? (root:root and 644 didnt work....)
I have the same problem with a file written by a python script which procmail recipe calls - the only way to get it to work so far is to make the file 777. Again, I dont know how to figure out what account is trying to access this file when the python script runs.
ETA: The .procmailrc is as follows:
# Set to yes when debugging
VERBOSE=yes
# Default INBOX
INBOX=$MAIL
# Directory for storing procmail-related files
PMDIR=$HOME/procmail
# Uncomment the following line to get logging
LOGFILE=/var/log/procmail/pmlog
:0wc:
| /usr/bin/python /home/[MyUsername]/scripts/mailproc.py
mailproc.py is a simple python script which postprocesses the email message for a specific purpose. I added a call to "whoami" in the py file and discovered that the py is running under the user who owns the procmailrc file.
But I still cant figure out who should own the procmail log file. Having it root:root and 644 wont work.