[arm-allstar] Email on connection?

David McGough kb4fxc at inttek.net
Sun May 6 10:02:36 EST 2018


Russell,

Logging which goes to syslog can be seen using the journalctl command.

So, open a couple ssh sessions and try something like this:

..........In the first ssh session:

[root at hamvoip-kb4fxc ~]# echo "this is a test e-mail" | mail -s "Test from RPi3" kb4fxc at inttek.net
[root at hamvoip-kb4fxc ~]# 


.........And, in the second ssh session:

[root at hamvoip-kb4fxc ~]# journalctl -f 
-- Logs begin at Mon 2016-02-22 09:40:14 EST. --
May 06 07:01:01 hamvoip-kb4fxc.inttek.net CROND[19380]: (root) CMD (run-parts /etc/cron.hourly)
May 06 07:26:42 hamvoip-kb4fxc.inttek.net wpa_supplicant[290]: wlan0: WPA: Group rekeying completed with 78:8a:23:1d:38:19 [GTK=CCMP]
May 06 08:01:01 hamvoip-kb4fxc.inttek.net CROND[19406]: (root) CMD (run-parts /etc/cron.hourly)
May 06 08:26:42 hamvoip-kb4fxc.inttek.net wpa_supplicant[290]: wlan0: WPA: Group rekeying completed with 78:8a:23:1d:38:19 [GTK=CCMP]
May 06 09:01:01 hamvoip-kb4fxc.inttek.net CROND[19428]: (root) CMD (run-parts /etc/cron.hourly)
May 06 09:26:42 hamvoip-kb4fxc.inttek.net wpa_supplicant[290]: wlan0: WPA: Group rekeying completed with 78:8a:23:1d:38:19 [GTK=CCMP]
May 06 10:01:01 hamvoip-kb4fxc.inttek.net CROND[19451]: (root) CMD (run-parts /etc/cron.hourly)
May 06 10:26:42 hamvoip-kb4fxc.inttek.net wpa_supplicant[290]: wlan0: WPA: Group rekeying completed with 78:8a:23:1d:38:19 [GTK=CCMP]
May 06 10:52:34 hamvoip-kb4fxc.inttek.net sSMTP[19536]: Sent mail for root at devrpi4.inttek.net (221 2.0.0 Bye) uid=0 username=root outbytes=373


.........Note the last line of the log, which indicates successful 
transmission of the e-mail message. And, I got it my inbox.  I'm able to 
send this message to myself since I control the mail server(s) at this end 
and I've allowed local access without authentication. For most scenarios, 
you'll need to authenticate yourself to the Internet e-mail server before 
it'll allow you to send messages.  Here is my example /etc/ssmtp/ssmtp.conf
file:

#
# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=postmaster
# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named mail.domain.com
# The example will fit if you are in domain.com and you mailhub is so named.
mailhub=mail
# Where will the mail seem to come from?
#rewriteDomain=y
# The full hostname
hostname=devrpi4.inttek.net


Are you going to use gmail to send you messages?

73, David KB4FXC




On Sat, 5 May 2018, Russell Thomas wrote:

> It worked David!
> 
> How do I see connection logs? I didn't get an email when I connected via
> EchoLink.
> 
> On Fri, May 4, 2018, 4:06 PM David McGough <kb4fxc at inttek.net> wrote:
> 
> >
> > Hi,
> >
> > Instead ot apt-get, try:
> >
> > pacman -Sy ssmtp
> >
> > 73, David KB4FXC
> >
> >
> >
> > On Fri, 4 May 2018, "Russell Thomas via arm-allstar" wrote:
> >
> > > All,
> > >
> > > Thank you for the suggestions!
> > >
> > > I was trying to implement this suggested script:
> > > https://github.com/n8thn/ASL_scripts/blob/master/msg_on_connect
> > >
> > > However, I don't seem to have a ssmtp directory?
> > >
> > > i tired to install it with apt-get but i'm getting this:
> > > sudo apt-get command not found
> > >
> > > any ideas?
> > >
> > > On Thu, May 3, 2018 at 4:32 PM, "K5CG via arm-allstar"
> > > <arm-allstar at hamvoip.org> wrote:
> > > > Also, have a look at pushover.net. Up to 750 free push notifications
> > per month, also uses curl to send via their API.
> > > >
> > > > You would want to install the Android/iPhone App for INSTANT (< 1 sec)
> > alerts.
> > > >
> > > > Danny
> > > > K5CG
> > > >
> > > > ----- Original Message -----
> > > > From: "ARM Allstar" <arm-allstar at hamvoip.org>
> > > > To: "ARM Allstar" <arm-allstar at hamvoip.org>
> > > > Cc: "bradley ferguson" <bradley.ferguson at gmail.com>
> > > > Sent: Thursday, May 3, 2018 3:06:40 PM
> > > > Subject: Re: [arm-allstar] Email on connection?
> > > >
> > > > You can use a 3rd party email service to avoid much of the smtp
> > hassle. Sendgrid (sendgrid.com <http://sendgrid.com/>) offers 100 emails
> > a day for free, and has an easy to use API.
> > > >
> > > > -Brad / KR4DIO
> > > > _______________________________________________
> > > >
> > > > arm-allstar mailing list
> > > > arm-allstar at hamvoip.org
> > > > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> > > >
> > > > Visit the BBB and RPi2/3 web page - http://hamvoip.org
> > > _______________________________________________
> > >
> > > arm-allstar mailing list
> > > arm-allstar at hamvoip.org
> > > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> > >
> > > Visit the BBB and RPi2/3 web page - http://hamvoip.org
> > >
> >
> >
> 



More information about the arm-allstar mailing list