LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-16-2014, 08:30 PM   #1
robbyrob
LQ Newbie
 
Registered: Jul 2014
Posts: 2

Rep: Reputation: Disabled
Procmail not starting bash script.


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?
 
Old 07-16-2014, 09:31 PM   #2
robbyrob
LQ Newbie
 
Registered: Jul 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
ok i think i have fixed this by changing the .procmailrc file as I am at least now seeing it execute my script in the procmail-log. I will have to wait until tomorrow to get an email from my job to test.

I will report back.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making bash script WAIT after starting subshell mintybadger Programming 9 08-04-2011 04:49 AM
Bash script hangs upon starting another script in the background masea2 Linux - Software 4 11-13-2006 05:18 AM
bash, starting a command in script activeq Programming 9 07-27-2006 08:42 AM
BASH script for starting printer ylikone Programming 2 06-01-2006 04:56 AM
Starting a service in a bash script AMMullan Programming 3 02-19-2004 11:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration