SMTP trigger

Hi there!
Any way to do this insane thing? I have old DVR which can send email on alarms. But it can’t do something as webhook.

So I want use email message to trigger HA and do something else.

Take a look at the link below.

I don’t want use external mail server. Because it depends on internet connection and can be false positive if anyone send message from outside.

I found solution with local server: https://partofthething.com/thoughts/getting-ip-camera-motion-events-into-a-home-assistant-to-trigger-things/

But seems can’t use apt-get inside hass.io yep?

The imap_email_content should also work with a local mail server.
You can also define the sender and filter on some mail content.
Here’s an example:

EDIT: Sorry didn’t read that you tried a local server.
I see no chance in hassio.
Maybe a second pi?

Looks like very redundant…

I found custom component which solve similar problems so will try adapt it: https://github.com/fwestenberg/reolink/blob/b7f46f34c8ea44c07adc6454b950fb901de73545/custom_components/reolink/camera.py