RE: [Exim] partial-mysql query question

Góra strony
Delete this message
Reply to this message
Autor: Mark McRitchie
Data:  
Dla: 'Tom Bell'
CC: Exim Users (E-mail)
Temat: RE: [Exim] partial-mysql query question
Hi Tom,

its my understanding that you need mysql to return a * BUT your matching on
the domain.
Your SQL: select user from reject_users where host like '${key}'

you want user to be * but as your doing a LIKE match on the key, that part
of the data needs to be "%.test.com".

Oh, and you might need to reverse the where clause to get it to work:
SELECT user FROM reject_users WHERE '${key}' LIKE host

as the host is supplying the pattern, not ${key}... be wary of matching
multiple rows and thus multiple users in this fashion.

HTH

Regards,
Mark.


-----Original Message-----
From: Tom Bell [mailto:Tom@nct.com.au]
Sent: 09 August 2002 10:58
To: Mark McRitchie; Exim Mailing List
Subject: RE: [Exim] partial-mysql query question


Howdy,
     I under stand that, my problem is that I dont want SQL to do the
matching. To quote the exim manual at exim.org


Partial matching is implemented by doing a series of separate lookups
using keys constructed by modifying the original subject key. This means
that it can be used with any of the single-key lookup types, provided
that the special partial-matching keys beginning with `*.' are included
in the data file. Keys in the file that do not begin with `*.' are
matched only by unmodified subject keys when partial matching is in use.

Well it seems that this is not working with partial-mysql.

So my question is probably more like is partial-mysql meant to work ?

Thanx for your time.

Tom Bell

-----Original Message-----
From: Mark McRitchie <Mark.McRitchie@???>
To: "'tom@???'" <tom@???>, Exim Mailing List <exim-
users@???>
Date: Fri, 9 Aug 2002 08:40:16 +0100
Subject: RE: [Exim] partial-mysql query question

> The MySQL Wildcard is a % not a *
>
>
> Regards,
> Mark
>
>
> -----Original Message-----
> From: Tom Bell [mailto:tom@nct.com.au]
> Sent: 09 August 2002 06:07
> To: Exim Mailing List
> Subject: [Exim] partial-mysql query question
>
>
> Howdy,
>     I'm currently running exim 3.35 under debian 3.0 and
> I have a no doubt simple question. I was using the
> sender_reject_recipients
> tag with a partial-lseach* on a flat file and was very happy
> with it. I have since switched to using partial-mysql instead
> and it works well also, however it doesn't seem to match on
> partial domains. eg

>
> partial-lsearch
>
> *.test.com     *

>
>
> #sender_reject_recipients = @@partial-lsearch*;/etc/exim/reject-users
> sender_reject_recipients = @@partial-mysql;select user from
> reject_users
> where host like '${key}';
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
> details at http://www.exim.org/ ##
>
>
> Salamis Group of Companies - WWW.SALAMISGROUP.COM
>
> This communication contains information which is confidential and may
> also be privileged. It is for the exclusive use of the intended
> recipient(s). If you are not the intended recipient(s) be advised
> that any form of distribution, copying or use of this communication
> or the information it contains is strictly prohibited and may be
> unlawful. We apologise if you have received this communication in
> error. Please return it to the sender immediately, delete this
> communication from your computer and destroy any copies of it. Any
> views/opinions expressed in this email are that of the author and may
> not reflect the views of Salamis (M&I)Ltd.
>
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
> details at http://www.exim.org/ ##
>




Salamis Group of Companies - WWW.SALAMISGROUP.COM

This communication contains information which is confidential and may
also be privileged. It is for the exclusive use of the intended
recipient(s). If you are not the intended recipient(s) be advised
that any form of distribution, copying or use of this communication
or the information it contains is strictly prohibited and may be
unlawful. We apologise if you have received this communication in
error. Please return it to the sender immediately, delete this
communication from your computer and destroy any copies of it. Any
views/opinions expressed in this email are that of the author and may
not reflect the views of Salamis (M&I)Ltd.