ID:               19538
 User updated by:  [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Assigned
 Bug Type:         Feature/Change Request
 Operating System: ALL
 PHP Version:      4.2.3
 Assigned To:      derick
 New Comment:

Thats exactly it! Derick assigned this task but he is afaik busy and
won't implement this soon. Too bad but I'm patient :-)


Previous Comments:
------------------------------------------------------------------------

[2002-10-23 17:24:55] [EMAIL PROTECTED]

Ah, I see.  So you want to be able to have a php.ini directive like
this:

  add_mail_headers = "X-PHP-Script:
{$_SERVER[HTTP_HOST]}{$_SERVER[REQUEST_URI]}\nX-Contact-If-Spammed:
Contact Information\n";

So that every mail() call will add that line.  I think that is a valid
request, especially since a badly formed script can really mess things
up.  It would default to "", and if it was not properly written it
would be ignored.

By making it configurable, admins can choose to add or remove global
mail headers.  I think this would be very useful for installs which
serve lots of customers.

------------------------------------------------------------------------

[2002-10-23 16:01:30] [EMAIL PROTECTED]

I can't modify my customers scripts. Scripts are changing frequently,
new customers upload new scripts and so on. Anyway:
[root@gucio customers]# grep -ri 'mail(' . | wc -l
   2873

Changing 2873 not mine script means ,,introduce some bugs'', too.

Basically I want feature that does similar thing to yours but
configurable globally from php.ini.

------------------------------------------------------------------------

[2002-10-23 15:09:47] [EMAIL PROTECTED]

This is easily solved:

mail("[EMAIL PROTECTED]","Subject Line","Body","X-PHP-Mailer-Script:
{$_SERVER[HTTP_HOST]}{$_SERVER[REQUEST_URI]}\nX-PHP-Mailer-Path:
{$_SERVER[SCRIPT_FILENAME]}\nX-PHP-Remote-IP:
{$_SERVER[REMOTE_ADDR]");

This will add three new headers to this mail:

X-PHP-Mailer-Script: yourwebhost.com/path/to/script.php
X-PHP-Mailer-Path: /real/path/to/script.php
X-PHP-Remote-IP: 10.20.30.40

And now you'll know which script the spammer is using.

------------------------------------------------------------------------

[2002-09-22 04:58:05] [EMAIL PROTECTED]

Sorry but you are simply wrong. MTA logs don't contain any usefull
information.

------------------------------------------------------------------------

[2002-09-21 19:51:59] [EMAIL PROTECTED]

IMHO, sendmail's (or whatever MTA you're using) logs should give that
kind of information away, not headers produced by PHP.

Luciano ES
Santos, SP - Brasil

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/19538

-- 
Edit this bug report at http://bugs.php.net/?id=19538&edit=1

Reply via email to