Tricky situation.. I think it may be due to DNS, but I haven't a clue where to start.

We have a simple contact form on our website that uses PHP Pear's Mail class to do secure authentication to our remote SMTP server.

The from address is a no-reply@mydomain.com, we did that on purpose. So to reply to anyone that uses the form, we put the contact's email address as the "reply-to" address. However, when those emails do come in, the reply-to address is someone@somewhere.com.mydomain.com

Can anyone help? It's a VPS so I have full access to configuration files, etc.