Re: [Exim] Sata^H^Hnatizing strings in exim filter?

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Kirill Miazine
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] Sata^H^Hnatizing strings in exim filter?
* Sander Smeenk [2003-10-01 22:54]:
> Is there, or will there be, the possibility to 'sanatize' strings
> matched from headers in userland exim filters?
>
> Say, for example, I want to do something like the following, and I
> want (need...) to filter out characters like [.<>?/* ] for security
> reasons:
>
> | if $h_From: matches "([^@])@" then
> |     save mail/saved/by/sender/localpart/$1
> |     finish
> | endif

>
> Is it possible? I couldn't find anything relevant on exim.org.


It is possible, yes.

if ${local_part:$h_from:} is not "" then
    save mail/saved/by/sender/localpart/${sg{${local_part:$h_from:}}{[./|]}{}}
    finish
endif


Replace "./|" with the characters that you want to filter out "for
security reasons".

--
Kirill Miazine
mailto:km@krot.org
http://km.krot.org/