Sending exchange mail from an if

New to Debian (Or Linux in general)? Ask your questions here!

Sending exchange mail from an if

Postby Brian1210 » 2017-09-20 04:14

I installed
[url]http://www.home-automation-community.com/temperature-and-humidity-from-am2302-dht22-sensor-displayed-as-chart/[url]
As stock, then edited header, footer. Now I want to send out an email through an exchange server if temperature gets about 67 degrees ( listed in a csv file). Then if value is greater the 67, sleep for 30 minutes. To simply prevent email flood or spammed.

Not sure how to put in promission and point it at exchange mail server. Then how to put in condition of the value

Thank you
Brian1210
 
Posts: 1
Joined: 2017-09-20 04:03

Re: Sending exchange mail from an if

Postby steve_v » 2017-09-20 11:32

Brian1210 wrote:Not sure how to put in promission and point it at exchange mail server.

Sendmail should be able to talk to exchange, though I haven't tried it myself. It's even on the internet, so it must be true. :P
As for the exchange side of things, I don't use Microshaft products, so I'll not be of much help.

For automating it (assumed meaning of "how to put in condition of the value"), I'd probably go with a cron job that runs the python script or grabs the data from the csv and uses a bit of bash to compare the value. Then I'd chuck a file in /tmp and check it's modified time to see if a mail has already been sent in the desired period. There are many ways to do this, and the relevant man pages should provide all the information needed to cook something up.
steve_v
 
Posts: 522
Joined: 2012-10-06 05:31
Location: New Zealand


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable