Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #226125

Re: [OT] Remote SSH (dynamic IP) without third-party server

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: [OT] Remote SSH (dynamic IP) without third-party server
Date 2020-08-12 05:30 +0200
Message-ID <ACPCF-38u-1@gated-at.bofh.it> (permalink)
References (5 earlier) <AzUIx-2wx-1@gated-at.bofh.it> <AzWhj-3h7-1@gated-at.bofh.it> <AA4oy-8nE-21@gated-at.bofh.it> <ACtVv-6Kz-3@gated-at.bofh.it> <ACANk-2ri-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue 11 Aug 2020 at 07:39:00 (-0400), Greg Wooledge wrote:
> On Mon, Aug 10, 2020 at 11:18:10PM -0500, David Wright wrote:
> > $ cat /etc/cron.daily/send-hotmail 
> > #!/bin/sh
> > [ -x /root/.cron/send-hotmail.sh ] || exit 0
> > /root/.cron/send-hotmail.sh
> > $ cat /root/.cron/send-hotmail.sh 
> > #!/bin/sh
> > mailx -s 'ZZZ---ZZZ' myfreeaccount@hotmail.co.uk < /etc/mailname
> > $ 
> 
> Why have two one-liner scripts?  Why not just put the mailx command
> in the send-hotmail script directly?

