Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Avoid the Gates of Hell. Use Linux -- unknown source


devel / comp.unix.shell / Sending mail from command line

SubjectAuthor
* Sending mail from command lineJanis Papanagnou
+* Re: Sending mail from command lineDan Espen
|`- Re: Sending mail from command lineJanis Papanagnou
+* Re: Sending mail from command lineLew Pitcher
|+- Re: Sending mail from command lineJanis Papanagnou
|+* Re: Sending mail from command lineWilliam Unruh
||`* Re: Sending mail from command lineJorgen Grahn
|| +- Re: Sending mail from command lineLew Pitcher
|| `* Re: Sending mail from command lineGrant Taylor
||  `* Re: Sending mail from command lineLew Pitcher
||   `* Re: Sending mail from command lineGrant Taylor
||    `* Re: Sending mail from command lineDavid W. Hodgins
||     `* Re: Sending mail from command lineGrant Taylor
||      `* Re: Sending mail from command lineDavid W. Hodgins
||       `- Re: Sending mail from command lineGrant Taylor
|`- Re: Sending mail from command lineGrant Taylor
+* Re: Sending mail from command lineFenris
|`* Re: Sending mail from command lineJanis Papanagnou
| +- Re: Sending mail from command lineLew Pitcher
| +* Re: Sending mail from command lineFenris
| |`- Re: Sending mail from command lineGrant Taylor
| +- Re: Sending mail from command lineChristoph Brinkhaus
| `* Re: Sending mail from command lineJohn-Paul Stewart
|  `* Re: Sending mail from command lineJanis Papanagnou
|   `* Re: Sending mail from command lineWilliam Unruh
|    +* Re: Sending mail from command lineJanis Papanagnou
|    |+* Re: Sending mail from command lineLew Pitcher
|    ||`* Re: Sending mail from command lineJanis Papanagnou
|    || `- Re: Sending mail from command lineJim Jackson
|    |`- Re: Sending mail from command lineWilliam Unruh
|    `- Re: Sending mail from command lineKeith Thompson
+* Re: Sending mail from command lineJohn-Paul Stewart
|`- Re: Sending mail from command lineGrant Taylor
+- Re: Sending mail from command lineChris Elvidge
`- Re: Sending mail from command lineandrew

Pages:12
Sending mail from command line

<ssrlak$ku$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4905&group=comp.unix.shell#4905

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Sending mail from command line
Date: Wed, 26 Jan 2022 15:20:04 +0100
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <ssrlak$ku$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 14:20:04 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="8f2971c775f55da7648698d8876b3ce0";
logging-data="670"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18S3OtwMWyHcQQAXbeO6RYn"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:A0eAbeSEZjcLSP6dUyjgT73Dhm4=
X-Mozilla-News-Host: news://news.eternal-september.org:119
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Wed, 26 Jan 2022 14:20 UTC

Decades ago I used (on AIX) the 'mailx' command to automatically send
notifications from cron'd shell scripts per email, something like

mailx -s "Test results" me@my.domain.invalid <<EOT
message to deliver
...
EOT

Now on Linux/Ubuntu I get that error

WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-.../pkcs11:
No such file or directory
send-mail: Authorization failed (535 Incorrect authentication data)
Can't send mail: sendmail process failed with error code 1

Two questions:
* Where do I have to look (or what to do)[*] to fix that problem?
* Is there some other (preferred, simpler, or without crypto demands)
interface or tool to send emails automatically from a shell script?

Thanks for any insights.

(References to more appropriate newsgroups are also welcome.)

Janis

[*] I've heard that sendmail configuration is a nightmare.

Re: Sending mail from command line

<ssrme5$5no$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4906&group=comp.unix.shell#4906

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dan1es...@gmail.com (Dan Espen)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 09:39:01 -0500
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <ssrme5$5no$1@dont-email.me>
References: <ssrlak$ku$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="63ad2981e672e63a45cf15e7ebc2ee0b";
logging-data="5880"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6aaUpxQtScIE8JsyDRNUY8mnhH2o9sD8="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:Une4srRVIX100n8QL3rQa2czD0o=
 by: Dan Espen - Wed, 26 Jan 2022 14:39 UTC

Janis Papanagnou <janis_papanagnou@hotmail.com> writes:

> Decades ago I used (on AIX) the 'mailx' command to automatically send
> notifications from cron'd shell scripts per email, something like
>
> mailx -s "Test results" me@my.domain.invalid <<EOT
> message to deliver
> ...
> EOT
>
> Now on Linux/Ubuntu I get that error
>
> WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-.../pkcs11:
> No such file or directory
> send-mail: Authorization failed (535 Incorrect authentication data)
> Can't send mail: sendmail process failed with error code 1
>
> Two questions:
> * Where do I have to look (or what to do)[*] to fix that problem?
> * Is there some other (preferred, simpler, or without crypto demands)
> interface or tool to send emails automatically from a shell script?
>
> Thanks for any insights.

It's not email, but notify-send works if you want the message routed to
the desktop.

--
Dan Espen

Re: Sending mail from command line

<ssrnjv$64h$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4907&group=comp.unix.shell#4907

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 14:59:11 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <ssrnjv$64h$1@dont-email.me>
References: <ssrlak$ku$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 26 Jan 2022 14:59:11 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="3f758a171d573b4989e826ab80dff445";
logging-data="6289"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19U9AeiIB8n0SyZAyF8goKNfmnYTc0txKU="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:3N9j2w5irYPJV85t8xPPRq2h1c8=
 by: Lew Pitcher - Wed, 26 Jan 2022 14:59 UTC

On Wed, 26 Jan 2022 15:20:04 +0100, Janis Papanagnou wrote:

[snip]
> [*] I've heard that sendmail configuration is a nightmare.

Sendmail configuration is indeed complex, mostly due to the
archaic form of it's configuration file, and the variety of options
available for mail handling.

However, depending on your distro, your installation may have come
with one or more sample configurations, most of which are relatively
easy to modify for use.

I personally run sendmail as my public MTA, with some custom config
changes to handle miltering (raw email filtering) and secured outbound
email relaying (through my ISP's MTA). My sendmail.mc file runs 22 lines
(excluding comments), and only differs from my distro's stock sendmail.mc
by 4 lines.

FWIW, I can recommend
"sendmail"
by Bryan Costales with Eric Allman
O'Reilly & Associates
ISBN 1-56592-222-0
as a /really/ good book on the subject, and
"sendmail Cookbook"
by Craig Hunt
O'Reilly & Associates
ISBN 0-596-00471-0
as a good guide to some common (and uncommon) configuration requirements.

HTH
--
Lew Pitcher
"In Skills, We Trust"

Re: Sending mail from command line

<slrnsv2qk8.pg3.fenris@rie.sdf.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4908&group=comp.unix.shell#4908

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!0uS3IkI3e3DfmX4suNwhhQ.user.46.165.242.75.POSTED!not-for-mail
From: fen...@invalid.invalid (Fenris)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 15:36:42 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <slrnsv2qk8.pg3.fenris@rie.sdf.org>
References: <ssrlak$ku$1@dont-email.me>
Injection-Info: gioia.aioe.org; logging-data="15288"; posting-host="0uS3IkI3e3DfmX4suNwhhQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: slrn/1.0.3 (Patched for libcanlock3) (NetBSD)
X-Notice: Filtered by postfilter v. 0.9.2
 by: Fenris - Wed, 26 Jan 2022 15:36 UTC

On 2022-01-26, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
> mailx -s "Test results" me@my.domain.invalid <<EOT
> message to deliver
> ...
> EOT
>
> Now on Linux/Ubuntu I get that error
>
> WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-.../pkcs11:
> No such file or directory
> send-mail: Authorization failed (535 Incorrect authentication data)
> Can't send mail: sendmail process failed with error code 1

Very strange. Maybe some unusual crontab variables set?

Re: Sending mail from command line

<ssrrt7$jg2$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4909&group=comp.unix.shell#4909

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 17:12:22 +0100
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <ssrrt7$jg2$1@dont-email.me>
References: <ssrlak$ku$1@dont-email.me> <slrnsv2qk8.pg3.fenris@rie.sdf.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 16:12:23 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="8f2971c775f55da7648698d8876b3ce0";
logging-data="19970"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1822mLZJPTcImRhUTp7Tjw6"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:x6ol7EtEEchcpIwBwirpYbZMhso=
In-Reply-To: <slrnsv2qk8.pg3.fenris@rie.sdf.org>
 by: Janis Papanagnou - Wed, 26 Jan 2022 16:12 UTC

On 26.01.2022 16:36, Fenris wrote:
> On 2022-01-26, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>> mailx -s "Test results" me@my.domain.invalid <<EOT
>> message to deliver
>> ...
>> EOT
>>
>> Now on Linux/Ubuntu I get that error
>>
>> WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-.../pkcs11:
>> No such file or directory
>> send-mail: Authorization failed (535 Incorrect authentication data)
>> Can't send mail: sendmail process failed with error code 1
>
> Very strange. Maybe some unusual crontab variables set?

This error was just the result of a try from the command line, no cron
involved here.

Thanks also for the other replies thus far.

Janis

Re: Sending mail from command line

<ssrset$pe9$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4910&group=comp.unix.shell#4910

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 17:21:49 +0100
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <ssrset$pe9$1@dont-email.me>
References: <ssrlak$ku$1@dont-email.me> <ssrme5$5no$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 16:21:49 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="8f2971c775f55da7648698d8876b3ce0";
logging-data="26057"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+cWU1Z+0Daa6We+mqQIKoz"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:nzoGU8Fsg8sdbeZ8MBg7yCFym4g=
In-Reply-To: <ssrme5$5no$1@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Wed, 26 Jan 2022 16:21 UTC

On 26.01.2022 15:39, Dan Espen wrote:
> Janis Papanagnou <janis_papanagnou@hotmail.com> writes:
>
>> Decades ago I used (on AIX) the 'mailx' command to automatically send
>> notifications from cron'd shell scripts per email, [...]
>
> It's not email, but notify-send works if you want the message routed to
> the desktop.

I've also thought about such an alternative, e.g. I had used 'zenity'
(a similar tool) for notifications in one case before.

An email interface would open a broader applicability, though, thus
still searching...

Janis

Re: Sending mail from command line

<ssrsj9$pe9$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4911&group=comp.unix.shell#4911

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 17:24:09 +0100
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <ssrsj9$pe9$2@dont-email.me>
References: <ssrlak$ku$1@dont-email.me> <ssrnjv$64h$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 16:24:09 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="8f2971c775f55da7648698d8876b3ce0";
logging-data="26057"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/jocdJLPx91SfDHvuslUj5"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:SsFgdKr13j7MdB8p9F6P710dQ/E=
In-Reply-To: <ssrnjv$64h$1@dont-email.me>
 by: Janis Papanagnou - Wed, 26 Jan 2022 16:24 UTC

On 26.01.2022 15:59, Lew Pitcher wrote:
> On Wed, 26 Jan 2022 15:20:04 +0100, Janis Papanagnou wrote:
>
> [snip]
>> [*] I've heard that sendmail configuration is a nightmare.
>
> Sendmail configuration is indeed complex, mostly due to the
> archaic form of it's configuration file, and the variety of options
> available for mail handling.
> [...]

My preference would be to not have to touch it, if avoidable.

Working tools solutions would certainly be nice, if existing.

Janis

Re: Sending mail from command line

<j5db4lFqc8U1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4912&group=comp.unix.shell#4912

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: jpstew...@personalprojects.net (John-Paul Stewart)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 11:28:05 -0500
Lines: 31
Message-ID: <j5db4lFqc8U1@mid.individual.net>
References: <ssrlak$ku$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Trace: individual.net DCIbDXCW/NPsAvED2wE6bwKQZfhOkWVuojoTCsxlj6IwOMtmXy
Cancel-Lock: sha1:LWZy6ocYjSkxhODv3KSu6I8PI9M=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Content-Language: en-CA
In-Reply-To: <ssrlak$ku$1@dont-email.me>
 by: John-Paul Stewart - Wed, 26 Jan 2022 16:28 UTC

On 2022-01-26 09:20, Janis Papanagnou wrote:
> Decades ago I used (on AIX) the 'mailx' command to automatically send
> notifications from cron'd shell scripts per email, something like
>
> mailx -s "Test results" me@my.domain.invalid <<EOT
> message to deliver
> ...
> EOT
>
> Now on Linux/Ubuntu I get that error
>
> WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-.../pkcs11:
> No such file or directory
> send-mail: Authorization failed (535 Incorrect authentication data)
> Can't send mail: sendmail process failed with error code 1
>
> Two questions:
> * Where do I have to look (or what to do)[*] to fix that problem?
> * Is there some other (preferred, simpler, or without crypto demands)
> interface or tool to send emails automatically from a shell script?

Be aware that on Ubuntu, "sendmail" may not actually be the original
sendmail program. Almost all Message Transfer Agents (MTAs) install a
/usr/bin/sendmail program or symlink. I believe the default on Ubuntu
is actually Postfix.

I use Debian with (the default) Exim as the MTA, and mailx has always
worked out of the box for me. No gnome-keyring involved. So your
problem might be specific to Ubuntu.

Either alt.os.linux.ubuntu or comp.os.linux.misc might have more answers.

Re: Sending mail from command line

<ssrsu6$64h$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4913&group=comp.unix.shell#4913

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 16:29:58 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 58
Message-ID: <ssrsu6$64h$2@dont-email.me>
References: <ssrlak$ku$1@dont-email.me> <slrnsv2qk8.pg3.fenris@rie.sdf.org>
<ssrrt7$jg2$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 26 Jan 2022 16:29:58 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="3f758a171d573b4989e826ab80dff445";
logging-data="6289"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19jzvvU+UssUX8kmmGzBJm9y1AX8GL7uvc="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:LiFw4JtLJ5FRQ+ld23NrF/POOgA=
 by: Lew Pitcher - Wed, 26 Jan 2022 16:29 UTC

On Wed, 26 Jan 2022 17:12:22 +0100, Janis Papanagnou wrote:

> On 26.01.2022 16:36, Fenris wrote:
>> On 2022-01-26, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>>> mailx -s "Test results" me@my.domain.invalid <<EOT
>>> message to deliver
>>> ...
>>> EOT
>>>
>>> Now on Linux/Ubuntu I get that error
>>>
>>> WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-.../pkcs11:
>>> No such file or directory
>>> send-mail: Authorization failed (535 Incorrect authentication data)
>>> Can't send mail: sendmail process failed with error code 1
>>
>> Very strange. Maybe some unusual crontab variables set?
>
> This error was just the result of a try from the command line, no cron
> involved here.
>
> Thanks also for the other replies thus far.
>
> Janis

From what I've been able to gather, mailx(1) invokes sendmail(1) under
the covers. On my Slackware system, mailx(1) /does not/ have any hardcoded
references to gnome-keyring, or any other keyring, for that matter.

I do note that the mailx(1) manpage states:
Sending mail from scripts
If you want to send mail from scripts, you must be aware that mailx
reads the user's configuration files by default. So unless your script
is only intended for your own personal use (as e.g. a cron job), you
need to circumvent this by invoking mailx like

MAILRC=/dev/null mailx -n

You then need to create a configuration for mailx for your script.
This can be done by either pointing the MAILRC variable to a custom
configuration file, or by passing the configuration in environment
variables. Since many of the configuration options are not valid shell
variables, the env command is useful in this situation. An invocation
could thus look like

env MAILRC=/dev/null from=scriptreply@domain smtp=host \
smtp-auth-user=login smtp-auth-password=secret \
smtp-auth=login mailx -n -s "subject" \
-a attachment_file recipient@domain <content_file

Perhaps the default MAILRC for /your/ invocation of mailx(1) contains some
reference to a cryptographic signature that, as a byproduct, attempts to invoke
the system keyring to determine the proper keys. This is where I'd start looking.

HTH
--
Lew Pitcher
"In Skills, We Trust"

Re: Sending mail from command line

<slrnsv2tuv.5nd.fenris@rie.sdf.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4914&group=comp.unix.shell#4914

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!0uS3IkI3e3DfmX4suNwhhQ.user.46.165.242.75.POSTED!not-for-mail
From: fen...@invalid.invalid (Fenris)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 16:33:37 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <slrnsv2tuv.5nd.fenris@rie.sdf.org>
References: <ssrlak$ku$1@dont-email.me> <slrnsv2qk8.pg3.fenris@rie.sdf.org>
<ssrrt7$jg2$1@dont-email.me>
Injection-Info: gioia.aioe.org; logging-data="19029"; posting-host="0uS3IkI3e3DfmX4suNwhhQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: slrn/1.0.3 (Patched for libcanlock3) (NetBSD)
X-Notice: Filtered by postfilter v. 0.9.2
 by: Fenris - Wed, 26 Jan 2022 16:33 UTC

On 2022-01-26, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>>> WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-.../pkcs11:
>>> No such file or directory
>>> send-mail: Authorization failed (535 Incorrect authentication data)
>>> Can't send mail: sendmail process failed with error code 1
>>
>> Very strange. Maybe some unusual crontab variables set?
>
> This error was just the result of a try from the command line, no cron
> involved here.

Maybe running `killall gnome-keyring-daemon' before the command?

