Adding a signature with an Exchange mail flow rule: step by step
How to add an email signature with an Exchange Online mail flow rule: the exact admin center steps, attribute tokens, fallback options, PowerShell and limits.
6 minute readBy the Geco Signatures team
In the Exchange admin center, go to Mail flow > Rules, select Add a rule > Apply disclaimers, set the rule to apply to messages sent outside the organisation, paste your signature HTML with tokens such as %%DisplayName%% and %%Title%%, choose a fallback action, add an exception so replies don’t get a second copy, then save and enable the rule. Exchange Online then adds the signature to every matching message as it leaves, from any app or device.
Microsoft calls this a disclaimer rule, but the same action works for a simple company signature. The steps below are for the current Exchange admin center in Microsoft 365, checked against Microsoft’s documentation in October 2026.
On this page (8)
- How to create a signature rule in the Exchange admin center
- Signature HTML with attribute tokens
- Which fallback option to choose
- How to create the same rule in PowerShell
- Common problems with mail flow rule signatures
- Where a disclaimer rule falls short as a signature
- Doing this for a whole company
- Questions people ask
How to create a signature rule in the Exchange admin center
You need the Exchange administrator or Global Administrator role. Write and test your signature HTML first (there’s an example in the next section).
- Go to admin.exchange.microsoft.com and open Mail flow > Rules.
- Select Add a rule, then choose Apply disclaimers from the list.
- In Name, type something clear such as “External signature”.
- Under Apply this rule if, choose The recipient > is external/internal, select Outside the organization, then Save. To target one team instead, add a second condition such as The sender > is a member of this group.
- Under Do the following, check that Apply a disclaimer to the message and append a disclaimer are selected. Choose prepend a disclaimer only if you want the text at the top.
- Select Enter text, paste your HTML and select Save.
- Select Select one next to the fallback action, choose Wrap, Ignore or Reject, and select Save. The next section explains which to pick.
- Under Except if, choose The subject or body > Subject or body matches these text patterns, enter a phrase that only appears in your signature, select Add, then Save.
- Select Next. On Set rule settings, leave Rule mode on Enforce, or choose Test without Policy Tips to log matches without changing any mail. Select Next, review, then Finish.
- Rules created in the admin center start disabled. Select the rule on the Rules page and switch on the toggle under Enable or disable rule.
Send test messages to an outside address, both as HTML and as plain text, before you tell anyone the rule is live. Microsoft also suggests forwarding the test back to yourself to confirm the exception stops a second copy.
Signature HTML with attribute tokens
The disclaimer text can include HTML and inline CSS, and images through an img tag pointing to a public https address. Exchange swaps tokens for the sender’s details from the directory. The supported tokens are %%DisplayName%%, %%FirstName%%, %%LastName%%, %%Initials%%, %%Title%%, %%Department%%, %%Company%%, %%Office%%, %%Manager%%, %%Phone%%, %%MobilePhone%%, %%HomePhone%%, %%Fax%%, %%Pager%%, %%StreetAddress%%, %%City%%, %%StateOrProvince%%, %%PostalCode%%, %%PostOfficeBox%%, %%CountryOrRegion%%, %%Notes%%, %%UserPrincipalName%% and %%WindowsEmailAddress%%.
Here is a simple example for the Michael Scott Paper Company. Keep it to a table with inline styles, which most mail apps handle well. The whole text can be up to 5,000 characters.
<table cellpadding="0" cellspacing="0" style="font-family:Arial,sans-serif;font-size:13px;color:#333333;">
<tr>
<td style="padding-right:12px;">
<img src="https://www.michaelscottpaper.com/email/logo.png" width="80" height="80" alt="Michael Scott Paper Company">
</td>
<td>
<strong>%%DisplayName%%</strong><br>
%%Title%%, %%Department%%<br>
T: %%Phone%% | M: %%MobilePhone%%<br>
<a href="https://www.michaelscottpaper.com">michaelscottpaper.com</a>
</td>
</tr>
</table>
<p style="font-family:Arial,sans-serif;font-size:11px;color:#777777;">Michael Scott Paper Company Ltd. Registered in England and Wales.</p>Use the last line, “Registered in England and Wales”, or a similar phrase as the text in your exception. Once a message already contains it, the rule skips that message.
Which fallback option to choose
The fallback action decides what happens when Exchange can’t change the message, for example when it’s encrypted or signed.
- Wrap (the default). Exchange creates a new message with your disclaimer, attaches the original to it and sends that. If wrapping fails, the original bounces back to the sender. Recipients get an email with an attachment instead of the message they expected.
- Ignore. The message goes out as it is, without the signature.
- Reject. The message is returned to the sender in a non-delivery report.
For an outgoing signature, Ignore is usually right. Missing a signature on the odd encrypted email is better than wrapping or bouncing it. Microsoft warns against using Wrap on rules that apply to incoming mail from outside, because it gets in the way of Safe Attachments scanning.
How to create the same rule in PowerShell
Exchange Online PowerShell gives you a rule you can recreate exactly or copy between tenants. Save your HTML to a file first so you don’t have to fight with quotes.
Connect-ExchangeOnline -UserPrincipalName admin@michaelscottpaper.com
$html = Get-Content -Path "C:\Signatures\external-signature.html" -Raw
New-TransportRule -Name "External signature" `
-SentToScope NotInOrganization `
-ApplyHtmlDisclaimerLocation Append `
-ApplyHtmlDisclaimerText $html `
-ApplyHtmlDisclaimerFallbackAction Ignore `
-ExceptIfSubjectOrBodyContainsWords "Registered in England and Wales"
Get-TransportRule -Identity "External signature" | Format-List Name,State,ModeTo change the HTML later, run Set-TransportRule with the same name and a new ApplyHtmlDisclaimerText value.
Common problems with mail flow rule signatures
- Nothing is added. Check the rule is enabled and in Enforce mode, and that your test really goes outside the organisation. A higher-priority rule with Stop processing more rules can also block it.
- The signature appears twice. People still have their own Outlook signature. Ask them to remove it, or keep the rule to a short footer.
- The logo doesn’t show. The image must be on a public https address. Many mail apps hold back linked images until the recipient chooses to download them.
- Replies have no signature. The exception found your phrase in the quoted text below. That is how the rule avoids stacking copies, and it means later replies in a thread go without one.
- Layout breaks in plain-text emails. Plain-text messages can’t carry your HTML formatting, so test those separately.
Where a disclaimer rule falls short as a signature
For a small company that wants a consistent footer on external email, a mail flow rule is a perfectly good free option. Many organisations run one for years.
It was built for disclaimers, though, and it shows. The text always goes at the end of the whole message, below the quoted thread, so in a long conversation your details end up far from what you wrote. The sender doesn’t see it while typing, and the copy in their Sent Items doesn’t have it. Images are links rather than embedded, so recipients often see a blank box first. The exception that stops duplicates also stops a signature on later replies. One rule gives one design, so different teams or offices need a rule each, and every edit is raw HTML in a text box with no preview.
Doing this for a whole company
Geco Signatures also works on the server, through an Exchange Online connector, so it reaches every device in the same way a mail flow rule does. The difference is in the result. The signature sits directly under the sender’s newest text in replies, images are embedded, empty fields drop out cleanly and a designer replaces hand-written HTML. Rules can target groups, departments or offices, and internal or external mail. See server-side signatures and rules and targeting for details.
Questions people ask
What tokens can I use in an Exchange disclaimer?
Exchange Online supports tokens such as %%DisplayName%%, %%Title%%, %%Department%%, %%Phone%%, %%MobilePhone%%, %%Company%%, %%Office%%, %%StreetAddress%%, %%City%%, %%PostalCode%% and %%WindowsEmailAddress%%. Each one is replaced with the sender’s value from the directory.
How do I stop the disclaimer being added to every reply?
Add an exception for messages where the subject or body contains a phrase that only appears in your disclaimer. Once the text is in the thread, the rule skips later messages.
Can a mail flow rule put the signature under my reply instead of at the bottom?
No. Append adds the text to the end of the whole message and Prepend adds it to the very top. There is no option to place it between your reply and the quoted thread.
Why don’t I see the mail flow rule signature in my Sent Items?
The rule changes the message in Exchange Online after it leaves your mailbox, so the copy saved in Sent Items is the version before the signature was added.