Re: [EXIM] mx_only

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Jon Morby
Date:  
À: Philip Hazel
CC: exim-users
Sujet: Re: [EXIM] mx_only
> On Wed, 21 Jan 1998, Jon Morby wrote:
>
> > According to the manual,
> >
> >  .   bydns_mx: look up MX records for the host(s) in the DNS; fail if 
> > there  |
> >      are none.   

> >
> > Which I took to be that if no MX record exists, bounce the message.
>
> The manual is correct, except that it doesn't say what it means by
> "fail".


:)

>
> This is some unstated background philosophy. My design of the domainlist
> router was under the belief that it would be used for special cases when
> managers knew exactly where to send mail for specific domains. "If it's
> for domain X, send it to host Y." Consequently, if it can't find host Y
> it gets panicky.
>
> You, OTOH, want something that says "If it's for domain X, try host Y,
> but if you can't find it, give up". Is that right? It doesn't quite seem
> to fit with your statement
>
> We have a smarthost which should only relay for a certain set of
> domains, or IP addresses. If mail comes in for a certain domain which
> matches in mx_hosts then it should be forwarded to one of the hosts
> which know about that 'internal' domain, hence the bydns_mx.


Ok, I have a configuration file mx_hosts which has a multitude of
entries in it, and depending on how it's referenced depends on what it
does.

For example it would look something like this

*.demon.co.uk $domain bydns_mx
*.demon.net internal.mail.demon.net bydns_a
*.cityscape.co.uk $domain bydns_mx
*.fido.net mailgate.fido.net bydns
*.fidouk.org guido.demon.co.uk bydns

In configure I have ...
relay_domains            = partial-dbm;/usr/exim/cf/db/mx_hosts
sender_host_accept_relay = partial-dbm;/usr/exim/cf/db/mx_hosts


and lower down I have ...

# Routers Configuration
#
mx_hosts:
  driver      = domainlist,
  transport   = remote_smtp;
  route_file  = /usr/exim/cf/db/mx_hosts,
  search_type = partial-dbm;


That way, if the domain exists in mx_hosts they're a customer, and
allowed to use the relay.

In addition, the host/domain specific routing information (not
necessarily advertised in the DNS by the customer for
policy/security/whatever reasons) then causes the mail to be forwarded
to the relevant place.

Now I know where I want to send the mail for the customer domain/host
assuming it exists, but in this case the customer has left and although
we no longer advertise the DNS for his hostname, his website has yet to
expire/be removed.

What I'm really after is an option that says, if I can't deliver by mx
then bounce rather than freeze (which is what's happening currently).

>
> because that sounds as though once you have matched the domain, there
> should be a host available. I think I'm missing something here.
>
> > demon.co.uk has (today) c. 220,000 entries, and as such it's not viable
> > to include as a table, and besides which we're using the DNS as the
> > authorative record.
>
> Hmm. Is it that you want to say "if this domain has an MX record" then
> handle it with this router? The next release of Exim has an experimental
> DNS lookup method, though at the moment it only looks up TXT records.
> Maybe something could be done with that. [I wonder also if the
> mx_domains option of lookuphost could help.]


Possibly, but I fear that may be too complicated .... I simply need to
say that if the destination doesn't have an MX record, and doesn't have
an A record (which indeed it doesn't in this case) then bounce the
message.

Now I don't want things in the demon.co.uk domain to cause delivery
attempts from this host for each individual A record, hence I was using
bydns_mx.

I'm not sure if I'm explaining this properly however :(


>
> Got to go to a lunch appointment. Back later.
>


Enjoy ....

> Philip
>
> -- 
> Philip Hazel                   University Computing Service,
> ph10@???             New Museums Site, Cambridge CB2 3QG,
> P.Hazel@???          England.  Phone: +44 1223 334714

>
>

-- 
Jon Morby                                             DDI: 0181 371 1286
Project Manager,                                      Fax: 0181 371 1167
Demon Internet Ltd.                    The Internet for a tenner a month




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