Re: [EXIM] Exim configuration

Pàgina inicial
Delete this message
Reply to this message
Autor: Toralf Lund
Data:  
A: Philip Hazel
CC: Toralf Lund, exim-users
Assumpte: Re: [EXIM] Exim configuration
Philip Hazel wrote:

> On Thu, 18 Mar 1999, Toralf Lund wrote:
>
> > Too bad. Can I store the regular expression in a variable and use it to generate
> > a colon separated list _AND_ the LHS of a rewrite rule? (I'll have another look
> > in the manual here...)
>
> I've lost the thread here. Let me check - you have some list of domains
> (local domains, say) which you want also use for rewriting? And this has
> to be an explicit list because it can't easily be written as *.x.y or
> something? Suppose your domains were
>
> cat.ex dog.ex rabbit.ex
>
> and you wanted to treat them all as local domains, and rewrite them. Is
> that right?
>


Yes and no. Originally, I just wanted to strip off the host name part of any address
on the local domain, whiteout having to duplicate the list of valid aliases for the
domain. (As I said, in my experience, redundancies equals inconsistencies.) Then I
found that it it might be a good idea to also replace parts of the actual domain
name, as some of the aliases are pretty much obsolete. I may want to do this only in
"From:" and related fields, though.

>
> First comment: If you are rewriting these domains, then you don't need
> to specify them as local domains or whatever, because they will get
> removed by the rewriting process, and so will never been seen during any
> delivery process. You can certainly use a rewriting rule of the form
>
> ^[^@]+@(cat|dog|rabbit)\.ex    $local_part@???

>


Hmm... I suppose this means that I get away with listing the aliases only in the
rewrite rule if I decide to alter the "To:" field as well.

>
> for example, to change any of those domains into "zoo.ex". Then you
> would need to have
>
> local_domains = zoo.ex
>
> if you wanted to handle it as a local domain. There is no need to
> mention the originals in there.
>
> However, perhaps you want to use that domain list for something else. It
> is possible to use the same regex in several places. I have just
> realized that the manual is missing a piece of information. It is
> permitted to have rewriting rules of the form
>
> *@^regex ....
>
> Therefore, you could do something like this. Define a macro
>
> DOMREGEX = ^(cat|dog|rabbit)\.ex$
>
> and use it in some domain list like this
>
> some_option = DOMREGEX
>
> as well as in a rewriting rule like this
>
> *@DOMREGEX $local_part@???


This looks more like what I need, but it doesn't quite work. The domain list appears
to come out right, but no rewrite takes place. This is not very surprising, as

*@^(cat|dog|rabbit)\.ex$ $local_part@???

has no effect, either. It looks like the regular expression can't start in the middle
of the left-hand-side string. I can probably re-write the macro somehow to get this
to work, though.

>
>
> > Anyhow, we are using NIS (or is it NIS+ these days?), and I would probably use
> > ypmake to generate the appropriate files here. Also, a PERL script can easily be
> > designed so that it doesn't have to be changed if NIS is enabled or disabled. I
> > still don't like this idea, though.
>
> The use of data caches is a well-known and widespread technique for
> improving performance. Think of your generated file as a data cache.
> Another advantage of it is that it will be a local file on your MTA
> host, saving network traffic every time it is referenced.


I suppose you have a point, there... Enough on this issue, anyhow.

> > It's not an absolute requirement, but it would be neat if we could change the MX
> > list without having to re-configure Exim, or even set up hosts listed as low
> > priority MXs so that they try to route mails to the higher priority ones, but
> > deliver them locally if these are down. How hard would this be?
>
> Exim does all its routing before it attempts any deliveries. Therefore
> re-routing on the basis of delivery failure (other than forwarding to
> backup hosts) isn't a feature.


That's too bad... Of course, I haven't been able to do this with sendmail either.

> > Maybe the default configuration file should contain the above settings, with
> > appropriate comments?
>
> You are the first person who has raised this issue. I will consider
> putting something in the default configuration.


Maybe Netscape Messenger is the only mailer that sends its messages this way. I don't
know if a lot of people use it these days...

--
- T. Lund




--
*** Exim information can be found at http://www.exim.org/ ***