Hi I am trying to send mail using mutt command as below,
mutt -s "test" [email protected] </dev/null
This fails with following error,
sendmail: Cannot open mail:25
Error sending message, child exited 1 ().
Could not send the message.
This issue happens in fedora 22 and fedora 23 machines. I used to run the same in fedora 12 and it works fine
Tried to modify following value in file "/etc/ssmtp/ssmtp.conf"
mailhub=mail
to
mailhub=fqdn_of_my_machine
Still I get similar error as below,
sendmail: Cannot open fqdn_of_my_machine:25
Error sending message, child exited 1 ().
Could not send the message.
Even sendmail I get same error as above,
sendmail [email protected] < /tmp/file1
sendmail: Cannot open fqdn_of_my_machine:25
As natxo mentioned above we need to install smtp package and configure it. So I tried following commands and it worked,