St?phane MERLE: > at the top of my bash script I got : > > lemail=$(cat)
Aaeeiigghh. Why not let the sendmail command read stdin. > sendmail -i "$@" "$additional_recipient" < "$msg" > > will it work without the "-f" ? If you invoke the script via pipe ... argv=/path/to/script -f ${sender} -- ${recipient} Then the -f will already be part of the "$@", therefore sendmail -i "$@" "$additional_recipient" would be sufficient to process the message from STDIN. No tempfile needed. No need to store the message into a variable. If you determine $additional_recipient based on the content of the message, you need to be very careful so as not to open up a gaping security hole. Wietse