On Sat, 13 Jun 2020 09:54:07 +1200 Michael Hamilton <michael@actrix.gen.nz> wrote:
On Saturday 13 June 2020, Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
* At the moment I make it write all the output from the jobs to files in a directory under /var/log but: (a) that means I have to actively go to the Pi to check them rather than have them delivered to my desktop, and (b) it only keeps the last output from each job, which is normally OK but could cause grief.
Is python or perl already installed? With python you could write a script such as:
import smtplib server = smtplib.SMTP('mysmtpserver.myco.com', 25) #optionally login #server.login("emailusername", "password") server.sendmail("sender@sender.com", "receiver@receiver.com", "hello world")
It's probably quite similar for perl (google would track down the equivalent).
Yes, both perl and python are there.
You could also just ssh to the opensuse box using authorised keys and create an email.
Now that's an interesting idea. I have fond memories of rsh :)
Michael
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org