Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

It's later than you think, the joint Russian-American space mission has already begun.


computers / alt.os.linux.suse / Just a question.

SubjectAuthor
* Just a question.Sidney_Kotic
+* Re: Just a question.marrgol
|`- Re: Just a question.Sidney_Kotic
`- Re: Just a question.Carlos E. R.

1
Just a question.

<slmvqg$7b6$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=343&group=alt.os.linux.suse#343

  copy link   Newsgroups: alt.os.linux.suse
Path: i2pn2.org!i2pn.org!aioe.org!kLvrZrZfyHXjnygC6xRGCA.user.46.165.242.91.POSTED!not-for-mail
From: kant@have.it (Sidney_Kotic)
Newsgroups: alt.os.linux.suse
Subject: Just a question.
Date: Sun, 31 Oct 2021 12:54:39 -0800
Organization: Aioe.org NNTP Server
Message-ID: <slmvqg$7b6$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="7526"; posting-host="kLvrZrZfyHXjnygC6xRGCA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Content-Language: en-US
X-Mozilla-News-Host: news://news.aioe.org:119
X-Notice: Filtered by postfilter v. 0.9.2
 by: Sidney_Kotic - Sun, 31 Oct 2021 20:54 UTC

I've been playing around with sending mail while in a cronjob. Here is a test
script.

WhoBeI=`hostname`
# Format to run on Raspberry Pi under raspbian
# Sendtheshhtuff="sendEmail -f mydeadcat@fakedomain.ddns.net \
-u $WhoBeI \
-s mail.fakedomain.ddns.net \
-t myname@fakedomain.ddns.net \
-o message-file=Da_message.msg"
# Format to run on openSUSE
# Sendtheshhtuff="mailx -r mydeadcat@fakedomain.ddns.net \
-s $WhoBeI \
-q Da_message.msg \
myname@fakedomain.ddns.net"
# echo "Hey, `date`" > Da_message.msg
# $Sendtheshhtuff < "."

This works.
My question is...is there a way to get rid of the < "." in the last line so that
it just says...
$Sendtheshhtuff

Re: Just a question.

<617f1b89$0$514$65785112@news.neostrada.pl>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=344&group=alt.os.linux.suse#344

  copy link   Newsgroups: alt.os.linux.suse
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-b-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
Subject: Re: Just a question.
Newsgroups: alt.os.linux.suse
References: <slmvqg$7b6$1@gioia.aioe.org>
From: marrgol@address.invalid (marrgol)
Date: Sun, 31 Oct 2021 23:41:13 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <slmvqg$7b6$1@gioia.aioe.org>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: pl-PL
Content-Transfer-Encoding: 7bit
Lines: 38
Message-ID: <617f1b89$0$514$65785112@news.neostrada.pl>
Organization: Telekomunikacja Polska
NNTP-Posting-Host: 176.111.237.144
X-Trace: 1635720073 unt-rea-a-01.news.neostrada.pl 514 176.111.237.144:55504
X-Complaints-To: abuse@news.neostrada.pl
X-Received-Bytes: 2194
 by: marrgol - Sun, 31 Oct 2021 22:41 UTC

On 31/10/2021 at 21.54, Sidney_Kotic wrote:
> I've been playing around with sending mail while in a cronjob. Here is a test
> script.
>
> WhoBeI=`hostname`
> # Format to run on Raspberry Pi under raspbian
> #
> Sendtheshhtuff="sendEmail -f mydeadcat@fakedomain.ddns.net \
> -u $WhoBeI \
> -s mail.fakedomain.ddns.net \
> -t myname@fakedomain.ddns.net \
> -o message-file=Da_message.msg"
> # Format to run on openSUSE
> #
> Sendtheshhtuff="mailx -r mydeadcat@fakedomain.ddns.net \
> -s $WhoBeI \
> -q Da_message.msg \
> myname@fakedomain.ddns.net"
> #
> echo "Hey, `date`" > Da_message.msg
> #
> $Sendtheshhtuff < "."
>
> This works.
> My question is...is there a way to get rid of the < "." in the last
> line so that it just says...
> $Sendtheshhtuff

I don't know about sendEmail but for mailx this should work:

Sendtheshhtuff="eval mailx -r mydeadcat@fakedomain.ddns.net \
-s $WhoBeI \
myname@fakedomain.ddns.net \
< Da_message.msg"

--
mrg

Re: Just a question.

<slnb91$kqa$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=345&group=alt.os.linux.suse#345

  copy link   Newsgroups: alt.os.linux.suse
Path: i2pn2.org!i2pn.org!aioe.org!kLvrZrZfyHXjnygC6xRGCA.user.46.165.242.91.POSTED!not-for-mail
From: kant@have.it (Sidney_Kotic)
Newsgroups: alt.os.linux.suse
Subject: Re: Just a question.
Date: Sun, 31 Oct 2021 16:10:08 -0800
Organization: Aioe.org NNTP Server
Message-ID: <slnb91$kqa$1@gioia.aioe.org>
References: <slmvqg$7b6$1@gioia.aioe.org>
<617f1b89$0$514$65785112@news.neostrada.pl>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="21322"; posting-host="kLvrZrZfyHXjnygC6xRGCA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Sidney_Kotic - Mon, 1 Nov 2021 00:10 UTC

On 10/31/21 2:41 PM, marrgol wrote:

> I don't know about sendEmail but for mailx this should work:

Thanks for the reply.

IIRC that does work. But it won't work for sendEmail and Raspberry pi's don't
normally have email on them apparently (none is installed by default). So I
cobbled together a couple of things to get them, I have several, to send out email.

As I said, it does work with the < "." appended. So it's more of an exercise to
get that cut off. In the real script it can produce different emails in 4
places, the less I type the better off I am.

Re: Just a question.

<7n145ixjto.ln2@minas-tirith.valinor>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=346&group=alt.os.linux.suse#346

  copy link   Newsgroups: alt.os.linux.suse
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!lilly.ping.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E. R.)
Newsgroups: alt.os.linux.suse
Subject: Re: Just a question.
Date: Mon, 1 Nov 2021 03:58:15 +0100
Lines: 59
Message-ID: <7n145ixjto.ln2@minas-tirith.valinor>
References: <slmvqg$7b6$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net Z7lb20sqeW6QN4cnoJhR1wN2MtAZnE8n6ugy/DB+J8K0Lv3rge
X-Orig-Path: minas-tirith.valinor!not-for-mail
Cancel-Lock: sha1:rlokp5vx81afab2HHSKQLVG01VM=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
In-Reply-To: <slmvqg$7b6$1@gioia.aioe.org>
Content-Language: en-CA
 by: Carlos E. R. - Mon, 1 Nov 2021 02:58 UTC

On 31/10/2021 21.54, Sidney_Kotic wrote:
> I've been playing around with sending mail while in a cronjob.  Here is
> a test script.
>
> WhoBeI=`hostname`

....

> # Format to run on openSUSE
> #
> Sendtheshhtuff="mailx -r mydeadcat@fakedomain.ddns.net \
>                       -s $WhoBeI \
>                       -q Da_message.msg \
>                       myname@fakedomain.ddns.net"
> #
> echo "Hey, `date`" > Da_message.msg
> #
> $Sendtheshhtuff < "."
>
> This works.
> My question is...is there a way to get rid of the < "." in the last line
> so that it just says...
> $Sendtheshhtuff

I use this with the nut daemon:

echo -e "$NOTIFYTYPE\r\n\r\nUPS: $UPSNAME\r\nAlert type:
$NOTIFYTYPE\r\n\r\n`upsc $UPSNAME`" | \
mail -r from@address -s "NUT report myhostname ($NOTIFYTYPE)" \
to@address

Another method, used when I update my dyndns:

echo > /var/lib/DDNS/mailbody.txt
host $CURRENTIP >>/var/lib/DDNS/mailbody.txt
echo >> /var/lib/DDNS/mailbody.txt

echo "See attached files" | mail -r from@address -s "dns things" \
-q /var/lib/DDNS/mailbody.txt \
-a /var/lib/DDNS/router_output.log \
-a /var/lib/DDNS/router_output_err.log \
-a /var/lib/DDNS/router_output_greperr.log \
-a /var/lib/DDNS/wget_out.txt \
-a /var/lib/DDNS/wget_err.txt \
-a /var/lib/DDNS/DDNS_status \
to@address

(remember than in opensuse mailx and mail are the same program)

cer@Isengard:~> l /usr/bin/mail
lrwxrwxrwx 1 root root 5 May 16 2020 /usr/bin/mail -> mailx*
cer@Isengard:~

--
Cheers,
Carlos E.R.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor