Re: [PHP] Werid problemswith mail() command: From address on sent messages

2002-11-29 Thread Chris Hewitt
C.F. Scheidecker Antunes wrote:


The problem is that I do not want and cannot have my message headers with a From: Apache@LocalHost as this copy bellow shows:

I've changed the header variable and put a From in it so it does displays the right FROM: address as bellow. But as you can see, the Received: (from apache@localhost) by servername, etc is there so the spam filters filter it.

Return-Path: apache
Received: (from apache@localhost)
by ns1.nando.net (8.11.2/8.11.2) id gASLtQM27458;
Thu, 28 Nov 2002 19:55:26 -0200
Date: Thu, 28 Nov 2002 19:55:26 -0200
Message-Id: [EMAIL PROTECTED]
To: [EMAIL PROTECTED] 
Subject: Order # 603 (511066220021128194052)
Content-Type: text/html
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
X-Mailer: PHP/

My php.ini has an smtp entry but no sendmail is running on the local machine. Do I have to have one running? I wish I did not have to do it. Any other way to fix this issue?

I have not seen any replies to this, I don't think I can see exactly 
what is wrong but I may be able to provide some pointers for you. I only 
use the inbuilt mail() function where I do have sendmail running (I 
thought it was required). The From: that you set in the mail() 
function is coming out correctly. The received header showing 
apache@localhost is the first in the list of computers that your email 
is going through.

It is the webserver that is actually sending the email. On RH7.2 Apache 
runs as the user apache so that is correct. What I cannot understand 
is that the webserver/computer cannot find its own name (so it comes out 
as localhost). What have you set the hostname of your computer to? It 
sounds as though it is not set. Have you set the ServerName parameter 
in httpd.conf (leave it commented out)?

What have you set the sendmail_path in php.ini to? I think that it is 
your computer hostname that is causing the problem.

HTH
Chris



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Werid problemswith mail() command: From address on sent messages

2002-11-28 Thread C.F. Scheidecker Antunes
Hello All,

I wonder if is there anyone who ever had the same problem and know how to solve it.

I have a web site that does send e-mail to some users based on requests. The problem 
is that although I pass the right user/from address on the mail function, the message 
source shows From as beeing apache@localhost and therefore some messages bouce back 
due to anti spam filters.

This server is a Red Hat Linux 7.2 and it does not have apache 2.0 but 1.3. It does 
not have sendmail runnig or installed but another server on the same network does have 
it.

The problem is that I do not want and cannot have my message headers with a From: 
Apache@LocalHost as this copy bellow shows:

I've changed the header variable and put a From in it so it does displays the right 
FROM: address as bellow. But as you can see, the Received: (from apache@localhost) by 
servername, etc is there so the spam filters filter it.

Return-Path: apache
Received: (from apache@localhost)
 by ns1.nando.net (8.11.2/8.11.2) id gASLtQM27458;
 Thu, 28 Nov 2002 19:55:26 -0200
Date: Thu, 28 Nov 2002 19:55:26 -0200
Message-Id: [EMAIL PROTECTED]
To: [EMAIL PROTECTED] 
Subject: Order # 603 (511066220021128194052)
Content-Type: text/html
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
X-Mailer: PHP/

My php.ini has an smtp entry but no sendmail is running on the local machine. Do I 
have to have one running? I wish I did not have to do it. Any other way to fix this 
issue?




Carlos Fernando Scheidecker Antunes
Linux User #207984