Re: Execute linux commands after receive a mail...

2017-03-17 Thread Ron Wheeler
What would be the human reaction to a 15 second  latency (nothing to 
regular e-mail service) on a light switch - hit it again and again until 
the first message arrives.
Fun to imagine lights suddenly turning on and off in rapid succession as 
delayed e-mail starts to get delivered a few seconds after the initial 
request.


The fridge could e-mail the grocery list when the milk runs low but 
e-mail not a good fit for  most IoT applications.


Ron

On 17/03/2017 3:18 AM, Sean Greenslade wrote:

On Thu, Mar 16, 2017 at 05:48:49PM -0700, li...@lazygranch.com wrote:

I had no idea you could receive email on any port. I wonder how many
ISPs allow this.

Sure, you can run any service on any port. The default ports (e.g. 25
for SMTP) are simply there to make interoperability easy.

Most ISPs do nothing to block specific services on specific ports. The
only thing I've ever seen is some residential ISPs block all outgoing
connections on port 25 to hamstring spambots on infected home PCs. This
is typically a blanket port ban, so it doesn't matter if it's a SMTP
server on that port or not; nothing goes out port 25. This generally
doesn't effect home users, since they almost always use a submission
port or a webmail client to get to their mail relay.


In any event, would this be THE scheme to use for an IOT application?
That is send an email to turn on/off a sprinker, light, etc. The idea
being postfix et all does all the security, AKA the hard part.

While it would certainly be _A_ way of doing IoT, I certainly wouldn't
call it _THE_ way. Email is not particularly well-suited for command and
control type applications. Lots of protocol and message overhead, high
latency, unidirectional channels...overall not a great fit.

--Sean





--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102



Re: Execute linux commands after receive a mail...

2017-03-17 Thread Sean Greenslade
On Thu, Mar 16, 2017 at 05:48:49PM -0700, li...@lazygranch.com wrote:
> I had no idea you could receive email on any port. I wonder how many
> ISPs allow this.

Sure, you can run any service on any port. The default ports (e.g. 25
for SMTP) are simply there to make interoperability easy.

Most ISPs do nothing to block specific services on specific ports. The
only thing I've ever seen is some residential ISPs block all outgoing
connections on port 25 to hamstring spambots on infected home PCs. This
is typically a blanket port ban, so it doesn't matter if it's a SMTP
server on that port or not; nothing goes out port 25. This generally
doesn't effect home users, since they almost always use a submission
port or a webmail client to get to their mail relay.

> In any event, would this be THE scheme to use for an IOT application?
> That is send an email to turn on/off a sprinker, light, etc. The idea
> being postfix et all does all the security, AKA the hard part.

While it would certainly be _A_ way of doing IoT, I certainly wouldn't
call it _THE_ way. Email is not particularly well-suited for command and
control type applications. Lots of protocol and message overhead, high
latency, unidirectional channels...overall not a great fit.

--Sean



Re: Execute linux commands after receive a mail...

2017-03-16 Thread li...@lazygranch.com
On Thu, 16 Mar 2017 11:29:56 -0500
Noel Jones  wrote:

> On 3/16/2017 11:18 AM, Gilberto Nunes wrote:
> > Hello folks...
> > 
> > I just need execute some command after receive a mail...
> > 
> > I found this site: 
> > 
> > https://www.thecodingmachine.com/triggering-a-php-script-when-your-postfix-server-receives-a-mail/
> > 
> > This can be achieve with shell script as well??  
> 
> The above site is an example of a simple content_filter using a PHP
> script.  The postfix docs contain a similar example using a shell
> script.
> http://www.postfix.org/FILTER_README.html#simple_filter
> 
> 

I had no idea you could receive email on any port. I wonder how many
ISPs allow this.

In any event, would this be THE scheme to use for an IOT application?
That is send an email to turn on/off a sprinker, light, etc. The idea
being postfix et all does all the security, AKA the hard part.


Re: Execute linux commands after receive a mail...

2017-03-16 Thread Gilberto Nunes
Thanks a lot Noel
It will be useful

2017-03-16 13:29 GMT-03:00 Noel Jones :

> On 3/16/2017 11:18 AM, Gilberto Nunes wrote:
> > Hello folks...
> >
> > I just need execute some command after receive a mail...
> >
> > I found this site:
> >
> > https://www.thecodingmachine.com/triggering-a-php-script-
> when-your-postfix-server-receives-a-mail/
> >
> > This can be achieve with shell script as well??
>
> The above site is an example of a simple content_filter using a PHP
> script.  The postfix docs contain a similar example using a shell
> script.
> http://www.postfix.org/FILTER_README.html#simple_filter
>
>
>


-- 
Obrigado

Cordialmente


Gilberto Ferreira

Consultoria em Servidores e Serviços Linux | Virtualização Proxmox |
Zentyal Server | Zimbra Mail Server

(47) 3025-5907
(47) 99676-7530

Skype: konnectati


www.konnectati.com.br


Re: Execute linux commands after receive a mail...

2017-03-16 Thread Noel Jones
On 3/16/2017 11:18 AM, Gilberto Nunes wrote:
> Hello folks...
> 
> I just need execute some command after receive a mail...
> 
> I found this site: 
> 
> https://www.thecodingmachine.com/triggering-a-php-script-when-your-postfix-server-receives-a-mail/
> 
> This can be achieve with shell script as well??

The above site is an example of a simple content_filter using a PHP
script.  The postfix docs contain a similar example using a shell
script.
http://www.postfix.org/FILTER_README.html#simple_filter




Execute linux commands after receive a mail...

2017-03-16 Thread Gilberto Nunes
Hello folks...

I just need execute some command after receive a mail...

I found this site:

https://www.thecodingmachine.com/triggering-a-php-script-when-your-postfix-server-receives-a-mail/

This can be achieve with shell script as well??

Thanks a lot...

-- 
Obrigado

Cordialmente


Gilberto Ferreira

Consultoria em Servidores e Serviços Linux | Virtualização Proxmox |
Zentyal Server | Zimbra Mail Server

(47) 3025-5907
(47) 99676-7530

Skype: konnectati


www.konnectati.com.br