You can use the
Received Text context and cause it to fire off an action that you can create.
You can specify Sender as one of the options to the Received Text context, but if that doesn't give you enough information to determine whether you're getting the message from some sort of automatic or double-authentication-based source, you can examine the following variables within your action to get more info:
%SMSRF => sender address
%SMSRN => sender name
%SMSRB => message body
%MMSRS => MMS subject
%SMSRD => date received
%SMSRT => time received
These variables are all described in the Tasker docs.
Also, you can create a
Received Text context and then click on the question mark at the upper right of the screen which comes up in order to get more infomation about how to use that context.