03-09-2016 07:30 AM
What are the limitations with using edit-body-text if any? I am trying to replace a long piece of text in the body of an email and wondered if there was a limitation in the field length when putting in the first parameter. I am looking to replace the following:
*********************************************
" This message originates from outside our organisation. Consider carefully whether you should click on any links, open any attachments or reply. If in doubt, forward to ~ xxxxxxxx"
*********************************************
Is there a way of doing this with regex?
03-09-2016 08:05 PM
Suggestion may be to just replace the body-text that you are after with a minimum change, and then also insert a header to place your overall message/notification...
add-heading(heading-name)
Add disclaimer text as a heading to the message. See “Message Disclaimer Stamping” in the “Text Resources” chapter for more information.
TechNote related to edit-body-text:
-Robert
03-10-2016 01:09 AM
Thanks for the reply Robert but still a bit confused. So how I want this to work is that all inbound mail from the internet puts the disclaimer on as in my original post with the asterixes. What I am struggling with is that when we reply to that email we want the Ironport to search the body of the mail for that disclaimer and remove it.
Does what you suggest cover that and if so I probably need more details on the edit-body-text command.
Thanks
03-10-2016 01:19 AM
Just a bit more detail. The filter I am using is:
Strip_Disclaimer: if recv-listener == "OutgoingMail" {
edit-body-text("\\**\\nThis message originates.{3,}\\n\\**", " ");
}
This seems to pick up the correct data as in the mail logs I see:
MID 33309 rewritten to MID 33310 by edit-body-text filter 'Strip_Disclaimer'
But when the mail is received the text is unchanged.
03-10-2016 07:34 AM
So I am slowly getting further with this. The text is getting stripped out of the text/plain part of the mail but not out of the txt/html part so unless I send the mail in plain text it remains.
Any ideas on how I can strip it out of the html part without converting to plain text?
03-10-2016 04:18 AM
If the false-positive rate on the filter is low, you might simply add some text to the warning advising recipients to remove the warning if replying then block the text on outbound mail.
In my case my FP rate is too high for that :-(
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