Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28076 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24287 invoked by uid 1010); 19 Feb 2007 17:01:14 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 24272 invoked from network); 19 Feb 2007 17:01:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2007 17:01:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=sean@caedmon.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sean@caedmon.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain caedmon.net from 69.60.120.90 cause and error) X-PHP-List-Original-Sender: sean@caedmon.net X-Host-Fingerprint: 69.60.120.90 iconoclast.caedmon.net Linux 2.4/2.6 Received: from [69.60.120.90] ([69.60.120.90:54239] helo=iconoclast.caedmon.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 10/C1-10467-9D7D9D54 for ; Mon, 19 Feb 2007 12:01:13 -0500 Received: from localhost ([127.0.0.1]) by iconoclast.caedmon.net with esmtp (Exim 3.35 #1 (Debian)) id 1HJBpl-0001hM-00; Mon, 19 Feb 2007 11:57:50 -0500 Message-ID: <45D9D7CB.7090707@caedmon.net> Date: Mon, 19 Feb 2007 12:00:59 -0500 User-Agent: Thunderbird 1.5.0.9 (X11/20070103) MIME-Version: 1.0 To: Kristoffer Hultenius CC: internals@lists.php.net References: <49.62.10467.4A899D54@pb1.pair.com> In-Reply-To: <49.62.10467.4A899D54@pb1.pair.com> X-Enigmail-Version: 0.94.2.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Reference in the mail header From: sean@caedmon.net (Sean Coates) 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: sean@sarcasm:~$ 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 sean@sarcasm Mon Feb 19 11:54:22 2007 X-Original-To: sean X-host-tag: uniquehosthere To: sean@sarcasm Subject: subject Date: Mon, 19 Feb 2007 11:54:22 -0500 (EST) From: sean@sarcasm (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