Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to send crontab job file by using mail 1

Status
Not open for further replies.

cybersteve2005

Technical User
Oct 3, 2005
2
US
Hello - I am using fedora core 3 - my regular email client is thunderbird which works fine.

I have a daily crontab job that starts a program which when its done, has generated a report file.

I want to add a line to the crontab job that has the path to that results file and send it out using email. Something like:

00 17 * * * root /bin/mail -s "My Daily Report" myname@myisp.net < /daily_rpt

The crontab job must run as root.

I have tried this and the email is not accepted as fedora according to the system mail logs; my isp's email server sees root@localhost.localdomain and never sees the active email address that I use all the time in the thunderbird email client ???

How can I get around this problem. My isp says they are not blocking it. Thanks Steve.
 
can you send a mail to an external account? i mean if you issue the following command in the linux box:

cat daily_rpt | mail -s "report" user@myIsp.com

do you get an error? if so, you should configure your mail server firts (in the linux box), postfix? sendmail? exim?

Cheers.

Chacal, Inc.[wavey]
 
Check your Postfix or Sendmail configuration. In Postfix, the sending domain is controlled by the "myorigin" variable. In sendmail.cf, it's "DM", or "MASQUERADE_AS" in sendmail.mc.
 
Hi Chacalinc - I tried your CAT command which worked and determined my ISP was blocking emails from linux PC's if they were sent by means other than a regular email client (outlook express or thunderbird). So, emailing from crontab jobs I used an email account that wasn't through my ISP and it works fine !
Thanks for your help !! Steve.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top