Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Sending exchange mail from an if

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
Brian1210
Posts: 1
Joined: 2017-09-20 04:03

Sending exchange mail from an if

#1 Post by Brian1210 »

I installed
[url]http://www.home-automation-community.co ... 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

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: Sending exchange mail from an if

#2 Post by steve_v »

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.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Post Reply