08-04-2016 11:43 AM
Without enabling URL filtering, would it be possible to rewrite all URLs received in emails on the external listener, say, if you wanted to just route them all to your own proxy? This wouldn't require enabling the URL filtering service on the ESA, which add processing overhead. I researched using message filters, but I would need to capture the URL and reuse it, and I see no way to do that. In content filters, and in message filters, I suppose, you could, as the ESA User Guide says, rewrite a URL like this, http://custom_proxy/$URL, to be, http://custom_proxy/http://example.com.
08-10-2016 05:20 AM
This could be done w/ some trial and error to achieve what you are needing... similar to strip URL --- you would need to use something similar to this logic:
Create the following message filter:
URL_Replaced:
if true {
edit-body-text("(?i)(?:https?|ftp)://[^\\s\">]+", "URL REMOVED");
}
The above filter will be applied to all messages, received or sent by the appliance. You can add a condition to filter only incoming mail.
URL_Replaced:
if recv-listener == "IncomingMail" {
edit-body-text("(?i)(?:https?|ftp)://[^\\s\">]+", "URL REMOVED");
}
The above filter will be applied to messages received by the listener named IncomingMail.
08-10-2016 05:47 AM
Thanks, Robert. That is in the ESA User Guide, but I want to re-use the matched string (i.e., the URL). How would I do that? These examples demonstrate replacing a string with another string.
08-17-2016 08:58 AM
I do not see this as a configurable option available currently which would allow you to re-use the string.
The matched string can only be replaced with another string.
Regards
Libin
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide