Question

Why am I getting connection refused error when typing my IP address /webmail after setting up squirrelmail, postfix and dovecot on centos7?

To build the email server I followed this article: https://hostpresto.com/community/tutorials/how-to-setup-an-email-server-on-centos7/

Basically, I want to build an email server using Apache, Postfix, and Dovecot with the squirrelmail as the webmail service. When I finish the instructions in the article provided above I go to the IP address/webmail and get a connection refused error in my browser. I know that Apache is working since I get the proper test page when going to the IP address. I have configured the DNS properly as well with the domain name.

I looked into it further and found something about a default firewall that comes with the centos7 clean install. So i tried to open it up by using the commands in the article: firewall-cmd --permanent --add-service=smtp firewall-cmd --permanent --add-port=587/tcp firewall-cmd --permanent --add-port=465/tcp firewall-cmd --permanent --add-port=110/tcp firewall-cmd --permanent --add-service=pop3s firewall-cmd --permanent --add-port=143/tcp firewall-cmd --permanent --add-service=imaps firewall-cmd --permanent --add-service=http firewall-cmd --reload

However the firewall-cmd command is not found.

I don’t know what else to try to get this thing going or if there is a setting on the droplets that are preventing me from doing this. Usually google helps but I have run out of stuff to search for. Any help is greatly appreciated! Thank you :)

I am using the most basic droplet (1g) with centos7


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

It looks like firewall-cmd might be a reference to which ever firewall service you’re using on your droplet? If firewall-cmd returned with command is not found that means that nothing was applied to your firewall.

After some researching it looks like you may need to be run as root.

Try running the firewall commands as follows:

sudo firewall-cmd --permanent --add-service=smtp
sudo firewall-cmd --permanent --add-port=587/tcp
sudo firewall-cmd --permanent --add-port=465/tcp
sudo firewall-cmd --permanent --add-port=110/tcp
sudo firewall-cmd --permanent --add-service=pop3s
sudo firewall-cmd --permanent --add-port=143/tcp
sudo firewall-cmd --permanent --add-service=imaps
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --reload