Support
Forums

Sending mail from the terminal [SOLVED]

I use the mail command to send myself messages from automatically-running scripts so that I know that all is OK – or not. It’s helpful also as I look after the computing needs of several elderly people, and if they haven’t backed-up or upd...

I use the mail command to send myself messages from automatically-running scripts so that I know that all is OK – or not. It’s helpful also as I look after the computing needs of several elderly people, and if they haven’t backed-up or updated for a while I can give a gentle nudge to do so.

This arrangement worked well for several years until the recent spate of security legislation prompted internet organisations such as email providers to improve their (and our) security, and then nothing worked. And some mail routines such as mpack and swaks are no longer available in Ubuntu.

I’ve got the basic mail routine working now. For example:
mail -s “$USER has backed up” -r my.name@runbox.com my.alias@runbox.com < message-file.txt
where
my.name@runbox.com (“From”) is my registered address with Runbox.com
my.alias@runbox.com (“To”) is an alias address I have with Runbox.com
message-file.txt is the text to appear in the body of the email.

This works well, except that I can send email only to myself (ie to any of my Runbox email accounts), not to any other such as my secondary email account at Protonmail.com or to friends. When sending mail to my.name@proton.me there are no errors reported but the mail does not arrive.

My question is: are any of our readers able to use the mail command to send mail to other people? And if so, can you tell me where I am going wrong?

Thanks.
Keith

18 posts - 2 participants

Read full topic