Just to approach that "gnome-keyring" is the problem but not sendmail etc.

Re: Sending mail from command line

<ssrtmn$766t$1@tota-refugium.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4915&group=comp.unix.shell#4915

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.tota-refugium.de!.POSTED!not-for-mail
From: C.Brinkh...@t-online.de (Christoph Brinkhaus)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 16:43:03 -0000 (UTC)
Message-ID: <ssrtmn$766t$1@tota-refugium.de>
References: <ssrlak$ku$1@dont-email.me> <slrnsv2qk8.pg3.fenris@rie.sdf.org>
<ssrrt7$jg2$1@dont-email.me>
Injection-Date: Wed, 26 Jan 2022 16:43:03 -0000 (UTC)
Injection-Info: tota-refugium.de;
logging-data="235741"; mail-complaints-to="abuse@news.tota-refugium.de"
User-Agent: slrn/1.0.3 (FreeBSD)
Cancel-Lock: sha1:a7wvYlyAFvY3Wsu9ZKAtU/WWFoo=
X-User-ID: eJwNxEkBwDAIBEBLQLJA5HD6l9DOY3CUtewq9GKxhJBnQ1JRBEdE6Kh6O7HfmSdejH9iNOeIvNwcOrWHhEkj2Y0X1tm29QG3YBmx
 by: Christoph Brinkhaus - Wed, 26 Jan 2022 16:43 UTC

