Re: [exim] pipe transport woes

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: W B Hacker
Dátum:  
Címzett: exim users
Tárgy: Re: [exim] pipe transport woes
Douglas Choma wrote:
> I have a very simple shell script written to handle email messages to
> a specific address. But I've noticed some weirdness with using
> scripts from Exim.
>
> Let me give a quick example:
>
> foo.sh
> ------
> #!/bin/sh
> date >>/tmp/script.log
> id >>/tmp/script.log
> cat - >>/tmp/script.log
> exit 0
>
> When executed from an Exim transport, the script.log file contains
> only the results from "id"...
> ------
> uid=1015(dchoma) gid=1015(dchoma)
>
>
> Where's the date and the message? The script does what it's supposed
> to if run from the shell...
> ------
> Sat Dec 16 23:45:23 PST 2006
> uid=0(root) gid=0(root) groups=0(root)
> this is some sample text
>
>
> I've read through the documentation several times. I've tried the
> "use_shell" option to see if that makes a difference (it doesn't).
> What am I missing?
>


Can you test with a truncated script that writes the date only?

Then also with a script that has no bang-call to any specific shell?

Just a SWAG, but my guess is that Exim 'owns' a copy of the UID:GID, and needs
nothing external to do a file append, so is able to write that on it own resources.

It may not, however, in your environment, have rights to use the system
functions, eg 'date' (though it has its own analogue) - or even /bin/sh at all.

HTH,

Bill