Note that there are some explanatory texts on larger screens.

plurals
  1. POsecurity and mail() function in php
    primarykey
    data
    text
    <p>I'm using mail() to send simple mails. For convenience, i'm using a header to set a "from" address. I wonder, I can put whichever address there and pretend to be anyone; I tried just towards myself for curiosity and actually it works! Is this normal? It's the correct way to use the mail function? and is there any way to recognize the identity of the sender of these mails?</p> <p>EDIT: I sent a mail to my self using my gmail address as "from" in the header of mail(). I received the message with these headers: </p> <pre><code>… Received: from smarty.dreamhost.com (smarty.dreamhost.com [208.113.175.8]) by mx.google.com with ESMTP id w21si2197938ybh.68.2010.10.19.19.33.30; Tue, 19 Oct 2010 19:33:30 -0700 (PDT) Received: from nationals.dreamhost.com (nationals.dreamhost.com [69.163.165.6]) by smarty.dreamhost.com (Postfix) with ESMTP id EB56D6E804A for &lt;myMail@gmail.com&gt;; Tue, 19 Oct 2010 19:33:29 -0700 (PDT) Received: by nationals.dreamhost.com (Postfix, from userid 3598506) id E4BB635C83F; Tue, 19 Oct 2010 19:33:29 -0700 (PDT) Return-Path: &lt;mySite@nationals.dreamhost.com&gt; Received-Spf: pass (google.com: domain of mySite@nationals.dreamhost.com designates 208.113.175.8 as permitted sender) client-ip=208.113.175.8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mySite@nationals.dreamhost.com designates 208.113.175.8 as permitted sender) smtp.mail=mySite@nationals.dreamhost.com </code></pre> <p><br><br> What happened? I can't interpretate headers, but look like google accepted the fake address!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload