3 ms·
> configuring a mailbox to deliver messages to a program is standard fare for a mail server Why?! Why would you run a separate mail server of that device? All
by vog 9y ago
> configuring a mailbox to deliver messages to a program is standard fare for a mail server
Why?! Why would you run a separate mail server of that device?
All you need is IMAP (or POP3), to connect the device to an existing mail server.
- chrismorgan 9y agoYou could do it that way, but (a) it’s much more satisfying to have it run the mail server itself, and (b) it’ll be markedly faster because the message is going to the server rather than to a third-party server, which will then notify your device. POP3 is a polling protocol, so you can’t realistically use it for anything real-time. For IMAP, your server probably supports IDLE, and you’ll need to use a client that supports IDLE as well. I’m not familiar with what’s available in IMAP client libraries; people put most of their email client effort into user agents. Everything IoT should run its own mail server, just for the fun of it. Bonus marks if it causes an RCE vulnerability. (But I’d say you’re pretty safe from that with Dovecot.) But seriously, email servers aren’t actually that scary. I wish more people ran their own, and more developers could comfortably work with them. Especially as an endpoint for something like this, running your own email server is perfectly feasible and reasonable—it’ll only accept messages to one mailbox, which will be immediately processed and discarded, so there’s no storage. It’s simply a C&C module.
- andrewchambers 9y agoWould need some way to get through NAT, at least here. Maybe ngrok will work with smtp too. I find the thought using email for IOT pub sub hilarious no matter how you do it.
- vog 9y ago> Would need some way to get through NAT, at least here. And you need to setup DynDNS or similar. Having a persistent IMAP connection sounds much less troublesome to me.