Personal policy. Many of my /etc configuration files are generated
from, as it were, templates under /root. For example, hosts is built
from a master list (≡router's DHCP) and an internet list of blocked
sites, fstab is built from a set of USB/SDcard/caddies plus a
host-specific section. Anything cron related, like apt-get update/
-d upgrade, and so on, lives under /root/.cron.

Lines that are in a cron table typically just call a separate script,
even when it's a single line, which allows the script to be edited
without rerunning crontab or disturbing the /etc files.

> > … sends my home's IP address each day to a location I can read from
> > anywhere.
> 
> Who populates the /etc/mailname file, and how?

The d-i, and then dpkg-reconfigure exim4-config. mailx comments on
a lack of message body, and I don't want cron sending a local email
on account of any error/warning. So—might as well send some file.
As I said, it could be any useful information as desired. I just
chose it for this example, and it has no special significance.

> Is the IP address actually in the /etc/mailname file, or are you
> parsing it out of the Received: headers and ignoring the body?

The latter, eg,
 Received: from hostname.corp (ipN-N-N-N.ISP.net [n.n.n.n]) by …

Most of the emails would probably never get opened, particularly in
these times of limited opportunities to travel, and I'd just delete
them. (I'm told that they'd expire in they remained unread for long
enough.) The subject line could be designed to make it easy to
filter them out from other emails being sent to the same address.

Cheers,
David.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[OT] Remote SSH (dynamic IP) without third-party server riveravaldez <riveravaldezmail@gmail.com> - 2020-08-01 04:10 +0200
  Re: [OT] Remote SSH (dynamic IP) without third-party server David Christensen <dpchrist@holgerdanske.com> - 2020-08-01 08:20 +0200
    Re: [OT] Remote SSH (dynamic IP) without third-party server deloptes <deloptes@gmail.com> - 2020-08-01 14:00 +0200
      Re: [OT] Remote SSH (dynamic IP) without third-party server Dan Purgert <dan@djph.net> - 2020-08-01 17:50 +0200
      Re: [OT] Remote SSH (dynamic IP) without third-party server David Christensen <dpchrist@holgerdanske.com> - 2020-08-02 00:30 +0200
        Re: [OT] Remote SSH (dynamic IP) without third-party server Michael Stone <mstone@debian.org> - 2020-08-02 01:10 +0200
          Re: [OT] Remote SSH (dynamic IP) without third-party server David Christensen <dpchrist@holgerdanske.com> - 2020-08-02 03:50 +0200
  Re: [OT] Remote SSH (dynamic IP) without third-party server <tomas@tuxteam.de> - 2020-08-01 09:50 +0200
    Re: [OT] Remote SSH (dynamic IP) without third-party server martin f krafft <madduck@debian.org> - 2020-08-01 12:30 +0200
      Re: [OT] Remote SSH (dynamic IP) without third-party server tomas@tuxteam.de - 2020-08-01 14:40 +0200
        Re: [OT] Remote SSH (dynamic IP) without third-party server martin f krafft <madduck@debian.org> - 2020-08-02 01:20 +0200
      Re: [OT] Remote SSH (dynamic IP) without third-party server riveravaldez <riveravaldezmail@gmail.com> - 2020-08-02 04:40 +0200
        Re: [OT] Remote SSH (dynamic IP) without third-party server martin f krafft <madduck@debian.org> - 2020-08-03 01:10 +0200
          Re: [OT] Remote SSH (dynamic IP) without third-party server martin f krafft <madduck@debian.org> - 2020-08-11 01:20 +0200
  Re: [OT] Remote SSH (dynamic IP) without third-party server Joe <joe@jretrading.com> - 2020-08-01 10:00 +0200
    Re: [OT] Remote SSH (dynamic IP) without third-party server riveravaldez <riveravaldezmail@gmail.com> - 2020-08-01 11:40 +0200
      Re: [OT] Remote SSH (dynamic IP) without third-party server deloptes <deloptes@gmail.com> - 2020-08-01 14:10 +0200
        Re: [OT] Remote SSH (dynamic IP) without third-party server mick crane <mick.crane@gmail.com> - 2020-08-01 14:30 +0200
        Re: [OT] Remote SSH (dynamic IP) without third-party server rhkramer@gmail.com - 2020-08-01 17:30 +0200
        Re: [OT] Remote SSH (dynamic IP) without third-party server David Wright <deblis@lionunicorn.co.uk> - 2020-08-02 06:00 +0200
          Re: [OT] Remote SSH (dynamic IP) without third-party server Gene Heskett <gheskett@shentel.net> - 2020-08-02 07:10 +0200
            Re: [OT] Remote SSH (dynamic IP) without third-party server David Wright <deblis@lionunicorn.co.uk> - 2020-08-02 22:10 +0200
              Re: [OT] Remote SSH (dynamic IP) without third-party server Gene Heskett <gheskett@shentel.net> - 2020-08-02 22:50 +0200
          Re: [OT] Remote SSH (dynamic IP) without third-party server Greg Wooledge <wooledg@eeg.ccf.org> - 2020-08-03 14:00 +0200
            Re: [OT] Remote SSH (dynamic IP) without third-party server Greg Wooledge <wooledg@eeg.ccf.org> - 2020-08-03 21:20 +0200
              Re: [OT] Remote SSH (dynamic IP) without third-party server Charles Curley <charlescurley@charlescurley.com> - 2020-08-03 23:10 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server rhkramer@gmail.com - 2020-08-03 23:30 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server David Wright <deblis@lionunicorn.co.uk> - 2020-08-04 03:10 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server Michael Stone <mstone@debian.org> - 2020-08-04 03:40 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server David Wright <deblis@lionunicorn.co.uk> - 2020-08-04 04:10 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server Stefan Monnier <monnier@iro.umontreal.ca> - 2020-08-04 04:20 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server David Wright <deblis@lionunicorn.co.uk> - 2020-08-04 06:00 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server Michael Stone <mstone@debian.org> - 2020-08-04 14:40 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server David Wright <deblis@lionunicorn.co.uk> - 2020-08-11 06:20 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server Greg Wooledge <wooledg@eeg.ccf.org> - 2020-08-11 13:40 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server David Wright <deblis@lionunicorn.co.uk> - 2020-08-12 05:30 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server Michael Stone <mstone@debian.org> - 2020-08-11 14:20 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server David Wright <deblis@lionunicorn.co.uk> - 2020-08-12 05:30 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server Michael Stone <mstone@debian.org> - 2020-08-12 13:40 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server David Wright <deblis@lionunicorn.co.uk> - 2020-08-13 16:10 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server Celejar <celejar@gmail.com> - 2020-08-04 16:10 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server Michael Stone <mstone@debian.org> - 2020-08-04 14:40 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server Charles Curley <charlescurley@charlescurley.com> - 2020-08-04 19:50 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server Greg Wooledge <wooledg@eeg.ccf.org> - 2020-08-04 13:50 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server Celejar <celejar@gmail.com> - 2020-08-04 15:40 +0200
            Re: [OT] Remote SSH (dynamic IP) without third-party server David Wright <deblis@lionunicorn.co.uk> - 2020-08-03 21:20 +0200
              Re: [OT] Remote SSH (dynamic IP) without third-party server Nate Bargmann <n0nb@n0nb.us> - 2020-08-04 02:00 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server David Wright <deblis@lionunicorn.co.uk> - 2020-08-04 03:10 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server Stefan Monnier <monnier@iro.umontreal.ca> - 2020-08-04 04:30 +0200
                Re: [OT] Remote SSH (dynamic IP) without third-party server David Christensen <dpchrist@holgerdanske.com> - 2020-08-04 10:50 +0200
    Re: [OT] Remote SSH (dynamic IP) without third-party server "Thomas Schmitt" <scdbackup@gmx.net> - 2020-08-01 12:00 +0200
  Re: [OT] Remote SSH (dynamic IP) without third-party server Dan Ritter <dsr@randomstring.org> - 2020-08-01 13:10 +0200
  Re: [OT] Remote SSH (dynamic IP) without third-party server rhkramer@gmail.com - 2020-08-01 13:20 +0200
  Re: [OT] Remote SSH (dynamic IP) without third-party server David <bouncingcats@gmail.com> - 2020-08-01 14:10 +0200
  Re: [OT] Remote SSH (dynamic IP) without third-party server Reco <recoverym4n@enotuniq.net> - 2020-08-01 14:40 +0200
  Re: [OT] Remote SSH (dynamic IP) without third-party server Reco <recoverym4n@enotuniq.net> - 2020-08-01 14:40 +0200
  Re: [OT] Remote SSH (dynamic IP) without third-party server Michael Stone <mstone@debian.org> - 2020-08-01 17:20 +0200
  Re: [OT] Remote SSH (dynamic IP) without third-party server "007@caiway.net" <007@caiway.net> - 2020-08-01 17:40 +0200
    Re: [OT] Remote SSH (dynamic IP) without third-party server "007@caiway.net" <007@caiway.net> - 2020-08-01 18:10 +0200
  Re: [OT] Remote SSH (dynamic IP) without third-party server Nate Bargmann <n0nb@n0nb.us> - 2020-08-01 19:50 +0200
  Re: [OT] Remote SSH (dynamic IP) without third-party server Henrique de Moraes Holschuh <hmh@debian.org> - 2020-08-01 21:40 +0200
  Re: [OT] Remote SSH (dynamic IP) without third-party server MAS Jean-Louis <jean-louis.mas@imag.fr> - 2020-08-04 16:00 +0200
    Re: [OT] Remote SSH (dynamic IP) without third-party server Michael Stone <mstone@debian.org> - 2020-08-04 16:20 +0200
    Re: [OT] Remote SSH (dynamic IP) without third-party server Andrei POPESCU <andreimpopescu@gmail.com> - 2020-08-04 17:40 +0200
  Re: [OT] Remote SSH (dynamic IP) without third-party server Andrei POPESCU <andreimpopescu@gmail.com> - 2020-08-04 17:50 +0200
  Re: [OT] Remote SSH (dynamic IP) without third-party server Curt <curty@free.fr> - 2020-08-04 19:10 +0200
    Re: [OT] Remote SSH (dynamic IP) without third-party server Gene Heskett <gheskett@shentel.net> - 2020-08-04 21:40 +0200
      Re: [OT] Remote SSH (dynamic IP) without third-party server Andrei POPESCU <andreimpopescu@gmail.com> - 2020-08-05 09:40 +0200

csiph-web