Unable to use mail command on CentOS 7
I seem to be unable to get the mail command to send an email to my personal gmail address working. I'm running a Linode with CentOS 7.
Tried debugging from cli but I don't get any error or info that would get me any further.
CODE: SELECT ALL
➜ ~ echo "Your message" | mail -s "Message Subject" emailaddress
➜ ~ sudo echo "Your message" | mail -s "Message Subject" emailaddress
➜ ~ echo "Your message" | mailx -s "Message Subject" emailaddress
➜ ~ sudo echo "Your message" | mailx -s "Message Subject" emailaddress
CODE: SELECT ALL
telnet mail.messaging.microsoft.com 25
Trying 207.46.163.247…
Connected to mail.messaging.microsoft.com.
So I tried with mail and mailx but nothing is working. /var/log/maillog is empty.
Any advice is welcome to get this working.
WIllem
2 Replies
whatever it is, as each one has a different way to manipulate or check messages in the queue.
mail and mailx are just mail user agents (MUA), you need to know what happens with the MTA itself.
Got is working now. My postfix service wasn't started.
systemctl start postfix
did the trick.
Grtz
Willem