Janis Papanagnou <janis_papanagnou@hotmail.com> schrieb:
> On 26.01.2022 16:36, Fenris wrote:
>> On 2022-01-26, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:

Hello Janis!

>>> mailx -s "Test results" me@my.domain.invalid <<EOT
>>> message to deliver
>>> ...
>>> EOT
>>>
>>> Now on Linux/Ubuntu I get that error
>>>
>>> WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-.../pkcs11:
>>> No such file or directory
>>> send-mail: Authorization failed (535 Incorrect authentication data)
>>> Can't send mail: sendmail process failed with error code 1
>>
>> Very strange. Maybe some unusual crontab variables set?
>
> This error was just the result of a try from the command line, no cron
> involved here.
>
I have two points.

a) How does "normal" mail sending works?
Does it invoke sendmail?
I guess not. Otherwise you should observe the same errors.

b) More and more mail provider insist on encrypted transport.
May be in the past the sendmail configuration regarding encryption
has never been invoked. But now it is a problem.

You could consider to use more simple replacements for sendmail.
One is msmtp just for outgoing mail to a smart host.
Please see https://wiki.debian.org/msmtp for an overview.
It lists also alternatives.

The Dragonfly Mail Agent dma is also a simple
sendmail replacement. I am not sure if there is a Debian or Ubuntu
package.

