On Fri, 1 Nov 1996 m.hampson@??? wrote:
> I'd like the following....
>
> # reject from anyone at interramp.com, kkk@??? and whatever's
> # in the files /badboys
> sender_reject = interramp.com:kkk@???:lsearch;/badboys
>
> In file /badboys
>
> superspam.com # reject from everyone at superspam.com
> *@superspam.com # same as above (different syntax)
> mymum@??? # don't want mail from the parents
> root@* # no mail from root anywhere (I could live without this one)
Cannot do that. It has to know at the *outer level* whether it is
looking up a complete address or just the domain part. What you have in
the file there is the sort of thing you can have in the string, with
different kinds of matching for each entry. A file has to have the same
kind of entry for all entries. To do what you want requires it to know
the contents of the database in order to know what to look up in it...
Remember that this applies to dbm databases as well as to lsearch.
However, I am taking this as a "yes" vote from you, because what you
actually want to do will be do-able, but with two files rather than one:
sender_reject = "interramp.com:kkk@???:\
root@*:\
lsearch;/badboys:\
*@lsearch;/baddomains"
where /badboys contains lines of the form
mymum@???
i.e. explicit complete addresses, and /baddomains contains lines of the
form
superspam.com
i.e. just domains. The partial- stuff could be used in that file.
Note that "root@*" has to be part of the original list.
Hmm. Just had a thought. I suppose, for a list entry of the form
"lsearch;/badboys" Exim could first look up the complete address and if
that fails, then try looking up just the domain. This would allow you to
mix complete addresses and bare domains in a single file, at a cost of
two lookups per message. What do people think about that? It would, in
fact, preserve some upwards compatibility with the existing state of
affairs, and I think I quite like the idea. It sounds as if it would be
cheaper than using two files as I have suggested above.
Anybody care to react to that?
--
Philip Hazel University Computing Service,
ph10@??? New Museums Site, Cambridge CB2 3QG,
P.Hazel@??? England. Phone: +44 1223 334714