On 5/19/2010 6:50 AM, Alex wrote:
Hi,
Where can I go to find information on how to modify the content of the
body of an email before delivering?
I would like to experiment with changing "curse words" or removing
URLs like "<a href=....>" ?
I realize there are all kinds of problems with doing this, such as
modifying the signature and size of messages, but it's acceptable
tradeoff for now.
I'd really like to be able to do this with a perl script rather than
having to install some additional program like amavisd. Maybe
something like alterMIME?
Thanks,
Alex
You can use smtp_header_checks and smtp_body_checks with the
REPLACE action to make minor changes to mail content during
delivery. These are rather simple tools by design, best
suited for easily defined transformations.
IIRC altermime is better suited for removing attachments or
adding disclaimers. I don't think it will help with replacing
words or URLs.
There are some regexp based milters that may give you more
control.
Enjoy your experiment, but in the end you're much better off
rejecting messages with content you don't like rather than
trying to fix it.
-- Noel Jones