[ZendTo] Re: Sender Policy Framework (SPF) check on zendto sent emails
Marlon R Deerr
MDeerr at tgf.ca
Fri Nov 23 17:59:07 GMT 2012
Thanks Mike. That seemed to fix it. Looks like that other setting that has escaped you doesn't prevent that modification from working.
Thanks,
Marlon
PS: I didn'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 "true" sender.
From: zendto-bounces at zend.to [mailto:zendto-bounces at zend.to] On Behalf Of Mike Brudenell
Sent: November-23-12 11:53 AM
To: ZendTo Users
Subject: [ZendTo] Re: Sender Policy Framework (SPF) check on zendto sent emails
Hi, Marlon -
I spotted that here too...
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 "sendmail" program, which then handles transmitting/delivering it.
By default Sendmail sets the sender's address in the "SMTP envelope" of the message (the thing you're seeing in the message header) to the username of the currently running program, followed by "@" 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 "www-data". (Therefore the email address <www-data at mydomain.ca<mailto:www-data at mydomain.ca>> will probably actually exist, unless your email system explicitly overrides and forbids it.)
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.
We did this by editing the file /etc/php5/apache2/php.ini and changed the line setting up the sendmail command to read:
sendmail_path = "/usr/sbin/sendmail -t -i -fdo-not-reply at york.ac.uk<mailto:fdo-not-reply at york.ac.uk>"
It's the "-fsomeadress at yoursite.domain<mailto:-fsomeadress at yoursite.domain>" 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.
According to my records we also changed the /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?)
Cheers,
Mike B-)
On 23 November 2012 16:07, Marlon R Deerr <MDeerr at tgf.ca<mailto:MDeerr at tgf.ca>> wrote:
I sent myself a drop-off to my personal Gmail account. The header information for that email says the following:
Received-SPF: pass (google.com<http://google.com>: domain of www-data at mydomain.ca<http://mydomain.ca> designates 38.99.162.170 as permitted sender)
Question: Where did it get www-data@ come from? That email address does not exist in domain. Is this some preference setting I need to correct in my setup?
--
IT Services, The University of York, Heslington, York YO10 5DD, UK
Tel: +44-1904-323811
Disclaimer: <http://www.york.ac.uk/docs/disclaimer/email.htm>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/zendto/attachments/20121123/03218d96/attachment.html
More information about the ZendTo
mailing list