[Exim] Exim 4.12 on FreeBSD not running queues (solved?)

Góra strony
Delete this message
Reply to this message
Autor: Marcin Simonides
Data:  
Dla: exim-users
Temat: [Exim] Exim 4.12 on FreeBSD not running queues (solved?)
I don't know if this problem has been already solved (i didn't find
anything neither here nor when searching with google) but I'm posting
it, maybe someone will save some time...

I don't know if that's the same issue that others here were experiencing
but it looked exactly the same. Anyway, I thought that posting this wouldn't
hurt ;)

The problem on my FreeBSD 4.8-REL was caused by /dev/null being chmod 600!
That's a strange thing, it "happened" only on one of two 4.8-RELEASE
(the one cvsupped about three weeks ago, the other about a week ago)
I have access to and not on my 4.8-STABLE.
After changing it to 666 deliveries are being run as scheduled.


From exim.c:

/*************************************************
*   Ensure stdin, stdout, and stderr exist       *
*************************************************/


[ some more explanatory comments ]

void
exim_nullstd(void)
{
int i;
int devnull = -1;
struct stat statbuf;
for (i = 0; i <= 2; i++)
  {
  if (fstat(i, &statbuf) < 0 && errno == EBADF)
    {
    if (devnull < 0) devnull = open("/dev/null", O_RDWR);
    if (devnull != i) dup2(devnull, i);
    }
  }
if (devnull > 2) close(devnull);
}


So when exim was started in foreground with output on stdout/stderr
everything was alright, but when it was run in background spawned processes
had fds 0, 1 and 2 closed which apparently (I didn't have time to investigate
further) caused problems.
--
                                                            --  Cinek


     "I think fish is nice, but then I think that rain is wet,
     so who am I to judge?"
          -- D. Adams, "The Restaurant at the End of the Universe"