This is a problem that I'm sure is easy to fix, but I hit my head about it all day.
I am developing a new website for a client. The website is located on this website (this is an example). I have a PHP form script to send visitors requests to request@website.com.
When I encoded this on an intermediate server in another domain, everything worked fine. When I moved it to the .com website, the email messages never arrived. The web server is located on a virtual host with the main provider.
Here's what I have learned since then: my client mail server is Microsoft Exchange on a mailbox physically located in the office. Whenever someone from the outside world sends emails to request@website.com, mail arrives. But if the web server sends to the same email address, it fails every time. This is not a PHP problem. I protect the shell on a web server and tested this with both sendmail and the UNIX mail application. I also tested it by emailing various email accounts from the shell. I can send myself an email, for example, only to anyone in the website domain.
In short, when I logged in to the website, the mail to request@website.com, user@website.com, another_user@website.com did not work. All other addresses work fine. What I discovered are those that were emailed, redirected to the mainall account of the web server, where they are in the inbox.
I did an MX search on the website. The MX record points to mailsec.website.com. I can install telnet on the mailsec.website.com 25 port and see the SMTP server.
It seems to me that website.com does not search for MX when sending mail to request@website.com. My theory is that it recognizes the domain as local, sees that there is no user account "requests" to deliver it, and drops the mail to the account. I want to get sendmail to search in MX and send a message to the Exchange server. I'm here. I canβt figure out how to do this.
For that matter, I could step back from here and completely fix it. Internet mail and MX have always seemed to me a black art, and my ignorance undoubtedly manifests itself in this matter.
email smtp sendmail mx-record
Jim Nelson Nov 27 '08 at 0:56 2008-11-27 00:56
source share