Re: [Exim] userdefined filter form db

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Dave C.
日付:  
To: Wild Karl-Heinz
CC: exim-users
題目: Re: [Exim] userdefined filter form db
On Thu, 31 Jan 2002, Wild Karl-Heinz wrote:

> hello
>
> >>> user_filter:
> >>> driver = forwardfile
> >>> check_local_user = false
> >>> user = exim
> >>> condition = ${lookup mysql{select id from mail ....
> >>> file = ${lookup mysql{select filter_content ....
> >>> filter
> >>> no_verify
>
> ph>> The "file" option specifies the *name* of the filter file, not the
> ph>> content. You will have to wait for the next Exim release (or use the
> ph>> current testing release) if you want to read filter content from a
> ph>> database.
>
> I think i've found what i was looking for
>
> central_filter:
>   driver       = redirect
>   condition = ${lookup mysql{MYSQL_USER}}
>   data         = ${lookup mysql{MYSQL_FILTER}}
>   allow_filter
>   user         = mailnull
>   nomore
>   skip_syntax_errors
>   no_verify

>
> But if an filter like that
> ...
> if $message_body contains "test" and not error_message
> then
>    finish
> endif

>
> find an "test" how can I finish the delivering or routing process?


If the filter does not specify any signifigant deliveries, then exim
will deliver the message as usual..

'finish' is a way to stop further processing of the filter file. That
filter you have there does absolutely nothing..

If you want to do something different if the body does contain 'test'
(keep in mind it only looks at a subset of the body, see the
message_body_visible option for more about that), then you would:


if $message_body contains "test" and not error_message
then
<do something different here>
(to see what you can do, see the exim filter document)
endif





>
> --
> Mit freundlichen Gruessen,
> Wild Karl-Heinz
> mailto:kh.wild@wicom.li
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>
>


--