bin/72915: [cron] Cron will not send emails via Exim

Matthias Fechner idefix at fechner.net
Sun Jun 19 14:20:15 GMT 2005


The following reply was made to PR bin/72915; it has been noted by GNATS.

From: Matthias Fechner <idefix at fechner.net>
To: bug-followup at FreeBSD.org, idefix at 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


More information about the freebsd-bugs mailing list