Yep, you should be able to use value_template to set the sensor’s state based on whatever is in the body or subject of the emails you receive. For example, if the emails for a triggered alarm from your security company include “Burglar alarm triggered” you could use the below for value_template:
value_template: >
{% if 'Burglar alarm triggered' in subject %}
Alarm triggered
{% elif 'Burglar alarm cleared' in subject %}
No alarm
{% endif %}
Of course, you need to customize this to whatever you want.