|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: mouss (mouss
ml.netoyen.net)
Date: Wed Oct 20 2010 - 16:16:51 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Le 19/10/2010 21:22, Victor Duchovni a écrit :
> On Mon, Oct 18, 2010 at 11:37:18PM +0200, mouss wrote:
>
>> - get the MAIL FROM address from the "Return-Path" header. with this you
>> can do: sendmail -f $returnpath yourdestinationemail
> Make that:
>
> sendmail -i -f "$returnpath" -- "$destpath"< msgfile
>
> The returnpath can have all kinds of interesting characters.
indeed.
> If using
> Perl, it is highly advisable to entirely bypass shell argument parsing:
>
> $prog = "/usr/sbin/sendmail";
>
rcpts = ( q{joe
example.com} );
>
args = qw(sendmail -i);
> push(
args, "-f", "$envsender");
> push(
args, "--",
rcpts);
> system { $prog }
args;
> if (($code = $?) ne 0) {
> # handle errors
> }
>
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]