LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Problem with cron and mail (https://www.linuxquestions.org/questions/linux-general-1/problem-with-cron-and-mail-565232/)

dryheat 06-28-2007 08:22 PM

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

ScooterB 06-29-2007 07:41 AM

Try this: "m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf" (adjust the path as necessary and remove the quotation marks). Hope this helps!

dryheat 06-29-2007 10:02 AM

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. :confused:

DryHeat


All times are GMT -5. The time now is 10:42 PM.