On Sun, Jan 26, 2003 at 02:54:07AM -0200, [EMAIL PROTECTED] wrote:
> This is the way to make aeromail work, since it's using the -f option in 
> sendmail.

I attach a patch that work for me with postfix and must work as well
with other MTAs. 

It removes the "-f" option from the sendmail call and configure the
'From' field by using the $from_user variable.

-- 
 .''`.   Javier Linares
: :'  :  javier at javierlinares.com
`. `'`   http://javierlinares.com  
  `-
--- aeromail-1.45/send_message.php      2004-04-16 12:50:33.000000000 +0200
+++ aeromail/send_message.php   2004-04-16 12:43:18.000000000 +0200
@@ -4,10 +4,14 @@
 
        function mailfrom($fromaddress, $body, $headers)
        {
-               $fp = popen("/usr/sbin/sendmail -t -f" . $fromaddress, "w");
+               // $fp = popen("/usr/sbin/sendmail -t -f" . $fromaddress, "w");
+               $fp = popen("/usr/sbin/sendmail -t", "w");
 
                fputs($fp, $headers);
-               fputs($fp, $body);
+               // fputs($fp, $body);
+               $newbody = "From: $fromaddress\n";
+               $newbody .= $body;
+               fputs($fp, $newbody);
                fputs($fp, "\r\n");
 
                if ( pclose($fp) != 0) {

Attachment: signature.asc
Description: Digital signature

Reply via email to