[exim] Remove & Replace Message Body Content

Etusivu
Poista viesti
Vastaa
Lähettäjä: Patrick Porteous
Päiväys:  
Vastaanottaja: Exim-users
Aihe: [exim] Remove & Replace Message Body Content
Hello,

I would like to create a filter that removes and replaces all HTML
hyperlinks in received messages.  In doing some initial testing, I made
the following conditional filter to test how Exim processes the
$message_body variable:

*if $message_body contains "href="**
**then**
**    headers add "X-Links: Yes"**
**endif*

However, it appears that the $message_body variable doesn't analyze the
source HTML of the message, but instead just looks at the plain text
produced by the HTML output.  Is Exim capable of analyzing the source
HTML of a message and then when certain criteria is matched, replacing
those parts of the message before delivery?

HTML Message Example:

*<html>**
**<head>**
**<meta charset="utf-8">**
**<title>Untitled Document</title>**
**</head>**
**
**<body>**
**    <a href="http://www.example.com">my-link</a>**
**</body>**
**</html>*

Thanks for any guidance,

Patrick