Page 1 of 1

command line send mail?

Posted: 2020/05/26 07:28:40
by cuongtl
Hi all,
i want to send an email via the script but i dont want to display my password in clear text. Anyone can show me a method?

Thanks in advance!

Re: command line send mail?

Posted: 2020/05/26 10:29:08
by tunk

Re: command line send mail?

Posted: 2020/05/26 22:34:03
by MartinR
Please be aware that the Linux Journal article dates from April 2010. Netcat is NOT available in C7 under the name nc, so don't try installing it! The last stable release appears to have been 13 years ago in 2007.

Now the good news. Nmap developed the original netcat from 2005 onwards under the name ncat. You need to install nmap-ncat and use the ncat command. Disclaimer: this is as far as I've gone, so don't come back asking me questions or blaming me!

Re: command line send mail?

Posted: 2020/05/26 23:00:50
by scottro
Just in general, you can find out what package has a program with yum provides */nc (for example.) On CentOS-8 it's dnf provides but it works the same. I have a dated page on the provides option, because it was asked so frequently when I was a moderator on Fedora forums at
https://www.scottro.net/yumprovides.html but you probably don't even need that. Just if you try yum install netcat or nc and can't find it, you can use the provides option.