LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-28-2007, 08:22 PM   #1
dryheat
LQ Newbie
 
Registered: Dec 2006
Posts: 18

Rep: Reputation: 0
Problem with cron and mail


Hello. I have just set up a cron job on FC6 (first try) and I am getting the following message in the log:
Jun 28 lpserver@localdomain crond[5728]: (root) MAIL (mailed 369 bytes of output but got status 0x0045)
I think it's trying to send me an error message but us encountering a mail problem. I edited the crontab file to include a MAILTO=me@mymail.com line, and am still getting the message. Did some research and found that I needed to enable external network access for sendmail. Following this guide I edited the sendmail.mc file, but when I tried to issue m4 /etc/mail/sendmail.mc > /etc/sendmail.cf I got an error
m4:/etc/mail/sendmail.mc:10: cannot open '/usr/share/sendmail-cf/m4/cf.m4': No such file or directory
pgrep sendmail yields two process numbers. But then I try telnet localhost 25 it refuses the connection. The maillog contains entries that end of which say
mailer=relay, pri=30763, relay=[127.0.0.1] [127.0.0.1], dsn=5.0.0, stat=Service unavailable
So can anyone advise me how to straighten this out?

Thx...

DryHeat

Last edited by dryheat; 06-28-2007 at 08:37 PM.
 
Old 06-29-2007, 07:41 AM   #2
ScooterB
Member
 
Registered: Sep 2003
Location: NW Arkansas
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344

Rep: Reputation: 31
Try this: "m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf" (adjust the path as necessary and remove the quotation marks). Hope this helps!
 
Old 06-29-2007, 10:02 AM   #3
dryheat
LQ Newbie
 
Registered: Dec 2006
Posts: 18

Original Poster
Rep: Reputation: 0
I did run that command and got the error reported above. After that I discovered I didn't have sendmail-cf installed, so I installed it and the command ran fine. But the other problems persist. When I try telnet localhost 25 I get
telnet: connect to address ::1: Connection refused
telnet: Unable to connect to remote host: Connection refused
and maillog contains
sendmail[30402]: gethostbyaddr(192.168.1.104) failed: 1
sendmail[30402]: NOQUEUE: SYSERR(root): No local mailer defined
sendmail[30402]: NOQUEUE: SYSERR(root): QueueDirectory (Q) option must be set
So somehow it's still not configured right, and I can't find much help in the various guides for figuring out what's wrong.

DryHeat
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron problem - either won't execute or doesn't mail the results - bash, Mandriva 10.2 otacon 14112 Linux - General 2 03-29-2007 03:16 AM
Cron mail sending using outside SMTP mail server Utah Linux - Software 6 08-24-2005 07:44 PM
Problem with Cron and Mail jpc82 Linux - Software 4 03-05-2005 07:11 PM
No More Cron Mail, Cron Error? Xhost Linux - General 3 07-26-2004 04:28 PM
need only cron job mail on my mail id manojthakkar Linux - Newbie 0 12-20-2003 05:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:10 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