[exim] Send direct, but use ISP relay if any error occurs

Página Inicial
Delete this message
Reply to this message
Autor: Andrew McGill
Data:  
Para: exim-users
Assunto: [exim] Send direct, but use ISP relay if any error occurs
Hi there

With apologies to the purists and the RFCs ...

We are sending mail for a LAN from a dynamic IP address. Some
DNS blacklists list our IP address as evil, so some people will
not accept mail directly from us (because our neighbours and ISP
are irresponsible).

Our ISP will relay mail for us, but occasionally they have long
queues (4 hours), and strange errors, which we want to avoid
wherever possibe. It is also impossible to trace the state /
fate of mail submitted to the ISP relay. Ocasionally the ISP
changes the rules on their server causing support calls (no
bounces, max_recipients, no yahoo+other, blah). There is no
other ISP, and no convenient point to set up a non-fussy relay.

We want to deliver outgoing mail with the following strategy:

1. Attempt to deliver mail directly to destination.

 2. If (1) fails for *any* reason (452 DNS blacklisted, 550 DNS 
    blacklist, DNS failure, or TCP timeout) then treat this as a 
    temporary failure and retry immediately using the ISP mail 
    spooler.


One way of implementing this is to have a transparent proxy for
outgoing TCP/25 connections that transforms every 55x to 45x in
reply codes, and then diverts future connections to the same IP
via the ISP server. That's rather messy and platform dependant.

I'm hoping for something like fallback_hosts, together with a
soft-fail option (which doesn't seem to exist) to convert "550
blocked by acmeRBL" to "450 blocked by acmeRBL" .. or maybe ..

lookuphost:
driver = lookuphost
transport = careful_smtp
# We'd prefer to do it this way ...

smarthost:
driver = domainlist
transport = remote_smtp
route_list = "* smtp.sentechsa.com bydns_a"
# Yuck. Only if I have to!

...

careful_smtp:
driver = smtp
response_pattern = ^2
# Only accept happy responses? Well, that's for the iplookup
# driver ... I don't think that'll work ...

&:-)


ps. You can do this with bleeding edge postfix .. well, mostly.

--
DiSCOvery fiaSCO underSCOres miSCOnceived diSCOntent
(groklaw.net)