Re: [Exim] Re: Re: Re: pipe transport

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Derrick 'dman' Hudson
Datum:  
To: exim-users
Betreff: Re: [Exim] Re: Re: Re: pipe transport
--
On Fri, Jul 05, 2002 at 02:37:14PM +0200, Torsten Curdt wrote:

| # ( echo "To: test-crash" ; echo ; echo "body" ) | exim -t -d9

|
| The first works just fine (as exspected) but the second one gives a "mail
| delivery failed":

|
| A message that you sent could not be delivered to one or more of its
| recipients. This is a permanent error. The following address(es) failed:

|
|   test-crash@???
|     Child process of test_crash_delivery transport
|     (running command"/tmp/crash -segv") was terminated by
|     signal 11 (Segmentation fault)

|
| The following text was generated during the delivery attempt:

|
| ------ test-crash@??? ------

|
| null 0

|
| ^--- watch this!

|
| At least me for it looks like it's not that easy because the child that dies
| with a segfault seems to return 0 instead of 139:((
| Or did I get something wrong here?


That text has nothing to do with the exit code (the "null 0"). It
comes from a printf() statement in the code that prints out the value
of the null pointer as an integer (which will always be 0).

Hmm, I just realized that any output probably makes exim consider the
delivery to have failed, but since you still get the seg fault message
I don't think that is relevant.

Try using a shell script like this instead then (untested) :


#!/bin/sh

# do this as if we really were sending the input (message) to cyrdeliver
cat | crash -segv
ECODE=$?

# determine what exit code we really want to give to exim
if [ $ECODE == 139 ] ; then
    # temporary error
    exit 75 ;
fi
exit $ECODE



-D

--

Religion that God our Father accepts as pure and faultless is this: to
look after orphans and widows in their distress and to keep oneself from
being polluted by the world.
        James 1:27


http://dman.ddts.net/~dman/

--
[ Content of type application/pgp-signature deleted ]
--