View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 3 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Email from LinHES box
PostPosted: Sat Feb 13, 2021 4:37 pm 
Offline
Joined: Sat Jun 05, 2004 2:00 pm
Posts: 36
Location: St. Paul, MN
Is there a recommended way to send emails from a LinHES box? I would like to use a command line based method to send an email depending on the return status of a script.

This topic has been brought up at least twice before, in 2007 http://forums.linhes.org/viewtopic.php?f=5&t=1617 and in 2011 http://forums.linhes.org/viewtopic.php?f=21&t=22246. Is there anything current baked in to LinHES or something that can be installed from a package to accomplish this?

Is anyone doing this and have a method you like?

Thanks


Top
 Profile  
 
PostPosted: Sat Feb 13, 2021 5:37 pm 
Offline
Joined: Sat Jan 06, 2007 7:08 pm
Posts: 123
I do believe I played around with postfix a while back. I forget the details.

I think postfix tries to configure itself for you upon initial invocation.

postfix is in the linhes 'extra' repo.

_________________
DH87MC i7-4770 16GB ram Xonar Essence ST geforce 710 LinHes 8.6


Top
 Profile  
 
PostPosted: Mon Feb 15, 2021 8:08 am 
Offline
Joined: Wed Jan 07, 2004 12:14 pm
Posts: 412
Location: Charlotte, NC
Yes it is quite easy... I use email alerts for a lot of things on my Myth box. See https://rtcamp.com/tutorials/linux/ubun ... mail-smtp/ for instructions to configure postfix (you will have to get the app from 'extra'). After installation and configuration, make sure you restart postfix...

postfix stop
postfix start

I have one script file that calls postfix and I call that script file from several places within the system (ie one common script for everything).

#!/bin/bash
sendmail xxxxxxxx@yyyyyyyyyy.com <<EOF
From:xxxxxxxxx@gmail.com
subject:Mythtv Alert
$*
EOF

_________________
Backend server - 4.0 TB 3.0ghz dual core 6 gig RAM, nVidia 9400, Gigabyte GA-870A-UD3 MB, 2 HD-5500, 2 HD Homerun dual tuners, 3 frontend machines - LinHES 8.5


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu