On Wed, 27 Aug 1997, Richard Welty wrote:
> if i have read the manual correctly, then
>
> sender_reject = ^\d{8}@*
>
> should reject any incoming address with an 8 digit local part,
> regardless of domain. right or wrong?
Wrong, I'm afraid. This *is* a bit confusing. If you use a regular
expression, then the whole address is matched against the regular
expression, so you what you need is either
^\d{8}@ "begins with 8 digits followed by @"
or, if you want to be complete
^\d{8}@.*$ "begins with 8 digits followed by @ followed by
any number of chars before the end"
but of course that will take more time to match.
On Wed, 27 Aug 1997, John Henders wrote:
> Note: this is how it works on 1.651, I haven't upgraded yet. I assume
> nothing major has changed about it in 1.70 though.
No changes in that area.
> First, for the new syntax to work you need to be using something like
>
> sender_reject_recipients = @@partial0-lsearch;/etc/exim/rejects
> sender_host_reject = @@partial0-lsearch;/etc/exim/rejects
>
> I think. I didn't get the impression that that regex works on the older
> methods, but I could be wrong.
I think you are confusing the new @@ feature with the good ol' regular
expression feature which has always been in Exim from the early
releases. All that has happened in this release is that I've added a few
Perl-ish features to the regexp functions. [*]
> Anyway, using the above search method, you can now have a file with
> entries that look like the following. I put the 8 character item first
> because it's very common nowadays, and that probably means that the >*
> in the uu.net entry is redundant (Philip?).
No, not redundant. Remember, lsearch isn't a "first match" search. It is
a linear representation of a keyed lookup.
Philip
[*] This is as good a cue as any to announce: I found I couldn't easily
add more Perl 5 functions to the Henry Spencer regexps, so over the last
6 weeks or so I have been implementing a new, Perl-compatible regexp
library in spare moments at home. [I did look round the Net for
alternatives, and I did look at the source of Perl, but the regexp code
was very entwined with the rest of it.] Now that 1.70 is out the door, I
have brought the code in to work and am busily finishing it off (while I
wait for the 1.70 bug reports :-). It will be released as a standalone
library when complete, and subsequently incorporated into Exim.
--
Philip Hazel University Computing Service,
ph10@??? New Museums Site, Cambridge CB2 3QG,
P.Hazel@??? England. Phone: +44 1223 334714