On 18 maj 2009, at 10.43, Fredrik Thulin wrote:

> On Fri, 2009-05-15 at 16:29 +0200, Jakob Schlyter wrote:
>> hi,
>>
>> is there any way to block a list of From: from using the
>> incomingproxy? I have a list of regexp:s that are never allowed to
>> contact our proxy (i.e. appear in From:).
>
> Yes, by implementing whatever access control you want in the hook
> local:new_request/3.
>
> Probably something along the lines of
>
> new_request(AppModule, Request, YxaCtx) ->
>    case is_bad(Request) of
>       true ->
>           transactionlayer:send_response_handler
>               (YxaCtx#yxa_ctx.thandler, 403, "Forbidden");
>           ignore;
>       false ->
>           undefined
>    end.

has anyone implemented something like this? I'd like to use this to  
add support for simple blacklisting:

1) use a regexp to transform the From: (or perhaps P-Asserted-Identity  
with tel:) into an E.164 number
2) do a ENUM-like lookup in some configurable domain, like query for  
0.0.0.8.7.8.7.1.3.6.4.e164.arpa. TXT
3) if something record at the given domain name, reject the call with  
'603 Decline'

I'm no erlang wizkid, but I could assist in setting up the DNS stuff  
if someone can assist with the code.

        jakob

_______________________________________________
Yxa-devel mailing list
Yxa-devel@lists.su.se
https://lists.su.se/mailman/listinfo/yxa-devel

Reply via email to