Unable to send email from newly provisioned Server on Azure Cloud
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Unable to send email from newly provisioned Server on Azure Cloud
Hey Guys,
Wondering what could be wrong as I'm unable to send mail from RHEL 7.6
Code:
[root@fredjiraserver log]# echo "Talking from $(hostname -s)"| mail -s "Test Subject" testme@gmail.com
[root@fredjiraserver log]# send-mail: Cannot open mail:25
[root@fredjiraserver log]# mailx
No mail for root
[root@fredjiraserver log]# mail
No mail for root
[root@fredjiraserver log]# echo "Talking from $(hostname -s)"| mail -s "Test Subject" test@gmail.com
[root@fredjiraserver log]# send-mail: Cannot open mail:25
[root@localhost log]# tail -100f /var/log/maillog
Mar 29 10:00:19 localhost sSMTP[6274]: Unable to locate mail
Mar 29 10:00:19 localhost sSMTP[6274]: Cannot open mail:25
Mar 29 10:00:28 localhost sSMTP[6283]: Unable to locate mail
Mar 29 10:00:28 localhost sSMTP[6283]: Cannot open mail:25
Mar 29 10:07:28 localhost sSMTP[12543]: Unable to locate mail
Mar 29 10:07:28 localhost sSMTP[12543]: Cannot open mail:25
Mar 29 12:07:50 localhost sSMTP[18016]: Unable to locate mail
Mar 29 12:07:50 localhost sSMTP[18016]: Cannot open mail:25
Mar 29 12:10:28 localhost sSMTP[18257]: Unable to locate mail
Mar 29 12:10:28 localhost sSMTP[18257]: Cannot open mail:25
Mar 29 13:46:21 localhost sSMTP[22355]: Unable to locate mail
Mar 29 13:46:21 localhost sSMTP[22355]: Cannot open mail:25
[root@localhost log]# systemctl status mailx
Unit mailx.service could not be found.
[root@localhost log]# systemctl status mail
Unit mail.service could not be found.
[root@localhost log]# cat /etc/*release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.6 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.6"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.6 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.6:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.6
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.6"
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Red Hat Enterprise Linux Server release 7.6 (Maipo)
[root@localhost log]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Is it because a daemon is not running or the mailx or mail package is not installed?
P.S: mailx is there, mail package does not exist.
Code:
Package mailx-12.5-19.el7.x86_64 already installed and latest version
Nothing to do
yum install mail
Loaded plugins: langpacks, product-id, search-disabled-repos
No package mail available.
Error: Nothing to do
Last edited by sysmicuser; 03-28-2019 at 10:04 PM.
The below returns nothing, would Red Hat for a free Azure VM, I wonder? I just want an empty standalone server to send email to my Gmail, so we need a client? not server?
This is what I get when I run the subscription status command on the newly provisioned server.
Code:
subscription-manager status
+-------------------------------------------+
System Status Details
+-------------------------------------------+
Overall Status: Unknown
WARNING
The yum/dnf plugins: /etc/yum/pluginconf.d/subscription-manager.conf were automatically enabled for the benefit of Red Hat Subscription Management. If not desired, use "subscription-manager config --rhsm.auto_enable_yum_plugins=0" to block this behavior.
The below returns nothing, would Red Hat for a free Azure VM, I wonder? I just want an empty standalone server to send email to my Gmail, so we need a client? not server?
My sincere apologies if I sound stupid.
Code:
[root@localhost log]# netstat -tnl | grep 25
Then, no, you do not have a server (sendmail, postfix, qmail, etc) running, so there's nothing to send email with. We can't tell from this if you have a server installed.
You can configure your client to use gmail instead of your server, if you don't want to run a mail server. See man mail
[strike]Aren't you paying RedHat for licensing and support? If not, you shouldn't be using it.[\strike]
Edit: On further thought, it may be included.
"Stupid is as stupid does" -- Forrest Gump
You do not sound stupid.
Do you know how to
1. See if postfix is installed on your server
2. Start it if it is installed?
"No" is an acceptable answer, but if you do know how to do those things, please do them and report back.
Sincerely appreciate your assistance. We as an organization have a mail server, Office 365 mail server so should I still install a mail server on my RHEL 7.6 server? If I don't wish to use Office mail server, do I have to install postfix to set up a mail server?
I don't know much about Postfix, however, I ran and it seems it is not running.
Code:
systemctl status postfix
Unit postfix.service could not be found.
I also looked at the rpm/yum, to check if the package is installed. Unfortunately, it is not installed.
Code:
rpm -qa|grep postfix
>> No output.
yum whatprovides postfix
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
2:postfix-2.10.1-6.el7.x86_64 : Postfix Mail Transport Agent
Repo : rhui-rhel-7-server-rhui-rpms
2:postfix-2.10.1-7.el7.x86_64 : Postfix Mail Transport Agent
Repo : rhui-rhel-7-server-rhui-rpms
My assumption is when we use Public Cloud RHEL 7.6, the subscription is already paid for the duration we have our server up and running? From the output, apparently, that's not the case. This system is not registered with an entitlement server. You can use subscription-manager to register.
Please assist me Sean. Appreciate your assistance.
You should be able to configure mailx to use your Office 365 mail server...but I don’t know how to do that.
If you don’t want to use that server, then, yes, you’ll need to install and configure an MTA. Postfix is, I think, the current “best” choice, but I don’t know it either...
You probably need to register the server with Red Hat to be able to use their repositories.
I don’t know if your assumption about the subscription is correct. Try to register. See what happens.
My assumption: If the server is free, the subscription is not included.
The bottom line: What, exactly, are you wanting to accomplish with this (apparently) new server?
I want Jira to send outgoing emails from this server. It is unable to send at the moment, so, I checked if I can at least emails from the server itself. Unfortunately, it was not hence, I am trying to see if the mailx/mail can send emails from the server itself. If that works then the application can also send emails. Else it becomes a complex issue to solve.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.