Re: director contingent on random address?

Top Page
Delete this message
Reply to this message
Author: Stuart Lynne
Date:  
To: exim-users
Subject: Re: director contingent on random address?
In article <E0xLshg-0005zc-00@???>,
Nigel Metheringham <Nigel.Metheringham@???> wrote:
>ph10@??? said:
>} I feel "feature-bloat" getting worse... :-)
>
>
>bill@??? said:
>} I have a situation where I want to use a director if the address is
>} any of a list (taken from a file, actually)
>
>
>Isn't a way round this to give people enough rope to hang themselves how
>they wish...
>
>ie allow a director/router to be selected based on the result of an
>arbitrary expression (we could then, ideally, drop all the special case
>ones since they could be written in terms of the arbitrary version).



I have been working around this for quite a while. At iSTAR we have
all user and domain information in a database that is accessible
via a daemon. Currently we have *no* local delivery at all, all
mail gets routed through something like:


#
# This router routes to remote hosts over SMTP using a DNS lookup with
# default options.

  lookuphost:
    driver = lookuphost,
    self = fail_soft,
    transport = smtp;


  #
  # This will take all mail mx'd to this machine and give it to vmail
  #
  vip:
      driver = lookuphost,
      self = send,
      transport = vmail;                               


So if mail is for somewhere else the first rule gets rid of it for
us. If it is for this host it gets given to the vmail transport. It
looks like:

  vmail:
    driver = pipe;
    command = "/opt/vip/sbin/vmail ${local_part}@${domain} <${sender_address}>",
    from_hack,
    user = vip,


The vmail program simply looks up the mail information for the user@domain
to be delivered to and does one of three things. Return the message if
the address does not exist, forward it to a another mail address (.forward
type capability) or append it to the appropriate mailbox (something like
/var/spool/vip/com/istar/u/user). The forwarding is done by simply piping
the message back to a new copy of exim.

It would be very nice if I could use the forward file director with a database
search. But I don't want the overhead or configuration problem with maintaining
a list of domains that are supposed to be equivalant to the local host (could
be hundreds). The self options in the routers are much nicer and tend to
fail-safe.

On the router side unfortunately there are limited options for doing
this type of lookup. Iplookup will translate one address to exactly
one new address. I havn't been able to make queryprogram give me
the results I want (simulate forward file).

I would really like to have the functionality of my little vmail program
in a router driver. Right now I have the additional overhead of calling
the external program for delivery, and it may exec to yet another exim
if the message is to be delivered remotely. If I could do a lookup, then
process with forwardfile functionality that could be eliminated.


-- 
Stuart Lynne <sl@???>      604-933-1000      <http://www.poste.com>
PGP Fingerprint: 28 E2 A0 15 99 62 9A 00  88 EC A3 EE 2D 1C 15 68


--
* This is sent by the exim-users mailing list.  To unsubscribe send a
    mail with subject "unsubscribe" to exim-users-request@???
* Exim information can be found at http://www.exim.org/