Re: [EXIM] Problem getting Exim to send messages for unknown…

Etusivu
Poista viesti
Vastaa
Lähettäjä: Ben Smithurst
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [EXIM] Problem getting Exim to send messages for unknown local users to a central server
Rusty Sand wrote:

> I'm trying to get Exim to send all mail to unknown $local_part to an
> internal mail server using driver=smtp, but unknowns just sit in the
> queue. I set this up as per FAQ question Q0403. The spec says
> the address is looked up in the DNS. Does this imply that it only
> checks with the DNS server & doesn't check /etc/hosts ? I don't
> run DNS here, I have all my internal machines listed in /etc/hosts .
> Is this more than likely my problem?


Maybe, you have to set gethostbyname = true in the smtp transport? That
will make it use /etc/hosts as well, I think, though I assume `hosts'
would have to be before `bind' in /etc/resolv.conf to avoid checking
DNS first. (but then I'm hardly an expert on what gethostbyname() does,
so I may well be talking rubbish.)

Although it seems that gethostbyname will never be used for MX records, so
you may have to create a domainlist router before the lookuphost one, and
then gethostbyname can be used to find the address of the remote machine.

central_host:
driver = domainlist
route_list = "remotemachine remotemachine byname"

Which would direct all mail for remotemachine to remotemachine but
avoiding any MX lookup. Assuming remotemachine is listed in /etc/hosts,
and gethostbyname is set on the smtp transport, this should work.

The final alternative is to use an IP literal on the smartuser (see
below):

new_address = "someone@???"

This way, you won't need any host name lookup of any sort.

> What I really want to do is have all unknowns sent to a single
> mailbox on the mail machine, but I figured this was a start. That if I
> figured it out, I could modify it to eventually get what I want.


Surely all you need is a smartuser director?

unknown_mail:
driver = smartuser
new_address = "someone@remotemachine"

I think that's all you need on the director, I may well have missed
something though.

--
Ben Smithurst : ben@??? : http://www.scientia.demon.co.uk/

PGP: 0x99392F7D - 3D 89 87 42 CE CA 93 4C  68 32 0E D5 36 05 3D 16
     http://www.scientia.demon.co.uk/ben/pgp-key.html (or use keyservers)


--
*** Exim information can be found at http://www.exim.org/ ***