I think the easiest approach is to start with msmtp or similar.

Kind regards,
Christoph

Re: Sending mail from command line

<ssruo6$bpn$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4916&group=comp.unix.shell#4916

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: chr...@mshome.net (Chris Elvidge)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 17:00:38 +0000
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <ssruo6$bpn$1@dont-email.me>
References: <ssrlak$ku$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 17:00:54 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="b56770b0bd18cca8c8e04caea639168c";
logging-data="12087"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199MbZQmYnjoHt8euR1wJXxXRFUnbseF6I="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.2.1 Lightning/5.4
Cancel-Lock: sha1:VtSXab7Bl4lsHznh+XEvakuyjx4=
In-Reply-To: <ssrlak$ku$1@dont-email.me>
Content-Language: en-GB
 by: Chris Elvidge - Wed, 26 Jan 2022 17:00 UTC

On 26/01/2022 14:20, Janis Papanagnou wrote:
> Decades ago I used (on AIX) the 'mailx' command to automatically send
> notifications from cron'd shell scripts per email, something like
>
> mailx -s "Test results" me@my.domain.invalid <<EOT
> message to deliver
> ...
> EOT
>
> Now on Linux/Ubuntu I get that error
>
> WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-.../pkcs11:
> No such file or directory
> send-mail: Authorization failed (535 Incorrect authentication data)
> Can't send mail: sendmail process failed with error code 1
>
> Two questions:
> * Where do I have to look (or what to do)[*] to fix that problem?
> * Is there some other (preferred, simpler, or without crypto demands)
> interface or tool to send emails automatically from a shell script?
>
> Thanks for any insights.
>
> (References to more appropriate newsgroups are also welcome.)
>
> Janis
>
> [*] I've heard that sendmail configuration is a nightmare.
>

Do you want to send mail to your real email address
janis_pxxxxxxxx@hotmail.com?
Or just to your local user?
For the first look at https://github.com/deanproxy/eMail

--
Chris Elvidge
England

Re: Sending mail from command line

<j5del9F1fi3U1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4917&group=comp.unix.shell#4917

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: jpstew...@personalprojects.net (John-Paul Stewart)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 12:28:09 -0500
Lines: 22
Message-ID: <j5del9F1fi3U1@mid.individual.net>
References: <ssrlak$ku$1@dont-email.me> <slrnsv2qk8.pg3.fenris@rie.sdf.org>
<ssrrt7$jg2$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 7mrLSanth9hbX/+VEn6vYQTDOgN4J4W42kyzv0n+yh4YZOSwdB
Cancel-Lock: sha1:tDlVh2hGyJtH/gCZSh6neWoPJzk=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Content-Language: en-CA
In-Reply-To: <ssrrt7$jg2$1@dont-email.me>
 by: John-Paul Stewart - Wed, 26 Jan 2022 17:28 UTC

On 2022-01-26 11:12, Janis Papanagnou wrote:
> On 26.01.2022 16:36, Fenris wrote:
>> On 2022-01-26, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>>> mailx -s "Test results" me@my.domain.invalid <<EOT
>>> message to deliver
>>> ...
>>> EOT
>>>
>>> Now on Linux/Ubuntu I get that error
>>>
>>> WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-.../pkcs11:
>>> No such file or directory
>>> send-mail: Authorization failed (535 Incorrect authentication data)
>>> Can't send mail: sendmail process failed with error code 1
>>
>> Very strange. Maybe some unusual crontab variables set?
>
> This error was just the result of a try from the command line, no cron
> involved here.

In that case, check your environment for any GNOME_KEYRING_* variables.
If there are any, unset them and re-try your mailx command.

Re: Sending mail from command line

