On 18 Dec 2020, at 8:21, @lbutlr wrote:

Does anyone have a sieve setup that removes html enclosures (or converts them to plain text, even better)? I want to do this for specific mails, not globally for the server, so I think sieve is the way to go here rather than a milter.

So, why ask on this list?

Obviously, MD can do this. remove_redundant_html_parts() (documented in the mimedefang-filter man page) exists. MD can select messages to act upon by any criteria you like.

If there is a way to edit the HTML of specific messages, that would also be useful. (For example, changing text colors to black instead of carrying shades of light grey).

Sieve seems like an entirely wrong place to do that sort of surgery on messages. It is entirely feasible to programmatically edit the HTML of a message in MD, which is designed for doing radical message surgery. MD passes each of the filter* subroutines a Mime::Entity object containing the relevant MIME object (whole message or sub-part) and metadata. You can modify it at will.



--
Bill Cole
[email protected] or [email protected]
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to