Date: Sun, 19 Jun 2005 14:20:08 GMT From: Matthias Fechner <idefix@fechner.net> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/72915: [cron] Cron will not send emails via Exim Message-ID: <200506191420.j5JEK8k0034570@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/72915; it has been noted by GNATS. From: Matthias Fechner <idefix@fechner.net> To: bug-followup@FreeBSD.org, idefix@fechner.net Cc: Subject: Re: bin/72915: [cron] Cron will not send emails via Exim Date: Sat, 18 Jun 2005 11:54:41 +0200 i tried now to debug it, and found a solution, which solves the problem. But i have no idea, why this is resolving the problem. Patch the file /usr/src/usr.sbin/cron/cron/do_command.c with the following patch: --- do_command.c.orig Wed Jun 15 11:19:43 2005 +++ do_command.c Sat Jun 18 11:45:21 2005 @@ -419,6 +419,8 @@ register char **env; auto char mailcmd[MAX_COMMAND]; auto char hostname[MAXHOSTNAMELEN]; + FILE *myfdh; + myfdh=fopen("/tmp/cron.log","w"); (void) gethostname(hostname, MAXHOSTNAMELEN); (void) snprintf(mailcmd, sizeof(mailcmd), @@ -440,6 +442,7 @@ fprintf(mail, "X-Cron-Env: <%s>\n", *env); fprintf(mail, "\n"); + fclose(myfdh); /* this was the first char from the pipe */ -- Thx Matthias
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506191420.j5JEK8k0034570>