<sss1ia$gf$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4918&group=comp.unix.shell#4918

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: unr...@invalid.ca (William Unruh)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 17:48:59 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <sss1ia$gf$1@dont-email.me>
References: <ssrlak$ku$1@dont-email.me> <ssrnjv$64h$1@dont-email.me>
Injection-Date: Wed, 26 Jan 2022 17:48:59 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="37d8b2f53a43d2b329551644d66e8ee4";
logging-data="527"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Gj+cO9Mb6Un2j3xFbkDKx"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:R/82tNpF2fREtqhZJUYUjazI2Xw=
 by: William Unruh - Wed, 26 Jan 2022 17:48 UTC

On 2022-01-26, Lew Pitcher <lew.pitcher@digitalfreehold.ca> wrote:
> On Wed, 26 Jan 2022 15:20:04 +0100, Janis Papanagnou wrote:
>
> [snip]
>> [*] I've heard that sendmail configuration is a nightmare.
>
> Sendmail configuration is indeed complex, mostly due to the
> archaic form of it's configuration file, and the variety of options
> available for mail handling.

Many distributions now use postfix as the mail sender/receiver, not
sendmail. It has a "sendmail" stub to make software think that it is
sendmail that is being used. Check what you are using first.

Re: Sending mail from command line

<sss28o$8g7$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4919&group=comp.unix.shell#4919

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 19:00:56 +0100
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <sss28o$8g7$1@dont-email.me>
References: <ssrlak$ku$1@dont-email.me> <slrnsv2qk8.pg3.fenris@rie.sdf.org>
<ssrrt7$jg2$1@dont-email.me> <j5del9F1fi3U1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 18:00:56 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="72a7e2e2612ad0258f11c695c52352a7";
logging-data="8711"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wmB2541eSamgwkMN62I7c"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:y3h6M3eF2Yf0+Grr1nV3DqCVFrc=
In-Reply-To: <j5del9F1fi3U1@mid.individual.net>
 by: Janis Papanagnou - Wed, 26 Jan 2022 18:00 UTC

On 26.01.2022 18:28, John-Paul Stewart wrote:
> On 2022-01-26 11:12, Janis Papanagnou wrote:
>> On 26.01.2022 16:36, Fenris wrote:
>>> On 2022-01-26, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>>>> mailx -s "Test results" me@my.domain.invalid <<EOT
>>>> message to deliver
>>>> ...
>>>> EOT
>>>>
>>>> Now on Linux/Ubuntu I get that error
>>>>
>>>> WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-.../pkcs11:
>>>> No such file or directory
>>>> send-mail: Authorization failed (535 Incorrect authentication data)
>>>> Can't send mail: sendmail process failed with error code 1
>>>
>>> Very strange. Maybe some unusual crontab variables set?
>>
>> This error was just the result of a try from the command line, no cron
>> involved here.
>
> In that case, check your environment for any GNOME_KEYRING_* variables.
> If there are any, unset them and re-try your mailx command.

There are two such variables. Clearing or unset'ing them for the mailx
command has no effect, though; same error...

send-mail: Authorization failed (535 Incorrect authentication data)
Can't send mail: sendmail process failed with error code 1

Janis

Re: Sending mail from command line

<sss3ag$b8s$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4920&group=comp.unix.shell#4920

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: unr...@invalid.ca (William Unruh)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 18:18:56 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <sss3ag$b8s$1@dont-email.me>
References: <ssrlak$ku$1@dont-email.me> <slrnsv2qk8.pg3.fenris@rie.sdf.org>
<ssrrt7$jg2$1@dont-email.me> <j5del9F1fi3U1@mid.individual.net>
<sss28o$8g7$1@dont-email.me>
Injection-Date: Wed, 26 Jan 2022 18:18:56 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="37d8b2f53a43d2b329551644d66e8ee4";
logging-data="11548"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199kPSDklEWjALmuCRm3dFp"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:98rknkxPCb6x6IBpl90YY9Q88Ic=
 by: William Unruh - Wed, 26 Jan 2022 18:18 UTC

On 2022-01-26, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
> On 26.01.2022 18:28, John-Paul Stewart wrote:
>> On 2022-01-26 11:12, Janis Papanagnou wrote:
>>> On 26.01.2022 16:36, Fenris wrote:
>>>> On 2022-01-26, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>>>>> mailx -s "Test results" me@my.domain.invalid <<EOT
>>>>> message to deliver
>>>>> ...
>>>>> EOT
>>>>>
>>>>> Now on Linux/Ubuntu I get that error
>>>>>
>>>>> WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-.../pkcs11:
>>>>> No such file or directory
>>>>> send-mail: Authorization failed (535 Incorrect authentication data)
>>>>> Can't send mail: sendmail process failed with error code 1
>>>>
>>>> Very strange. Maybe some unusual crontab variables set?
>>>
>>> This error was just the result of a try from the command line, no cron
>>> involved here.
>>
>> In that case, check your environment for any GNOME_KEYRING_* variables.
>> If there are any, unset them and re-try your mailx command.
>
> There are two such variables. Clearing or unset'ing them for the mailx
> command has no effect, though; same error...
>
> send-mail: Authorization failed (535 Incorrect authentication data)
> Can't send mail: sendmail process failed with error code 1

Figure out what your MTA (Mail transfer agent) is. Is it really sendmail, or is it something
like postfix?
Eg on my system (Mageia not Ubuntu):

tunnel:1.0[unruh]>l /sbin/sendmail
lrwxrwxrwx 1 root root 34 Apr 12 2019 /sbin/sendmail -> /etc/alternatives/sendmail-command
l /etc/alternatives/sendmail-command
lrwxrwxrwx 1 root root 26 Apr 12 2019 /etc/alternatives/sendmail-command -> /usr/sbin/sendmail.postfix

(l is an alias for ls -la)

Does regular mail work? What do you use as your normal mailer-- not
mailx I presume. What MTA does it use? It is still working?

>
> Janis
>

Re: Sending mail from command line

