Weird Problem with Emails

OK, I just set up a new site for a client and I’m having troubles with the emails being sent. They are on a VPS on Wiredtree. The emails are being sent just fine, but they are coming from the host name on behalf of me.



My email is set up on their system for testing purposes so it doesn’t match their domain.



This is what their emails are saying they are from:


emailaddress@host.domain.com; on behalf of; Their Store Name <brandon@jandkonline.com>
```<br />
<br />
Obviously I've changed the domain and store name.<br />
<br />
Anyone have any ideas why this is coming up like this instead of just a normal email address?<br />
<br />
Thanks,<br />
<br />
Brandon

One of mine on 2.14 does this too, been trying to find out for a while but its gone on the back burner as Im so busy. VPS too.



John

I just noticed mine doing this as well!

I think you have to configure the SMTP, this is what it does when sent with php.

If you are running SMTP, ensure that your DNS PTR record for your IP identifies the domain name associated with the site. Otherwise, the SMTP host “might” reject the message since it can't verify the IP maches the reverse lookup of the SMTP HELO command. Get the host's help is properly setting up the SMTP server on our VPS.

Nope, no SMTP. This is set up the exact same way I've set up a bunch of other sites, but for some reason this is behaving this way. I'm thinking that it is something on the server, but I don't know what it could be. I figured I'd contact WiredTree, but I figured I'd check on here first. It sounds like I'm not the only one to see this issue, so it would sure be interesting to know if there is a fix.



Thanks,



Brandon

If you're using PHP mail (not SMTP) then you must ensure you have your php.ini file setup correctly to use the propoer mail_from (or similar name) value.

Well, WiredTree got this figured out.



I don't fully understand the problem, but here is what they said:


[quote]It looks like this is due to the mail server being configured to include the “on behalf of” headers which are a great asset in detecting spam and are thus needed in a shared hosting environment. The only reason it causes problems is that Outlook is set to display this while no other major email clients do. I found a article on disabling it:



[url=“http://www.electrictoolbox.com/prevent-sender-header-exim/”]http://www.electrictoolbox.com/prevent-sender-header-exim/[/url][/quote]



I sure hope that can help someone down the road.



Thanks,



Brandon

A VPS should support an SMTP service per IP configured on the VPS. If there are shared Virtual Hosts on the VPS then you want the “on behalf of” (which is really a relay request and the SMTP server is saying “I can't really verify this host”). If the site uses a dedicated IP then the SMTP server should be configured to be used with authentication from the ONE domain it is configured to use (matching IP, domain name and authentication credentials). You should have an instance of SMTP listening on the configured ports for each IP assigned to the VPS.



If your VPS is running a single site and a single domain, then configuration is easy. If it is running multiple sites, but in the same domain (I.e. store.dom.com and store2.dom.com) then it's also simple because the domain name is constant. If you are running multiple sites within the VPS and sharing IP addersses then you have to configure the SMTP server to use authentication properly otherwise mail it sends will be seen as spam by any reputable email receiver.

Tony,



Uhm, yes?



I tried setting up the email as SMTP and couldn't figure it out. This is only one site on a VPS with a dedicated IP, so I'm in agreement that it shouldn't be too hard. Unfortunately though, I couldn't figure it out. Luckily WiredTree was able to do stuff and the emails work now.



I still don't understand what they did, but at least it is working.



I'll read back through what you said and see if I can understand it a bit more. I do really appreciate the explanation though.



Thanks,



Brandon

If you're using php mail, then ensure that the php.ini file has the mail from value (I don't remember the exact name) set to the domain name of the site. This will then be used by sendmail as the From address in the envelope.