Re: [Exim] domainlist question - second attempt

Etusivu
Poista viesti
Vastaa
Lähettäjä: Stephen Gran
Päiväys:  
Vastaanottaja: Exim-Users (E-mail)
Aihe: Re: [Exim] domainlist question - second attempt
On Sun, Mar 21, 2004 at 07:15:40AM -0800, Marc Perkel said:
> OK - asking again still looking for the correct answer that actually
> works and trying to be more clear. What I need to do is something like
> this. The ordinary way to do domain lists is:
>
> domainlist preprocess_domains = lsearch;/etc/exim/preprocess
>
> where /etc/exim/preprocess contains:
>
> domain1.com
> domain2.com
> domain3.com
>
> ----- BUT ------
>
> I need a domain list where the file /etc/exim/preprocess looks like:
>
> domain1.com: contains
> domain2.com: other
> domain3.com: data
>
> The domain list needs to behave with the second list exactly the way it
> would
> behave with the top example. So - the question is:
>
> domainlist preprocess_domains = ???????


domainlist preprocess_domains = lsearch;/etc/exim/preprocess

Then when you go to preprocess their mails, do this:

condition = ${if eq{${lookup{$domain}lsearch{/etc/exim/preprocess}}{yes}{yes}{no}}}

or so, to extract the data you're looking for, if it's a simple yes/no.

Not tested, so use with some caution - especially check where my braces
are :)

If you're looking for more complicated things, you might want to use acl
variables.

HTH,
--
--------------------------------------------------------------------------
|  Stephen Gran                  | Coincidences are spiritual puns.   --   |
|  steve@???             | G.K. Chesterton                         |
|  http://www.lobefin.net/~steve |                                         |

--------------------------------------------------------------------------