Linode Forum
https://forum.linode.com/

Unable to use mail command on CentOS 7
https://forum.linode.com/viewtopic.php?f=11&t=12137
Page 1 of 1

Author:  willemdh [ Mon Aug 10, 2015 12:11 pm ]
Post subject:  Unable to use mail command on CentOS 7

Hello,

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

Author:  sanvila [ Mon Aug 10, 2015 12:53 pm ]
Post subject:  Re: Unable to use mail command on CentOS 7

You need a MTA (mail transfer agent), like exim or postfix, then you need to read the documentation for the chosen MTA,
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.

Author:  willemdh [ Tue Aug 11, 2015 12:47 pm ]
Post subject:  Re: Unable to use mail command on CentOS 7

Thanks Sanvila,

Got is working now. My postfix service wasn't started.

systemctl start postfix

did the trick.

Grtz

Willem

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/