On Tue, Jul 31, 2001 at 11:59:11AM +0100, Philip Hazel wrote:
> On Tue, 31 Jul 2001, Paul Makepeace wrote:
>
> > Is it possible to do a lookup on something besides $local_part in a DBM
> > file? E.g., using $domain in the user = cdb;/.. directive? The nisplus
> > example isn't quite enough (for me) to extrapolate something simpler.
>
> user = ${lookup{$domain}cdb{/some/file}{found-string}{not-found-string}}
Thanks, that's exactly what I was after. I had partially read Chapter 6
without going on to Chapter 9. There is indeed a reference (which I
overlooked) so if a tweak is ever made to Chapter 6 putting in an
example from Chapter 9 like the above would be great.
I ended up with (in a maildir transport),
directory = ${lookup{$domain}cdb{VMAIL_DATA/popbox_path/popbox_path.cdb}}/${lookup{$local_part}cdb{VMAIL_DATA/popbox/$domain.cdb}}
(better, neater, shorter way of doing this?)
So, I then tripped up in the directors section, naively attempting,
driver = aliasfile
file = ${lookup{_default_}cdb{VMAIL_DATA/forwarder/${domain}.cdb}{$value}fail}
..but found..
driver = smartuser
new_address = ${lookup{_default_}cdb{VMAIL_DATA/forwarder/${domain}.cdb}{$value}fail}
..worked.
What's the rationale behind it working for user = but not file = ? I
might be missing some basic thing here.
> (3) It gets somewhat confusing when (1) and (2) are combined, as in the
> "domains" and "local_parts" options on routers/directors. FIRST the
> string is treated as in (2); THEN it is treated as in (1). Aarrgghh!!
> What is this monster I have created?
Careful, that might end up in someone's .sigs file :-)
> > http://www.exim.org/exim-html-3.20/doc/html/spec_6.html#SEC142 scares
>
> BTW, please give a chapter or section number when posting references to
> the manual. It saves me having to use a browser to find out which bit
> you are actually referring to. Thanks.
OK, will do. I figured spec_6 meant Chapter 6. Yes, I was referring to
all of it scaring me :-)
Paul
--
Get your neck massaged