Solved

Sendmail sending to a smarthost

Posted on 2010-11-13
4
932 Views
Last Modified: 2013-12-17
Hi

I have recently reconfigured sendmail and configured to send via a smarthost.

This appears to be working fine for all domains apart from one, ours!

Our intranet sends email to our own employees (mydomain.com) and also to clients (at external domains/mail servers hosted by the clients). The email to clients is working, however emailing to our own employees isn't getting through.

Sendmail forwards to our smarthost (smarthost.com).

In the syslog I see the same logs for a mail to a client domain (that works) and to our own domain (that never arrives).

Does anyone know how I would start to diagnose the issue?

If you need anymore information,
let me know

Thanks
0
Comment
Question by:webhanson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 31

Expert Comment

by:Frosty555
ID: 34128825
Sendmail routes "external" domain names through your smarthost, like normal.

But domain names that are configured to be "local" sendmail will route directly, and not use your smarthost. This is because Sendmail expects to receive mail on those local hostnames, so presumably if it routed that through the smarthost, the smart host would just send the mail right back to it, and this would create a loop.

If you aren't using Sendmail to accept emails, and it is just an outbound router (e.g. you have another smtp server accepting emails for your organization somewhere like Exchange Server), then you need to remove your organizations' domain from Sendmail's "local host names" list, which I think is available here:

/etc/mail/local-host-names

http://www.freebsd.org/doc/handbook/sendmail.html
0
 
LVL 2

Author Comment

by:webhanson
ID: 34128942
Hi Frosty,

Your assumption of what I'm looking for is spot on, and that is for sendmail to just as act as an outbound router to my smarthost!!

However I don't have mydomain.com specified in the local-host-names.... any other ideas?

0
 
LVL 2

Accepted Solution

by:
webhanson earned 0 total points
ID: 34129764
If you need to be able to setup sendmail so that it routes all mail via an external smarthost (as described above) there are three main settings in the /etc/mail/sendmail.mc that need to be altered/added.

FEATURE(`stickyhost')
DEFINE(`MAIL_HUB', `smarthost.com')
DEFINE(`SMART_HOST',`smarthost.com')

This forces sendmail to send to all domains via smarthost.com, even ones it believes it is responsible for.
0
 
LVL 2

Author Closing Comment

by:webhanson
ID: 34162518
The specific settings you need will depend upon your configuration requirements. However the above settings work well in conjunction with masquerading on a sendmail server that is not used to receive email for domains that you are sending as.
0

Featured Post

Save the day with this special offer from ATEN!

Save 30% on the CV211 using promo code EXPERTS30 now through April 30th. The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question