<sss7gp$gni$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4921&group=comp.unix.shell#4921

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 20:30:33 +0100
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <sss7gp$gni$1@dont-email.me>
References: <ssrlak$ku$1@dont-email.me> <slrnsv2qk8.pg3.fenris@rie.sdf.org>
<ssrrt7$jg2$1@dont-email.me> <j5del9F1fi3U1@mid.individual.net>
<sss28o$8g7$1@dont-email.me> <sss3ag$b8s$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 19:30:33 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="72a7e2e2612ad0258f11c695c52352a7";
logging-data="17138"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+aRlQHqLcsV8oO0XOQCpRA"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:bhqkapc4lfz57CL6pm7D/UcgdJ4=
In-Reply-To: <sss3ag$b8s$1@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Wed, 26 Jan 2022 19:30 UTC

On 26.01.2022 19:18, William Unruh wrote:
>
> Figure out what your MTA (Mail transfer agent) is. Is it really sendmail, or is it something
> like postfix?
> Eg on my system (Mageia not Ubuntu):
>
> tunnel:1.0[unruh]>l /sbin/sendmail
> lrwxrwxrwx 1 root root 34 Apr 12 2019 /sbin/sendmail -> /etc/alternatives/sendmail-command
> l /etc/alternatives/sendmail-command
> lrwxrwxrwx 1 root root 26 Apr 12 2019 /etc/alternatives/sendmail-command -> /usr/sbin/sendmail.postfix

/usr/sbin/sendmail -> ssmtp

The latter is an executable file.

>
> Does regular mail work? What do you use as your normal mailer-- not
> mailx I presume. What MTA does it use? It is still working?

Yes, as the standard email application I use a Thunderbird client.
As outgoing server there's one at my ISP defined, dedicated to my
account; I haven't configured anything else when I had set it up.

Thinking about it; how would 'mailx' know that outgoing server?
It must be defined somewhere, I suppose.

Janis

Re: Sending mail from command line

<sss8d0$64h$3@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4922&group=comp.unix.shell#4922

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 19:45:36 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <sss8d0$64h$3@dont-email.me>
References: <ssrlak$ku$1@dont-email.me> <slrnsv2qk8.pg3.fenris@rie.sdf.org>
<ssrrt7$jg2$1@dont-email.me> <j5del9F1fi3U1@mid.individual.net>
<sss28o$8g7$1@dont-email.me> <sss3ag$b8s$1@dont-email.me>
<sss7gp$gni$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 26 Jan 2022 19:45:36 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="3f758a171d573b4989e826ab80dff445";
logging-data="6289"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+zX4zj/F4gNyw+g7+63q4crfmYXCmENvU="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:xtbcQojWjUn47T0ehpWZ3QPdoxs=
 by: Lew Pitcher - Wed, 26 Jan 2022 19:45 UTC

On Wed, 26 Jan 2022 20:30:33 +0100, Janis Papanagnou wrote:

> On 26.01.2022 19:18, William Unruh wrote:
>>
>> Figure out what your MTA (Mail transfer agent) is. Is it really sendmail, or is it something
>> like postfix?
>> Eg on my system (Mageia not Ubuntu):
>>
>> tunnel:1.0[unruh]>l /sbin/sendmail
>> lrwxrwxrwx 1 root root 34 Apr 12 2019 /sbin/sendmail -> /etc/alternatives/sendmail-command
>> l /etc/alternatives/sendmail-command
>> lrwxrwxrwx 1 root root 26 Apr 12 2019 /etc/alternatives/sendmail-command -> /usr/sbin/sendmail.postfix
>
> /usr/sbin/sendmail -> ssmtp
>
> The latter is an executable file.
>
>>
>> Does regular mail work? What do you use as your normal mailer-- not
>> mailx I presume. What MTA does it use? It is still working?
>
> Yes, as the standard email application I use a Thunderbird client.
> As outgoing server there's one at my ISP defined, dedicated to my
> account; I haven't configured anything else when I had set it up.
>
> Thinking about it; how would 'mailx' know that outgoing server?
> It must be defined somewhere, I suppose.

mailx (a MUA, or "Mail User Agent") hands it's outgoing email to
postfix (a MTA, or "Mail Transfer Agent") by forking off a child
that runs "sendmail" (in your case, a softlink to postfix).

This sendmail/postfix child process passes the email on to the
next MTA (usually, the email MTA daemon running on your network),
which, in turn, passes the email onward to the receiver. Note that
the postfix child process /can/ transfer the email onward towards
the recipient(s) without a local email MTA daemon.

If you haven't configured postfix to relay email via your ISP's
email server, then it likely tries to deliver the email directly.
Check your system's /etc/postfix/main.cf configuration file for
all the gruesome details.

HTH
--
Lew Pitcher
"In Skills, We Trust"

Re: Sending mail from command line

<sssf6b$9fn$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4923&group=comp.unix.shell#4923

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 22:41:31 +0100
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <sssf6b$9fn$1@dont-email.me>
References: <ssrlak$ku$1@dont-email.me> <slrnsv2qk8.pg3.fenris@rie.sdf.org>
<ssrrt7$jg2$1@dont-email.me> <j5del9F1fi3U1@mid.individual.net>
<sss28o$8g7$1@dont-email.me> <sss3ag$b8s$1@dont-email.me>
<sss7gp$gni$1@dont-email.me> <sss8d0$64h$3@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 21:41:31 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="72a7e2e2612ad0258f11c695c52352a7";
logging-data="9719"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FS2KyWcrPISeuc7D6Ibam"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:NjQmTFJhlQTmE0HnuEqX/NLxSeI=
In-Reply-To: <sss8d0$64h$3@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Wed, 26 Jan 2022 21:41 UTC

On 26.01.2022 20:45, Lew Pitcher wrote:
>
> If you haven't configured postfix to relay email via your ISP's
> email server, then it likely tries to deliver the email directly.
> Check your system's /etc/postfix/main.cf configuration file for
> all the gruesome details.

Hmm.. - beneath /etc I neither found a file or directory named
postfix nor a file main.cf.

Janis

PS: I haven't yet worked through all the posted suggestions and
hints, so I still have to do some homework here...

Re: Sending mail from command line

