Need Advanced MySQL query for Custom Rule "where email is like a list"
I am trying to put together a custom rule that will allow me to create a list of "Do Not Email" addresses so I can accept new ticket from these addresses, but never send them responses. These addresses are my AV, Backup, Monitoring services, etc. Many services come with the email@example.com address that gets ignored, but these services send an email to you that strips the subject so I know I will end up getting a loop.
To help with this, I am creating a custom asset type called "Do Not Email" where it is just a list of usernames and email addresses. I am then comparing the email address on a new ticket to the list of names in the ASSET_DATA_10201 to see if there is a match:
USER.ID AS ID1,
INNER JOIN USER ON USER.ID = HD_TICKET.SUBMITTER_ID
USER.EMAIL IN (SELECT
This works great for exact matches, but I also want to expand this for @domain.com matches. I want to put @company-xyz.com in my asset list so that if the senders email comes from firstname.lastname@example.org I also get a match, but I am not sure how to accomplish this in the query.