Kristoffer Hultenius wrote:
> Hello everybody!
> 
> As a webhost that offer PHP-support for hundreds of customers, I have a 
> concern.
> The mail()-function is too easy to use for sending spam and even worse - 
> there is (sometimes) almost impossible to trace the sender-account.

You can solve this (mostly) in admin-space by setting the sendmail_path,
creatively, in php.ini.

For example, I can send mail with this:
[EMAIL PROTECTED]:~$ php -d "sendmail_path=/home/sean/bin/mailwrap
uniquehosthere" -r 'mail("sean", "subject", "message body here");'

Here's /home/sean/bin/mailwrap:
(echo "X-host-tag: $1" ; cat -) | /usr/sbin/sendmail -t -i

And here's the resulting mail:
>From [EMAIL PROTECTED]  Mon Feb 19 11:54:22 2007
X-Original-To: sean
X-host-tag: uniquehosthere
To: [EMAIL PROTECTED]
Subject: subject
Date: Mon, 19 Feb 2007 11:54:22 -0500 (EST)
From: [EMAIL PROTECTED] (Sean)

message body here


... I'm not shooting down your idea, but there _is_ a way to solve this
right away. (Perhaps I'm missing something obvious, but I don't see an
obvious way to get around this tag in userspace.) The sendmail_path
value could be set with php_admin_value in your VirtualHost config.

S

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to