> [Jochen Knuth]
>
> > I use it to "split across multiple backend servers on a per user
basis",
> > that means i have a file popmap with lines that look like these:
> >
> > user1:pophost1:popport1
> > user2:pophost2:popport2
>
> [...]
>
> > Is there a way to lookup in this popmap file for the host and port
> > information?
>
> See the "Expansion Items" section of the spec, specifically the stuff
> about
>
> "${lookup{<key>} <search type> {<file>} {<string1>} {<string2>}}"
> and
> "${extract{<number>} {<separators>} {<string>}}"
> --
> Harald
>
thank you for the hint.
After some experiments i have following director for one of the
combinations of pophost:popport (localhost:305):
cyrus:
driver = localuser
transport = local_delivery_cyrus
condition = ${if eq{${extract{2}{:}{${lookup {$local_part} lsearch
{/usr/local/etc/popmap} {$value}}}}}{305}{yes}}
But how can i compare pophost _and_ popport? i tried several conditions
but failed to find a working one.
From reading the fine manual i thought the follwing condition should work:
condition = ${if and{if eq{${extract{1}{:}{${lookup {$local_part} lsearch
{/usr/local/etc/popmap} {$value}}}}}{localhost}{yes}}{if eq{${extract{2}
{:} {${lookup {$local_part} lsearch {/usr/local/etc/popmap} $value}}}}}
{305}{yes}}{yes}}
This is the condition from above combined with a lookup for the pophost.
But this gives the following error in a exim -d9 test:
LOG: 0 MAIN PANIC
failed to expand condition"${if and{if eq{${extract{1}{:}{${lookup
{$local_part} lsearch {/usr/local/etc/popmap} {$value}}}}}{localhost}{yes}}{if
eq{${extract{2}{:}{${lookup {$local_part} lsearch {/usr/local/etc/popmap}
{$value}}}}}{305}{yes}}{yes}}" for cyrus director: missing or misplaced { or }
Anyone with a clue which { or } is misplaced?
Thank you,
Jochen
--
Sent through Global Message Exchange -
http://www.gmx.net