[SA-exim] Novice Installation Question.

Marc MERLIN marc at merlins.org
Thu, 25 Jul 2002 09:52:36 -0700


On Thu, Jul 25, 2002 at 12:03:12PM +0100, Paul Matthews wrote:

Ok, let's try this one again.
Spamc works from the command line, so we have some other problem.

> > > 2002-07-23 13:01:29 17WyM5-0005cQ-00 SA: check succeeded, running spamc
> > > 2002-07-23 13:01:29 17WyM5-0005cQ-00 SA: Unexpected error on header line write 
> > > (but message was accepted), file ../src/local_scan.c, line 596: Broken pipe

It's a good thing I'm in the habit in testing the output of every system
call I suppose :-)
That said, I'm not quite sure why it's failing there.

My code doesn't have enough debug to  say whether it fails on the first line
we write fails  or if it's a  subsequent one, but it's fairly  safe to guess
that the very first write fails.

So let's see, we're writing to a pipe and we get a SIGPIPE. This means the
other side closed the connection or never held it.

Three options:
1) Spamc never gets run (line 586)
2) Spamc gets run but fails and exits right away due to some error
3) Spamc runs but bails as soon as you write to it

If it were 1) , this should get logged but make sure that SAspamcpath does
point to spamc binary on disk (by default /usr/bin/spamc)

If it's 2) I'm not sure what's happening, and it's hard to debug that.
The only way I know is to do the solaris equivalent of strace -f -p eximpid

This will  strace exim, and the  children it forks. It should  then show you
the spamc fork and what happens in spamc.
The interesting output should  only be a few lines, but if  it's a lot, send
it to  me directly (although  you'll probably be able  to tell why  it's not
working once you find the relevant lines)

As for 3, I have no idea why that'd happen, but again, strace could help.

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking 
Home page: http://marc.merlins.org/   |   Finger marc_f@merlins.org for PGP key