Re: Smtpbatch and aliases...

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Daniel Ryde
CC: Exim Users
Nouveaux-sujets: [EXIM] Control of relaying on end system
Sujet: Re: Smtpbatch and aliases...
On Fri, 31 Oct 1997, Daniel Ryde wrote:

> Well, yes... Multiplicate the amount of addersses whith 10 and the
> amount of domains whith 500 and the amount of wierd transport ways whith 7
> and you would get the raw picture that I have on *one* machine here. Using
> your scheme here will result in what I call configuration chaos.


Having had a weekend to think, I have two answers to that one:

(1) Keep all your information in one file, in any format you like, or,
maybe better, in one database. Write programs or scripts to extract the
information into the files that Exim needs. (We operate this way for the
"@@"-style blocking lists. We keep a list of addresses to block, with
comments and dates and reasons, etc., and then munge it into the require
form of

domain1: localpart1, localpart2, ....
domain2: localpart3, ...

for Exim to use). This has the advantage that you can tailor your master
data files to be in exactly the most convenient format for you to work
with.

(2) It also occurred to me that a dynamic transport selection facility
could be helpful here (and also for other problems that I see on the
mailing list this morning). What I mean by this is that the transport
option could be given an expanded string, to obtain a transport name
dynamically, e.g.

  virtual_domain:
    domains = dbm;/etc/mail/domains,
    driver = smartuser,
    transport = ${lookup{some key}dbm{/some/file......   


Of course, this is more dangerous than the current scheme, where you get
a configuration error for a non-existent transport. But Power always
comes with Responsibility... :-)

You could then use the same file for your aliases and defaults, by a
scheme such as

  virtual_aliases:
    domains = dbm;/etc/mail/domains,
    driver = aliasfile;
    file = /aliases/$domain,
    search_type = dbm


  virtual_default:
    domains = dbm;/etc/mail/domains,
    driver = smartuser,
    transport = ${lookup{default_transport}dbm{/aliases/$domain}{$value}}


and the aliases file could be

foo1: address1
foo2: address2
default_transport: smtpbatch1

For extra safety, you should probably choose a key for the default
transport that doesn't look like a normal local part.

> It's too limited tooday. Ok, a new driver then, call it directorfile:


I think what you have suggested is similar in principle to what I came
up with...

> Would all this make it easier for you :-)


I will continue to do what I feel works best. I really don't like the
idea of using aliasing, which means "treat address A as if it were
address B" as a means of routing address A to a particular transport *as
address A*.

Regards,
Philip

-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



--
* 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/