local mail delivery priority

Hello,

This is a tricky issue. The solution I'd most likely do would be to not add the domain to the /etc/virtual/domains file until after the message is sent (not too hard).

The problem is that many hosts use 127.0.0.1 in their /etc/resolv.conf, so this would end up generating some problems. If we convince exim that the domain is external, ok great, but then exim does a lookup and it would resolve back to the same machine, again regardless of the settings in the exim or not (unless there is a way to tell exim to use an external dns lookup). One thing to note, is that named is added to the task.queue file.. so the domain might still resolve assuming the email is sent within the 1 minute period before named is reloaded.. gambling a bit if you ask me ;)


So, if you'd like me to do add the /etc/virtual/domains trick for a future release, let me know, it's not too much trouble (saves a 2nd exim.conf mess). But the dns MX problem will still be there.

John
 
ok so it uses /etc/virtual/domains to see if localdomain or not and so if the domain doesnt exist there on ending of email it will use a mx lookup?

sounds good to me I would like you to go ahead with the change please.
 
Chrysalis said:
ok so it uses /etc/virtual/domains to see if localdomain or not and so if the domain doesnt exist there on ending of email it will use a mx lookup?

sounds good to me I would like you to go ahead with the change please.
This is what I originally thought would work.

So I posted it as a possible fix to exim-users.

I got an email from Dr Hazel (the author of exim) that it wouldn't work because if the message is delayed on the queue exim will reroute the message every time it tries to resend it. Which means that unless the email is delivered successfully the first time it's going to use local_domains the second time.

John, what I like best is if you can call a special exim.conf file (which I can write) when you call exim to send and/or resend the welcome email. That config file would always use MX (for example, it could always use ns1.earthlink.net for it's lookup; that's what I use whenever I want to do a test from outside :) ).

Another possible fix would be to always send the welcome emails out through a smart-host. This might be configurable in one exim.conf file; I'd have to look at it.

We'd be happy to supply the smart-host or DA could, for folk who don't have a separate server they can use.

Are these possible solutions too complex?

Jeff
 
Jeff,
I could be wrong, but even with your solution, if the email didn't get delievered successfully the first time, wouldn't it be exim that tried resending it reverting back to the normal exim.conf?
 
ideally admin's shouldnt be using 127.0.0.1 in resolv.conf anyway it has other disadvantages.
 
jmstacey said:
Jeff,
I could be wrong, but even with your solution, if the email didn't get delievered successfully the first time, wouldn't it be exim that tried resending it reverting back to the normal exim.conf?
Yes.

[vent]DANG, DANG, DANG, DANG, DANG!!![/vent]

I suppose the smart-host idea is the only way to go.

John? Anyone else?

Jeff
 
For the sake of simplicity, and the fact that emails accounts work *most* of the time, the "add one line to a file after sending the email" sounds more attractive to me.. as... I'm the "guy" who gets to do it. Given that it's not 100% perfect, if the game is to give the email the most chance of making it to it's recipient, the "one line" solution would only increase those odds, as right now, it has no chance at all. This would leave the odds into the hands of if the email account is up or not. Worst case, it would do what it does now. Note that the creator duplicate email can easily be forwarded too (beside the point).

I'm not much of a fan of providing an email relay server to everyone ;)

John
 
I agree with your points John, but I'd still like a foolproof solution.

I'd say go for the "one line" solution, and for those of us who use a Billing/Provisioning solution, we can run that on a separate server with separate email.

Jeff
 
Back
Top