Hi Viktor,
I though I new a little of bash but in fact no ... you're a bash king !
if I understood it well :
first, I save the message in the file descriptor 3
msg=$(mktemp /tmp/msg.XX) || exit 75
cat > $msg || { rm $msg; exit 75; }
exec 3< $msg || { rm $msg; exit 75; }
rm $
> On Dec 22, 2016, at 3:51 AM, Stéphane MERLE
> wrote:
>
> First, I save the message in the file descriptor 3
>
>msg=$(mktemp /tmp/msg.XX) || exit 75
>cat > $msg || { rm $msg; exit 75; }
>exec 3< $msg || { rm $msg; exit 75; }
>rm $msg
>
> then I use it by rewinding it :
>
Viktor Dukhovni:
>
> > On Dec 22, 2016, at 3:51 AM, St?phane MERLE
> > wrote:
> >
> > First, I save the message in the file descriptor 3
> >
> >msg=$(mktemp /tmp/msg.XX) || exit 75
> >cat > $msg || { rm $msg; exit 75; }
> >exec 3< $msg || { rm $msg; exit 75; }
> >rm $msg
>
> On Dec 22, 2016, at 12:36 PM, Wietse Venema wrote:
>
>> # Final command. Shell will remove the temp file and exit with
>> # Sendmail's exit code.
>> /usr/sbin/sendmail "$@"
>
> And do not forget the '--' in
> pipe ... argv=/path/to/script -f ${sender} -- ${recipient}
And the
On Dec 22, 2016, at 12:36 PM, Wietse Venema wrote: # Final command. Shell will remove the temp file and exit with # Sendmail's exit code. /usr/sbin/sendmail "$@"And do not forget the '--' inpipe ... argv=/path/to/script -f ${sender} -- ${recipient}And the missing "< $msg" in the final command: /u