Re: [Exim] Need help configuring an Exim SMTP gateway  

Góra strony
Delete this message
Reply to this message
Autor: William Bell
Data:  
Dla: exim-users
Temat: Re: [Exim] Need help configuring an Exim SMTP gateway  
> Hi,
> I need help configuring Exim 4.30 to be an SMTP mail gateway (or hub) for my
> company. I'm new to Exim, so most of my difficulty lies in the creation of
> the proper runtime config file. Here's my LAN setup:
>

---snipped---

Well, I believe I've answered my own questions. The reading paid off. I
have exim up and running, but I'm not sure it takes all cases into account;
it appears to though. I'm still testing before go live tomorrow...

Here's what I did...
Created the following lists:

domainlist local_domains = @
domainlist relay_to_domains = oldname.com:ncrypt.oldname.com
hostlist relay_from_hosts = 127.0.0.1:nc1:nc2
domainlist my_domains = oldname.com:newname.com

Then I created a router that would deliver mail to my domain/subdomain based
on what the domain part was:

smarthost:
  driver = manualroute
  transport = remote_smtp
  route_list = ncrypt.oldname.com nc1:nc2 byname; \
               oldname.com exchange byname; \
               newname.com exchange byname


Notes:
- This router comes before the default 'dnslookup' router.
- I put the ncrypt.oldname.com first, so it would match that domain first,
just in case the oldname.com domain matched all mail, including anything
sent to ncyrpt.oldname.com. Should I be concerned about that?
- That 'newname.com' line is added because we have a new company name and an
appropriately named domain, and we prefer all email to go to that domain
(the oldname.com domain is getting phased out - long story). So I put
some aliases in /etc/aliases that point to the newname.com domain. Including
them here prevents local mail from getting routed thru the other MX'er for
the new domain. Mail to both the new and old domains end up on the same
Exchange server.


Anyway, since the hosts in the route_list are internal and not in DNS, I had
to put them in the /etc/hosts file and make sure that the /etc/nsswitch.conf
did DNS lookups for hosts in "files" first, then "dns".  Here's the
/etc/hosts file:
#
# Internet host table
#
127.0.0.1       localhost
192.168.3.1     defaultrouter
192.168.3.117    exim   exim.oldname.com loghost
192.168.3.120    exchange   exchange.oldname.com
192.168.3.121    nc1 nc1.oldname.com
192.168.3.122    nc2 nc2.oldname.com


So, my basic problems were my misunderstanding what a local_domain was and
my ignorance of the manualroute driver. Learning about both these items
helped significantly. Duh! ;)

BTW, sorry about my mangled graphic. Won't try that again! :(
Thanks!
-Bill