Re: [Ilugc] Shell-script when cron'ed does not send mail (using sendmail)

2009-01-18 Thread S.Selvam Siva
On Tue, Jan 13, 2009 at 2:57 PM, Arun Khan kn...@yahoo.com wrote:
 Are you executing the job as a regular user or system cron?
 Accordingly, you must add MAILTO=emailid either in /etc/crontab or
 the user's crontab.

Hi,

MAILTO=emailid guided me to find what was the problem with sendmail when
cronned.

The Problem was  sendmail: command not found . So, sendmail when cronned
requires its *complete path*. Eg. /usr/sbin/sendmail as in my case.

Thankyou for your valuable suggestions. Now, sendmail is sending mails when
it is cronned.

-- 
Yours,
S.Selvam
___
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with 
unsubscribe password address
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


[Ilugc] Shell-script when cron'ed does not send mail (using sendmail)

2009-01-13 Thread S.Selvam Siva
Hi,

We wrote a shell script which will do some posting work and need to
send the details of the work(posting).
It works fine when it is not cronned ,but it does not send mail when cronned.
I googled on this and found that we need some authentication for
sendmail to work when it is cronned. I tried the following cron-script
but it failed:

 echo password | sudo -u username -S script-to-send-mail.sh

please guide me on this problem


-- 
Yours,
S.Selvam
___
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with 
unsubscribe password address
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc