I have two regexes below which are pulling the domain name of the email sender (from). i.e linkedin.com, amazones.com.
However I cant create one regex to pull them both in one as they aren't always in the same format.
index=fortimail source=/var/log/messages/splunk/fortimail/*-fortimail.log
| dedup date, time, to, from, domain, subject
| rex field=from "(.*@.*\.(?<domainname>.*\..*)$)"
| rex field=from ".*@(?<domainname2>.*\..*)$"
| table date, time, to, from, domainname, domainname2, subject, message_length
... View more