Re: [Exim] exim setup as smarthost, sort-of question

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Andreas Metzler
Data:  
Para: exim-users
Assunto: Re: [Exim] exim setup as smarthost, sort-of question
On Thu, Jul 17, 2003 at 11:34:56AM -0700, Paingod X wrote:
> I wish to have this server forward mail for several domains from the
> internet to an internal exchange server. The only check that needs to
> occur here is whether the mail is addressed to someone in one of
> those domains. If it is, it should be passed directly to the exchange
> server. If it is not, it should be discarded.

[1]
> For mail coming from inside it should deliver it directly to the
> internet site it is addressed to using standard MX forwarding. That
> is to say, mail coming from the exchange server inside should be
> forwarded directly to its recipients MX server, but only mail coming
> from the exchange server (or on the inside interface) should be
> forwarded this way.


> The server has two interfaces, call them 66.66.66.66 (the internet
> side) and 11.22.33.44 (the inside). The exchange server would be
> 11.22.33.45. We are accepting mail for example.com, example1.com,
> example2.com, and example3.com. There could be other domains we
> accept in the future.
>
> My question is this: Is there an existing example config similar to
> this? Is there simple documentation on how to accomplish this? The
> config files for 4.20 are spread out over serveral directories
> under /etc/exim4/conf.d/* and I am new to exim. I have done sendmail
> configs before, but wish to move to exim.

[...]

Start with this:

echo your_primary_hostname > /etc/mailname

# /etc/exim4/update-exim4.conf.conf
dc_eximconfig_configtype='internet'
dc_local_interfaces=''
dc_other_hostnames='example.com,example1.com,example2.com,example3.com'
dc_readhost=''
dc_relay_domains=''
dc_relay_nets='11.22.33.45'
dc_smarthost=''
dc_minimaldns='false'
CFILEMODE='644'

As you are going to have a non-vanilla config I suggest invoking
update-exim4.conf --keepcomments -o /tmp/exim4.conf, modify this file
and put it to /etc/exim4/exim4.conf. Strip out all the unneeded parts,
especially anything inside .ifdef DCconfig_local or .ifdef
DCconfig_smarthost DCconfig_satellite, then you'll need a router to
pass on the messages to the exchange-server after the
dnslookup-router.

exchange:
driver = manualroute
domains = +local_domains
transport = remote_smtp
route_list = * address.of.exchange.server
host_find_failed = defer
same_domain_copy_routing = yes
local_parts = CONFDIR/$domain.localparts
no_more

Set up file containing valid localparts for each domain,
i.e /etc/exim4/example.com.localparts (you can use lookup instead,
too)

Delete the rest of the routers-section, as you are not interested in
local-delivery.

This should basically do the trick, including [1], as we have this ACL:
  accept domains = +local_domains
         endpass
         message = unknown user
         verify = recipient


Missing stuff:
Handle mail for @your_primary_hostname, especially postmaster.
           cu andreas