Re: [exim] Exim 5

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Jan Srzednicki
Datum:  
To: exim-users
Neue Treads: [exim] Exim 5 Wishlist
Betreff: Re: [exim] Exim 5
On Wed, Feb 07, 2007 at 03:08:04PM +0000, Philip Hazel wrote:
> On Wed, 7 Feb 2007, Magnus Holmgren wrote:
>
> > Are there any plans for Exim 5, other than that Philip intends to retire from
> > his job first?

[..]
> As for Exim 5, I'm sure that there is a lot that could be done if there
> were enough keen people to run such a project. I have a list of ideas
> that have accumulated from time to time (not updated since October
> 2004). One obvious change is to require PCRE to be installed (it is on
> many systems anyway) instead of using an internal copy.


So, as there's no document on Exim 5 on wiki yet (or at least I can't
find it), I'll send my suggestion for Exim 5:

Can we make macros more function-like, so that they can accept arguments
(in a similar manner that C allows macros with arguments)? That would
make the config files a lot cleaner in some sophisticated lookup and
condition scenarios. Today, to make a argumented macro, I must make two
macros, eg.:

MACRO_START = ${some lookup or something: /base/path/to/
MACRO_END = .db}

And the macro usage looks like:

MACRO_STARTdirectory/filenameMACRO_END

That's both hard to read and unconvenient to use (what if I want the
filename to appear twice in the macro?).

I'd suggest something like:

MACRO(x,y) = ${some lookup: /base/path/to/%x%/%y%.db}

With usage scenario:

MACRO(directory,filename)

That makes variables inside '%' (just a suggestion, sure they need to be
escape'able) behave in a special manner. It can easily be assumed that
macro definitions and usage could not contain spaces inside these
parentheses, to make parsing easier and less human error prone.

And another thought: to avoid confusion, macro definitions can be made
more explicit. Again, taking C as an example, I'd go for:

.define MACRO something

(as Exim already is using ".if" etc. as preprocessing keywords)

What do you think?

greetings,
--
Jan Srzednicki
w@???