<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-CA" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks Mike.&nbsp; That seemed to fix it.&nbsp; Looks like that other setting that has escaped you doesn&#8217;t prevent that modification from working.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Marlon<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">PS: I didn&#8217;t set that sent from address to do-not-reply. I felt that may be confusing seeing that recipient actually can reply to that email and have it sent
 back to the &#8220;true&#8221; sender.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> zendto-bounces@zend.to [mailto:zendto-bounces@zend.to]
<b>On Behalf Of </b>Mike Brudenell<br>
<b>Sent:</b> November-23-12 11:53 AM<br>
<b>To:</b> ZendTo Users<br>
<b>Subject:</b> [ZendTo] Re: Sender Policy Framework (SPF) check on zendto sent emails<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">Hi, Marlon -<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">I spotted that here too&#8230;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">The problem is not with ZendTo per se. ZendTo is simply using PHP's functionality to handle sending the email message. I suspect your PHP is, like ours was, simply piping the message into the &quot;sendmail&quot; program, which then handles transmitting/delivering
 it.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">By default Sendmail sets the sender's address in the &quot;SMTP envelope&quot; of the message (the thing you're seeing in the message header) to the username of the currently running program, followed by &quot;@&quot; then the name of the computer its running
 on. If you check, you'll see that ZendTo is running within your web server (Apache?), and that this is running on your computer as username &quot;www-data&quot;. (Therefore the email address &lt;<a href="mailto:www-data@mydomain.ca">www-data@mydomain.ca</a>&gt; will probably
 actually exist, unless your email system explicitly overrides and forbids it.)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">To set the sender address in the SMTP envelope to something else you need to alter the command that PHP uses to call up sendmail when handing over the message for transmission.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">We did this by editing the file&nbsp;/etc/php5/apache2/php.ini and changed the line setting up the sendmail command to read:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<blockquote style="margin-left:30.0pt;margin-right:0in">
<div>
<p class="MsoNormal">sendmail_path = &quot;/usr/sbin/sendmail -t -i -<a href="mailto:fdo-not-reply@york.ac.uk">fdo-not-reply@york.ac.uk</a>&quot;<o:p></o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">It's the &quot;<a href="mailto:-fsomeadress@yoursite.domain">-fsomeadress@yoursite.domain</a>&quot; that forces sendmail to set the sender address in the SMTP envelope to the address given here instead of making one up based on the username the process
 is running as and the name of the computer.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">According to my records we also changed the&nbsp;/etc/php5/cli/php.ini file, but I can't for the life of me spot what change we put into that one. (I think this file is the configuration for PHP when run from the command line rather than from
 Apache?)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Cheers,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Mike B-)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On 23 November 2012 16:07, Marlon R Deerr &lt;<a href="mailto:MDeerr@tgf.ca" target="_blank">MDeerr@tgf.ca</a>&gt; wrote:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I sent myself a drop-off to my personal Gmail account.&nbsp; The header information for that email says the following:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Received-SPF: pass (<a href="http://google.com" target="_blank">google.com</a>: domain of
<b><span style="color:red">www-data</span></b>@<a href="http://mydomain.ca" target="_blank">mydomain.ca</a> designates 38.99.162.170 as permitted sender)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Question: Where did it get www-data@&nbsp; come from?&nbsp; That email address does not exist in domain. &nbsp;Is this some preference setting I need to correct in my setup?<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">-- <br>
<span style="font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">IT Services, The University of York, Heslington, York YO10 5DD, UK<br>
Tel: &#43;44-1904-323811<br>
Disclaimer: &lt;</span><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><a href="http://www.york.ac.uk/docs/disclaimer/email.htm" target="_blank"><span style="font-size:12.0pt">http://www.york.ac.uk/docs/disclaimer/email.htm</span></a></span><span style="font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">&gt;</span><o:p></o:p></p>
</div>
</div>
</body>
</html>