On 8 Jan 2006, at 01:52, Jeff Lasman wrote:

On Saturday 07 January 2006 04:17 pm, Giuliano Gavazzi wrote:
perhaps it's because it is too late, but I miss your point. The first
router is usually:

dnslookup:
[...]
and this does exactly what, in my current understanding, you say.

As far as I understand it, this router uses remote_smtp only for domains that are not listed as local_domains. The problem is that someone logs
in to our configuration system and sets up a domain.  They use their
email address at that domain as their contact address.


ah, but this is a consistency nightmare! You should not allow them to use a domain identical to the domain they set up with you, or, if that domain already exists you should not add that domain to your local domains until you have set up the dns for it (with MX pointing to you).

They never get our welcome email and we lose a customer, often having to
refund a CC payment or accept a chargeback.

If I comment out (or remove) the line beginning "domains" then it'll use
remote_smtp for all email addresses, but cause too many mail-loop
considerations.

bad idea indeed, but it can be improved..

I don't think what we'd like is possible, but we can achieve similar
effect by sending out welcome emails using a different server, which
would get the old MX address from public DNS.

well, by definition the MX obtained from the DNS is not old... however can be stale if the queried server has got it cached.

You can achieve something similar to what you say this way:

have two lists:

local_domains = your permanent local domains
customers_domains = your customers added domains

then in the dnslookup router instead of

domains = !+local_domains

something like (in pseudo exim acl code, because it's too late):

condition = {$domain not in local_domains} OR !{ MX($domain) = this_host }

and the local delivery router uses

domains = local_domains : customers_domains

You must not add the DNS for the new customer domain until after you have sent the welcome message and the domain has been transferred.

I am not sure what !{ MX($domain) = this_host } evaluates to if there is no MX record (it can happen of course). There might be an option in the dnslookup to make it true. Otherwise just add the A lookup too.

Giuliano

--
## List details at http://www.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to