[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

exim routers, local delivery of remote address



Hi,

I was playing with my exim configuration last night, and I did manage to
get it to do what I want it to do, but I'm not sure it's the best way
(it doesn't feel like it's the Right Way).

Here's what I'm trying to do:

this config is running on my desktop machine, called gobo. My mailserver
runs at doorstop.net . I tell gobo to allow me to specify that my from
address is @doorstop.net or @virtual.doorstop.net, depending on the
occasion, but don't like to leave it @gobo because gobo's not always on.

The problem I encountered was that when mail was (for whatever reason)
rejected by my smtp relay, my mail would bounce. For the purposes of
satisfying my own reluctance to give in to the trawlers, let's say my
user account is "spamtrap" both on gobo and at doorstop.net . So the
initial message was going out from spamtrap@doorstop.net . I get a 553
error from my smtp relay, and a bounce is generated and attempted to be
sent to spamtrap@doorstop.net . This requires sending it to the smtp
relay again. Another 553 error. The message is frozen in exim's queue.
Worse still, though I had freeze_tell_mailmaster set, this was happening
silently, and I was unaware of it for a few days when I had dozens of
frozen emails sitting in my queue. Unhappy me. (Side question: if anyone
can see from what I've said so far why freeze_tell_mailmaster wasn't
emailing postmaster on a bounce, please let me know. Mail for postmaster
is delivered correctly, and I haven't changed the default value of
errors_address).

So to work around the problem, I've told exim to deliver for
spamtrap@doorstop.net locally on gobo (while still delivering mail to
anyonelse@doorstop.net at the real doorstop.net). Finally (trumpets
blare) I get to the heart of the question. Here's how I did it:

localdoorstopnet:
  local_parts = spamtrap
  domains = doorstop.net
  driver = domainlist
  route_list = "doorstop.net localhost byname"
  self = local

(that's in my routers section, just before the smarthost relay router.)

I searched for a long time to find a router that would simply perform a
local delivery to $local_part, in particular I was intrigued by this
line in the exim specification (section 3.4, drivers):

  A router is a driver that operates on an apparently remote address,
  that is an address whose domain does not match anything in the list
  given in local_domains. When a router succeeds it can route an address
  either to a local or to a remote transport, or it can change the
  domain, and pass the address on to subsequent routers.

, thinking that there should be a more direct way to, as put above,
"pass it to a local transport."

Like I said, though, my setup as above is working correctly; I'm just
looking for a smoother, mor elegant approach, if anyone can conjure one
up.

good times,
Vineet

-- 
Currently seeking opportunities in the SF Bay Area
Please see http://www.doorstop.net/resume/
-- 
"I disapprove of what you say, but I will defend to the death your right
to say it." --Beatrice Hall, The Friends of Voltaire, 1906

Attachment: pgph70fu5J4IP.pgp
Description: PGP signature


Reply to: