I have a bash script I was given which I am using for work. Its a simple script. Basically I get emails for work which I have to accept the job by clicking a link within the email. So the bash basically just curls to the link i need to accept so that these jobs can get accepted automatically.
So I know that fetchmail is set up right because I am able to get my gmail no probs. When I start fetchmail -v I get no errors. When I check my procmail log I see all the subjects of the email but it does not start the script?? when I check my mail folder the emails are there. I have read on some site that when the script start you should see on the procmail log that the script was executed. I do not see this.
Before starting I have done this;
chmod 600 ~/.fetchmailrc
chmod 600 ~/.procmailrc
chmod 700 myscript.sh
Im thinking so far that it has to be something wrong in the .procmailrc, this is what I have..
Code:
SHELL=/bin/sh
PATH=/bin:/usr/bin:/opt/local/bin
MAILDIR=/home/username
LOGFILE=.procmail.log
:0
* ^From:.*sender*
* ^To:.xxxxxxxx@gmail.com
| /bin/sh /home/username/myscript.sh
Also do I have to chmod evertime I am going to run the script?
do you see anything I am missing? Anything stick out in my .procmailrc?