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.
[*] I've heard that sendmail configuration is a nightmare.
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?
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
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.
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.
[...]
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
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?
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.
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.
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.
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.
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.
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.
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
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
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?
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.
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.
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...
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.
Maybe running `killall gnome-keyring-daemon' before the command?
Just to approach that "gnome-keyring" is the problem but not sendmail etc.
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)
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.
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
* Is there some other (preferred, simpler, or without crypto demands) interface or tool to send emails automatically from a shell script?
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.
On Wed, 2022-01-26, William Unruh wrote:
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.
I haven't checked this, but it's also possible that it was the other way around: sendmail the utility for local mail delivery being older than Sendmail the daemon.
On 2/15/22 12:23 AM, Jorgen Grahn wrote:
I haven't checked this, but it's also possible that it was the other
way around: sendmail the utility for local mail delivery being older
than Sendmail the daemon.
Um....
I guess that's not outside of the realm of possibility. Though I think
it's unlikely for a couple of reasons. Sendmail is quite old, going
back to when there weren't very many choices. More importantly, why
would a utility that predates "Sendmail" have it's name?
My understanding is that Sendmail, the MTA that we either love or loath,
goes back to (at least) the early '90s, if not the '80s, and was a
re-write / port of send-mail, it's predecessor, on some platform that
might not have been Unix.
What am I misremembering?
I haven't checked this, but it's also possible that it was the other
way around: sendmail the utility for local mail delivery being older
than Sendmail the daemon.
From...
https://www.oreilly.com/library/view/sendmail-3rd-edition/1565928393/ pr03s03.html
and so on
On 2/15/22 12:50 PM, Lew Pitcher wrote:
From...
https://www.oreilly.com/library/view/sendmail-3rd-edition/1565928393/
pr03s03.html
and so on
Most of that matches what I remember. Though I did have the precursor
name wrong. It was "delivermail".
According to wikipedia, unix had the command mail when it started in 71. https://en.wikipedia.org/wiki/Mail_(Unix)
On 2/15/22 6:57 PM, David W. Hodgins wrote:
According to wikipedia, unix had the command mail when it started in 71.
https://en.wikipedia.org/wiki/Mail_(Unix)
My understanding of the mail command is that it qualifies as a Mail User Agent (MUA), meant for composing outgoing email and reading incoming
email. On the other hand, a Mail Transport Agent (MTA), like
delivermail and sendmail, is meant for taking email, nominally from
MUAs, and routing it to where it needs to go, be it local delivery via a Local Delivery Agent (LDA), or a remote MTA via some communications
protocol.
Looks like in the original version, it only worked for sending mail
between users on the same system, so no transport involved.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 107:44:51 |
Calls: | 6,852 |
Calls today: | 3 |
Files: | 12,355 |
Messages: | 5,415,945 |