From owner-freebsd-questions@FreeBSD.ORG Tue Sep 2 12:51:59 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43CD516A4BF for ; Tue, 2 Sep 2003 12:51:59 -0700 (PDT) Received: from lakemtao04.cox.net (lakemtao04.cox.net [68.1.17.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBE7443FE5 for ; Tue, 2 Sep 2003 12:51:55 -0700 (PDT) (envelope-from rjhjr@cox.net) Received: from kongemord.krig.net ([68.100.111.121]) by lakemtao04.cox.net (InterMail vM.5.01.06.04 201-253-122-130-104-20030726) with SMTP id <20030902195155.TMQC419.lakemtao04.cox.net@kongemord.krig.net> for ; Tue, 2 Sep 2003 15:51:55 -0400 Received: by kongemord.krig.net (sSMTP sendmail emulation); Tue, 2 Sep 2003 15:51:54 -0400 From: "Bob Hall" Date: Tue, 2 Sep 2003 15:51:54 -0400 To: freebsd-questions@freebsd.org Message-ID: <20030902195153.GA13300@kongemord.krig.net> Mail-Followup-To: freebsd-questions@freebsd.org References: <6.0.0.14.1.20030829170215.024d6d20@192.168.1.43> <17623134171.20030829170103@mygirlfriday.info> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Subject: Re: Cron on qmail not sending me logs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2003 19:51:59 -0000 On Tue, Sep 02, 2003 at 02:27:16PM -0400, Ralph Dratman wrote: > Gary, > > Thank you for your reply. Your comments are informative but I still > don't know what to do! > > For some reason, I am not receiving mail sent from cron to root. > Therefore, I cannot see any of my (rather important) daily cron logs. > > I can send mail to root from anyplace else, either inside or outside > the box, and it arrives at the forwarded location (ralph@maxsoft.com, > an external domain). > > Can you think what might be going wrong? I didn't see your original post, so I don't know what info you gave about this. I can send mail to root from any crontab without problem. If you haven't done this already, try a couple of things: Check the contents of /var/mail/root, to see if the mail is being sent there. If so, then cron is somehow bypassing the system that sends root mail to the external address. Is the problem cron, or just this job? Try a second cron job that just sends mail to root. Something like MAILTO=root * * * * * "Test" The MAILTO will cause every job in the crontab to send its output to root, so you probably don't want to leave it in there very long. root should get an e-mail that says something like Test: not found If not, then the problem is proably in the mail delivery. In that case, I don't know the specifics of your mail delivery, but it works in all other cases, so cron apparently can't access it. Cron's PATH contains only "/bin:/usr/bin", or something similar. The shells you successfully email from have longer PATHs. Take the PATH value from a shell, and put it into your cron tab. MAILTO=root PATH= * * * * * "Test" If that works, then you need to figure out which part of the PATH you need to add to cron's PATH. For security reasons, you don't want to leave a crontab configured like that. It's best to put the expanded PATH and the job in a shell script, and have cron call the script. Ordinarily, if cron lacks a path, you get a "permission denied" e-mail, but in this case you're not getting e-mails. If the first test (no PATH) does work, then examine the output from the app cron is trying to run and see if there is any output for cron to send you. Remember that I'm speculating about the cause of your problem. I have no idea if this will get you anywhere. Bob Hall