RE: [Exim] partial- type lookups for SQL?

Página Inicial
Delete this message
Reply to this message
Autor: Eli
Data:  
Para: 'Larry Rosenman', exim-users
Assunto: RE: [Exim] partial- type lookups for SQL?
You might be able to do this very easily using the LIKE search function in
SQL.

When you run your check on $domain, rather than doing something like:

"select .... where domain = '${quote_pgsql:$domain}'"

Use instead:

"select .... where domain like '%${quote_pgsql:$domain}'"

Hope that helps, might put a little burden on the SQL server, but it might
be the easiest/cleanest way of doing it :)

Eli.

-----Original Message-----
From: exim-users-admin@??? [mailto:exim-users-admin@exim.org] On Behalf
Of Larry Rosenman
Sent: Sunday, December 21, 2003 7:36 PM
To: exim-users@???
Subject: [Exim] partial- type lookups for SQL?

--
I'm looking to make a SQL based Domain type blacklist for those that
have managed to really piss me off.

I had a list in my Sendmail Access File, and would like to convert it
to a PostgreSQL DB with a table structure containing at least the following:

domain text,
message text

What I want to be able to do is match the sender (From: and envelope, and
the host names) and match even if the host part of the domain is different,
I.E:

domain='bad.domain.com'

I want to be able to match host222.bad.domain.com as well as just
bad.domain.com.

Anyone have any hints, suggestions examples, etc?

The partial- type queries look to be what I want, but they don't (based on
my read of the docs) work with SQL type queries.

Thanks!

LER


--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@???
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
--
[ Content of type application/pgp-signature deleted ]
--



--

## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
details at http://www.exim.org/ ##

---
[This E-mail scanned for viruses]



---
[This E-mail scanned for viruses]