| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-29-2008, 09:04 AM
|
#1
|
|
Member
Registered: Oct 2004
Location: London (UK)
Distribution: Ubuntu 12.04
Posts: 60
Rep:
|
Sendmail problem (mail hosted elsewhere)
I have a web server set up for a domain (let's call it mydomain.com). Email for this domain is hosted elsewhere, and run by a 3rd party (who control the DNS and MX records for this domain). It all works just fine.
On the web server, I have a PHP script that uses mail() to send out email in specific situations. This all works just fine, except when the script is sending email to another @mydomain.com email address (i.e. email hosted externally, but carries same mydomin.com domain as used on the web server).
In this case, I get the email returned with a 5.1.1 error (no such email account).
Of course, the email address does exist, just not on the machine I'm sending from. It appears that Sendmail is only looking locally for the to address, instead of looking up the MX record remotely and attempting to send.
NOTE: This only happens when sending to an @mydomain.com. Email to other domains work just fine.
This appears to be a sendmail configuration error. Anybody have any suggestions (or the solution) for this problem?
The system is running Fedora Core 7. Sendmail version is sendmail-8.13.7.
Last edited by 60s TV Batman; 01-29-2008 at 09:06 AM.
|
|
|
|
01-29-2008, 09:04 PM
|
#2
|
|
Member
Registered: Dec 2005
Location: Lawrenceville GA
Distribution: Slackware, CentOS. Red Hat Enterprise Linux
Posts: 216
Rep:
|
If your web server is setup as host.mydomain.com, then Sendmail will try to deliver the mail locally. It checks the hostname of the local machine before even trying DNS, and if the domain matches the recipient address, local delivery. You may need to add an entry to mailertable for mydomain.com that points to the offsite email server.
|
|
|
|
01-30-2008, 01:13 AM
|
#3
|
|
Member
Registered: Oct 2004
Location: London (UK)
Distribution: Ubuntu 12.04
Posts: 60
Original Poster
Rep:
|
Quote:
Originally Posted by centauricw
If your web server is setup as host.mydomain.com, then Sendmail will try to deliver the mail locally. It checks the hostname of the local machine before even trying DNS, and if the domain matches the recipient address, local delivery. You may need to add an entry to mailertable for mydomain.com that points to the offsite email server.
|
Thanks centauricw
While looking at mailertable (which is empty on the machine in question), I decided to take a look in the local-host-names file. There is indeed an entry for the domain in question.
I removed the entry, restarted Sendmail, and hey presto! No failed delivery notice.
I can't check the destination myself, so will have to wait until they start work later this morning. I suspect it has done the trick (explains the symptoms).
Thanks for your help.
Last edited by 60s TV Batman; 01-30-2008 at 01:18 AM.
|
|
|
|
01-31-2008, 06:52 AM
|
#4
|
|
Member
Registered: Dec 2005
Location: Lawrenceville GA
Distribution: Slackware, CentOS. Red Hat Enterprise Linux
Posts: 216
Rep:
|
You can always do the address processing tests using the "sendmail -bt" command. To see how it will handle a particular address use this command:
3,0 someone@example.com
Sendmail will output the checks it uses processing the address against the sendmail.cf config file and will show that will either be delivered locally or relayed to another system. I use this a lot to resolve Sendmail config issues.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:40 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|