Szerző: William Thompson Dátum: Címzett: Philip Hazel CC: Marc Perkel, exim-users Tárgy: Re: [Exim] The absolute ULTIMATE spam tool feature I need
> > if "$h_received:" matches "${readfile{/etc/exim/blockhosts}{|}}" >
> Haven't I emailed you before about this? I seem to remember discussing
> it with somebody. With some clever use of $sg{ you can get rid of blank
> lines and a trailing newline if you want to.
Nope, the $sg was me.
> > So - again - what I need is a readfile that is just a little smarter
> > that the one we have now. A readfile that ignores blank lines, comment
> > lines, and no newline on the last entry. That would do it for me.
>
> There are (as always) several ways you can do this. Apart from using
> $sg{ you could always preprocess the file yourself from a text file that
> you edit into a one-line file that Exim reads. If you used a script to
> update, you can always ensure that you rebuild after editing, rather
> like using a cdb file for aliases. That would be much more efficient
> than using ${sg.
>
> However, using a huge regular expression like this will never be
> particularly efficient. I would definitely advise studying Jeff Friedl's
> book so that you write your regexes to be as efficient as possible.