I want to set up an email address that executes a script with every incoming email, so in my /etc/aliases, I did this:
Then I rebuilt the postfix alias db with sudo postalias /etc/aliases, and then sent an email to [email protected] That’s when the fun began. The script is run by nobody/nogroup, so it couldn’t log to my logging directory, because I require people to be in the adm unix group.
Then I created a user named runscript, and moved that
| /usr/local/bin/email_reading_script.py line into a .forward file. I added adm to runscript’s unix groups.
AND STILL NO JOY.
I don’t know why, but when the script runs, the shell only seems to get the primary group. So, I kept getting permission-denied errors. I finally got stuff to work when I set adm to be the primary group for my runscript user. Now everything is OK.
This ate up the better part of the @#[email protected]#$ing day. Grr.
If this didn’t work, I was going to install procmail and go down that route.
Am using ubuntu hardy heron.