I created a transport-rule in our Exchange server 2013 where it will add a warning text on top of email-body to all external incoming emails. This is to alert employees about potential risks in external emails when it has website-links and attachments which may be harmful. The text is as follows: Text

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Now, when user will reply to the email, I want it to be remove when Exchange process it to send. How can I remove the warning text from outgoing emails in Exchange? I was looking for something in rules, but there is none I could find.

Any help will be appreciated. Thanks.


There is no such rule. The MS Exchange transport rules can only add such a string but couldn´t remove them.

I would do the following:

  • Setup a Proxy (Squid and SquidGuard or something like that)
  • Start using an GPO which block the attachments you would see as "non secure" as written here
  • ok, thanks. is there any other way I can remove the warning text? the purpose is to show warning to employees when they would open an external email. now if the email is legitimate, when they reply to it, the warning line should be removed. is there any way to show the warning text in message header in Outlook, not on the body? this is something we are trying to implement for 500+ employees. – arifr Aug 2 '17 at 8:39
  • Not out of the box. But why didn´t you start implementing a proxy for the internet traffic? You could then show a disclaimer once the user click on that. On top of that you could use blacklists from known bad URLs and you could save some traffic and speed up connections while stuff is cached (search for Debian Squid and SquidGuard; its quite easy to set that up). For attachments you could block some via GPOsee here so that the users couldn´t click on it. – BastianW Aug 2 '17 at 9:48

How to remove the yellow caution bar (not why, or if you should) In Outlook, press alt + F11 (to open Microsoft VBA)

Paste the following into ThisOutlookSession:

Option Explicit

Sub InsertHyperLink(MyMail As mailItem)

    Dim body As String

    body = MyMail.HTMLBody

    body = Replace(body, "background-color:#FFEB9C; width:100%; border-style: solid; border-color:#9C6500; border-width:1pt; padding:2pt; font-size:10pt; line-height:12pt; font-family:'Calibri'; color:Black; text-align: left;", "", 1, 1, vbTextCompare)

    body = Replace(body, "CAUTION:", "", 1, 1, vbTextCompare)

    body = Replace(body, "This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.</div>", "", 1, 1, vbTextCompare)

    MyMail.HTMLBody = body


End Sub

Edit the registry and add the following DWORD

HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Sec‌​urity DWORD: EnableUnsafeClientMailRules Value: 1

Enable all macros in Trust Center (or sign this one)

Create a Custom Rule executing the macro

File / Manage Rules & Alerts / New rule / "Apply rule on messages I receive"/ "Run a script" / Click on the text that says "a script" / “ThisOutlookSession”

Test, Done!

  • @GeraldSchneider This is how I removed the yellow message from the body of the message when replying to an email while working at some company that enforced this weird policy that does seem disrespectful to anyone you email back and forth with. – daniel Dec 17 '18 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.