<slrnsv3hsf.3ga.jj@iridium.wf32df>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4924&group=comp.unix.shell#4924

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jj...@franjam.org.uk (Jim Jackson)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 22:13:35 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <slrnsv3hsf.3ga.jj@iridium.wf32df>
References: <ssrlak$ku$1@dont-email.me> <slrnsv2qk8.pg3.fenris@rie.sdf.org>
<ssrrt7$jg2$1@dont-email.me> <j5del9F1fi3U1@mid.individual.net>
<sss28o$8g7$1@dont-email.me> <sss3ag$b8s$1@dont-email.me>
<sss7gp$gni$1@dont-email.me> <sss8d0$64h$3@dont-email.me>
<sssf6b$9fn$1@dont-email.me>
Injection-Date: Wed, 26 Jan 2022 22:13:35 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="afa15242222e2e09300fa4bba2a9a6b4";
logging-data="18477"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18AtFUmx5cdPtLordnZ7x7tqNcAS3RTl/g="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:YMrDnD7KEX6xpTF5ke3j046qOS0=
 by: Jim Jackson - Wed, 26 Jan 2022 22:13 UTC

On 2022-01-26, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
> On 26.01.2022 20:45, Lew Pitcher wrote:
>>
>> If you haven't configured postfix to relay email via your ISP's
>> email server, then it likely tries to deliver the email directly.
>> Check your system's /etc/postfix/main.cf configuration file for
>> all the gruesome details.
>
> Hmm.. - beneath /etc I neither found a file or directory named
> postfix nor a file main.cf.
>
> Janis
>
> PS: I haven't yet worked through all the posted suggestions and
> hints, so I still have to do some homework here...

Didn't I see you reference something called "ssmtp" ?
That's a program for sending email. So "man ssmtp" should give you more info.
Also try this page...

https://linuxhandbook.com/linux-send-email-ssmtp/

If I recalled wrongly, then apologies for the noise.

Re: Sending mail from command line

<ssskno$lj2$1@tncsrv09.home.tnetconsulting.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4925&group=comp.unix.shell#4925

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.alpha.home.tnetconsulting.net!not-for-mail
From: gtay...@tnetconsulting.net (Grant Taylor)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 16:16:15 -0700
Organization: TNet Consulting
Message-ID: <ssskno$lj2$1@tncsrv09.home.tnetconsulting.net>
References: <ssrlak$ku$1@dont-email.me> <ssrnjv$64h$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 23:16:08 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="alpha.home.tnetconsulting.net:198.18.18.251";
logging-data="22114"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <ssrnjv$64h$1@dont-email.me>
Content-Language: en-US
 by: Grant Taylor - Wed, 26 Jan 2022 23:16 UTC

On 1/26/22 7:59 AM, Lew Pitcher wrote:
> Sendmail configuration is indeed complex, mostly due to the archaic
> form of it's configuration file, and the variety of options available
> for mail handling.

As much as I might not like it, I agree with this statement.

> However, depending on your distro, your installation may have come
> with one or more sample configurations, most of which are relatively
> easy to modify for use.

I don't think I've used distribution provided templates before. I
usually use the generic templates that come with the (various) Sendmail
(cf|config) package(s).

