OK, I've completely rewritten your Macro.
It had several issues:
- You never copied the Raw Source data so that the Regex Search could be used.
- Even then, it appears there may be two different formats used in the MS Mail Raw Source Header to ID the Authenticated Sender.
I have added a second Regex as follows:
Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JaneSmith@SomeDummyCo.com;
My Macro checks for #1, and if not found, tries #2.
Below is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.
Please let us know if it meets your needs.
MACRO: Extract Authenticated Sender from MS Mail Msg [Example]
-~~~ VER: 2.0 2020-07-17 ~~~
Requires: KM 8.2.4+ macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))
DOWNLOAD Macro File:
Extract Authenticated Sender from MS Mail Msg [Example].kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.
Macro Author: @JMichaelTX
This is just an example written in response to the below KM Forum Topic. You will need to use as an example and/or change to meet your workflow automation needs.
Carefully review the Release Notes and the Macro Actions
- Make sure you understand what the Macro will do.
- You are responsible for running the Macro, not me.
USE AT YOUR OWN RISK
- While I have given this a modest amount of testing, and to the best of my knowledge will do no harm, I cannot guarantee it.
- If you have any doubts or questions:
- Ask first
- Turn on the KM Debugger from the KM Status Menu, and step through the macro, making sure you understand what it is doing with each Action.