Mailing List Archive

Router: check for domain in list
Hi list!

I need to check, in a Exim-Router, if the sender domain is in a list
of domain.
I tried so:

condition = ${if eq{${lookup {$sender_address_domain}wildlsearch
{/etc/exim4/virtualdomains.txt}}}{}{yes}{no}}

but it does not really works...
The file /etc/exim4/virtualdomains.txt is just a list of domains, not
a key:value list, so such this:

/etc/exim4/virtualdomains.txt:
domain1.tld
domain2.tld
...

I really don't know which other lookup I can try to just check IF a
string in a file exists.
Can someone suggest me somewhat?

Thanks
Luca Bertoncello
(lucabert@lucabert.de)


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Router: check for domain in list [ In reply to ]
On 26/02/18 13:20, Luca Bertoncello via Exim-users wrote:

> I really don't know which other lookup I can try to just check IF a
> string in a file exists.
> Can someone suggest me somewhat?

http://exim.org/exim-html-current/doc/html/spec_html/ch-domain_host_address_and_local_part_lists.html#SECTfilnamlis

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Router: check for domain in list [ In reply to ]
Zitat von Jeremy Harris via Exim-users <exim-users@exim.org>:

> On 26/02/18 13:20, Luca Bertoncello via Exim-users wrote:
>
>> I really don't know which other lookup I can try to just check IF a
>> string in a file exists.
>> Can someone suggest me somewhat?
>
> http://exim.org/exim-html-current/doc/html/spec_html/ch-domain_host_address_and_local_part_lists.html#SECTfilnamlis

Jeremy,

I really can't understand what you mean...
I need to just check if a FILE contains a STRING.
In the link you sent I cannot find any useful information how to do
that, or I'm too idiot to understand it...

Please explain me what you mean.

Thanks
Luca Bertoncello
(lucabert@lucabert.de)


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Router: check for domain in list [ In reply to ]
senders= lsearch file /etc/exim4/virtualdomains.txt

Greetings
Daniel


EDV Daniel M?ller

Leitung EDV
Tropenklinik Paul-Lechler-Krankenhaus
Paul-Lechler-Str. 24
72076 T?bingen
Tel.: 07071/206-463, Fax: 07071/206-499
Email: mueller@tropenklinik.de
www.tropenklinik.de







-----Urspr?ngliche Nachricht-----
Von: Luca Bertoncello via Exim-users [mailto:exim-users@exim.org]
Gesendet: Montag, 26. Februar 2018 14:20
An: exim-users@exim.org
Betreff: [exim] Router: check for domain in list

Hi list!

I need to check, in a Exim-Router, if the sender domain is in a list of
domain.
I tried so:

condition = ${if eq{${lookup {$sender_address_domain}wildlsearch
{/etc/exim4/virtualdomains.txt}}}{}{yes}{no}}

but it does not really works...
The file /etc/exim4/virtualdomains.txt is just a list of domains, not a
key:value list, so such this:

/etc/exim4/virtualdomains.txt:
domain1.tld
domain2.tld
...

I really don't know which other lookup I can try to just check IF a string
in a file exists.
Can someone suggest me somewhat?

Thanks
Luca Bertoncello
(lucabert@lucabert.de)


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Router: check for domain in list [ In reply to ]
On 26/02/18 13:38, Luca Bertoncello via Exim-users wrote:
> I really can't understand what you mean...
> I need to just check if a FILE contains a STRING.
> In the link you sent I cannot find any useful information how to do
> that, or I'm too idiot to understand it...
>
> Please explain me what you mean.

A single-element domain list, with the filename.
A match_domain expansion condition comparing
$sender_address_domain with that list.
A condition= generic condition on your router.

--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Router: check for domain in list [ In reply to ]
Zitat von Jeremy Harris via Exim-users <exim-users@exim.org>:

Hello Jeremy

> A single-element domain list, with the filename.
> A match_domain expansion condition comparing
> $sender_address_domain with that list.
> A condition= generic condition on your router.

OK, thank you!
Now I understand what you mean.

Of course, it works (at least with the first tests...).

Bye
Luca Bertoncello
(lucabert@lucabert.de)


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/