> I personally run sendmail as my public MTA, with some custom config
> changes to handle miltering (raw email filtering) and secured outbound
> email relaying (through my ISP's MTA). My sendmail.mc file runs 22
> lines (excluding comments), and only differs from my distro's stock
> sendmail.mc by 4 lines.

I also run Sendmail, by choice, as my MTA.

> FWIW, I can recommend
> "sendmail"
> by Bryan Costales with Eric Allman
> O'Reilly & Associates
> ISBN 1-56592-222-0
> as a /really/ good book on the subject, and
> "sendmail Cookbook"
> by Craig Hunt
> O'Reilly & Associates
> ISBN 0-596-00471-0
> as a good guide to some common (and uncommon) configuration requirements.

I'm sure those are wonderful sources of Sendmail information. However
I'm quite certain that I would definitely *NOT* recommend that someone
who simply wants to get an MTA function to send email read them. I
would, and have, recommended both of them to someone who wanted to learn
more about Sendmail specifically.

These books fall into the category of telling you how to build a clock
before telling what time to set it to.

--
Grant. . . .
unix || die

Re: Sending mail from command line

<sssl0b$rl0$1@tncsrv09.home.tnetconsulting.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4926&group=comp.unix.shell#4926

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.alpha.home.tnetconsulting.net!not-for-mail
From: gtay...@tnetconsulting.net (Grant Taylor)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 16:20:50 -0700
Organization: TNet Consulting
Message-ID: <sssl0b$rl0$1@tncsrv09.home.tnetconsulting.net>
References: <ssrlak$ku$1@dont-email.me> <slrnsv2qk8.pg3.fenris@rie.sdf.org>
<ssrrt7$jg2$1@dont-email.me> <slrnsv2tuv.5nd.fenris@rie.sdf.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 23:20:43 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="alpha.home.tnetconsulting.net:198.18.18.251";
logging-data="28320"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <slrnsv2tuv.5nd.fenris@rie.sdf.org>
Content-Language: en-US
 by: Grant Taylor - Wed, 26 Jan 2022 23:20 UTC

On 1/26/22 9:33 AM, Fenris wrote:
> Maybe running `killall gnome-keyring-daemon' before the command?

I would avoid doing that.

Especially if you're using the gnome-keyring-daemon as the ssh agent
managing keys.

This suggestion seems akin to a scream test to me.

> Just to approach that "gnome-keyring" is the problem but not sendmail etc.

I don't think that the Gnome keyring, nor Sendmail (the program) is the
OPs problem.

--
Grant. . . .
unix || die

Re: Sending mail from command line

<sssl42$rl0$2@tncsrv09.home.tnetconsulting.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4927&group=comp.unix.shell#4927

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.alpha.home.tnetconsulting.net!not-for-mail
From: gtay...@tnetconsulting.net (Grant Taylor)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 16:22:50 -0700
Organization: TNet Consulting
Message-ID: <sssl42$rl0$2@tncsrv09.home.tnetconsulting.net>
References: <ssrlak$ku$1@dont-email.me> <j5db4lFqc8U1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 23:22:42 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="alpha.home.tnetconsulting.net:198.18.18.251";
logging-data="28320"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <j5db4lFqc8U1@mid.individual.net>
Content-Language: en-US
 by: Grant Taylor - Wed, 26 Jan 2022 23:22 UTC

On 1/26/22 9:28 AM, John-Paul Stewart wrote:
> Be aware that on Ubuntu, "sendmail" may not actually be the original
> sendmail program. Almost all Message Transfer Agents (MTAs) install
> a /usr/bin/sendmail program or symlink.

The sendmail (executable) has become a defacto command line interface
for sending email, be it the actual Sendmail (program) or Postfix
(program) or something else.

I consider the sendmail (executable) to be (ab)used in the same way as
an API.

--
Grant. . . .
unix || die

Re: Sending mail from command line

<87wnimkrd8.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4928&group=comp.unix.shell#4928

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Wed, 26 Jan 2022 15:29:55 -0800
Organization: None to speak of
Lines: 32
Message-ID: <87wnimkrd8.fsf@nosuchdomain.example.com>
References: <ssrlak$ku$1@dont-email.me> <slrnsv2qk8.pg3.fenris@rie.sdf.org>
<ssrrt7$jg2$1@dont-email.me> <j5del9F1fi3U1@mid.individual.net>
<sss28o$8g7$1@dont-email.me> <sss3ag$b8s$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: reader02.eternal-september.org; posting-host="bf54849e5746b429a73bee48b359de83";
logging-data="18307"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198W/DCvec64autf2iS1DHr"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:qKjQrxCb/EHiPIXkNqgh7DNyY1A=
sha1:vLsBj7L7WJlkVdeIQYjlD9KKk08=
 by: Keith Thompson - Wed, 26 Jan 2022 23:29 UTC

William Unruh <unruh@invalid.ca> writes:
[...]
> Figure out what your MTA (Mail transfer agent) is. Is it really sendmail, or is it something
> like postfix?
> Eg on my system (Mageia not Ubuntu):
>
> tunnel:1.0[unruh]>l /sbin/sendmail
> lrwxrwxrwx 1 root root 34 Apr 12 2019 /sbin/sendmail -> /etc/alternatives/sendmail-command
> l /etc/alternatives/sendmail-command
> lrwxrwxrwx 1 root root 26 Apr 12 2019 /etc/alternatives/sendmail-command -> /usr/sbin/sendmail.postfix
>
> (l is an alias for ls -la)

On my Ubuntu 20.04 system:

$ type sendmail
sendmail is /usr/sbin/sendmail
$ ls -l /usr/sbin/sendmail
-rwxr-xr-x 1 root root 35128 Sep 6 23:58 /usr/sbin/sendmail
$ dpkg -S /usr/sbin/sendmail
postfix: /usr/sbin/sendmail
$ยท

The point being that just listing the sendmail executable might not tell
you what it is. ("dpkg -S" tells you what package provides a given
file. You'll need to use some other command on a system that's not
Debian-based.)

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */

Re: Sending mail from command line

<sssubh$rs8$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4929&group=comp.unix.shell#4929

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: unr...@invalid.ca (William Unruh)
Newsgroups: comp.unix.shell
Subject: Re: Sending mail from command line
Date: Thu, 27 Jan 2022 02:00:17 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <sssubh$rs8$1@dont-email.me>
References: <ssrlak$ku$1@dont-email.me> <slrnsv2qk8.pg3.fenris@rie.sdf.org>
<ssrrt7$jg2$1@dont-email.me> <j5del9F1fi3U1@mid.individual.net>
<sss28o$8g7$1@dont-email.me> <sss3ag$b8s$1@dont-email.me>
<sss7gp$gni$1@dont-email.me>
Injection-Date: Thu, 27 Jan 2022 02:00:17 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c9bf5ca60cec225d9c88e257660912dd";
logging-data="28552"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18QBIhNeZXO/OZ5kCQr9tEC"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:pilGXswvIS9lLpaABF69T5sLDYs=
 by: William Unruh - Thu, 27 Jan 2022 02:00 UTC

On 2022-01-26, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
> On 26.01.2022 19:18, William Unruh wrote:
>>
>> Figure out what your MTA (Mail transfer agent) is. Is it really sendmail, or is it something
>> like postfix?
>> Eg on my system (Mageia not Ubuntu):
>>
>> tunnel:1.0[unruh]>l /sbin/sendmail
>> lrwxrwxrwx 1 root root 34 Apr 12 2019 /sbin/sendmail -> /etc/alternatives/sendmail-command
>> l /etc/alternatives/sendmail-command
>> lrwxrwxrwx 1 root root 26 Apr 12 2019 /etc/alternatives/sendmail-command -> /usr/sbin/sendmail.postfix
>
> /usr/sbin/sendmail -> ssmtp

So it seems that you use ssmtp as your MTA. That is supposed to be a
simple message transfer agent.
It appears to have its setup in /etc/ssmtp/ssmtp.conf, which probably
includes the server. It may be that it only uses the server if the mail
is not local mail (in fact the server could not handle local mail at all
anyway, as it is probably on its own private network hidden from the
outside world). Thus ssmtp tries to send it to a local machine, and that
machine is not running ssl for the mail receiving, and it thus craps
out. This is all a guess, since I have no idea how ssmtp world or what
your network topology is or almost anything else about your system.

>
> The latter is an executable file.
>
>>
>> Does regular mail work? What do you use as your normal mailer-- not
>> mailx I presume. What MTA does it use? It is still working?
>
> Yes, as the standard email application I use a Thunderbird client.
> As outgoing server there's one at my ISP defined, dedicated to my
> account; I haven't configured anything else when I had set it up.
>
> Thinking about it; how would 'mailx' know that outgoing server?
> It must be defined somewhere, I suppose.
>
> Janis
>

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor