By FrankHeijden
I did every step explained in this article: https://www.digitalocean.com/community/tutorials/how-to-configure-a-mail-server-using-postfix-dovecot-mysql-and-spamassassin
However, I am still not able to login within my mail application. Also I noticed, the 993 port is not open, neither is the 587 port. How can I fix this? I am using UFW as my firewall, and it has the current rules setup:
Nginx HTTPS ALLOW Anywhere
OpenSSH ALLOW Anywhere
Postfix SMTPS ALLOW Anywhere
Dovecot Secure IMAP ALLOW Anywhere
587/tcp ALLOW Anywhere
Nginx HTTPS (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)
Postfix SMTPS (v6) ALLOW Anywhere (v6)
Dovecot Secure IMAP (v6) ALLOW Anywhere (v6)
587/tcp (v6) ALLOW Anywhere (v6)
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!
Hi, just a quick note @alexdo, as you can see above from the command output he is using UFW and got his rules in there.
@FrankHeijden Since you followed the tutorial, and setup UFW etc. let’s quickly take a look if the services are running allright:
netstat -nlp | grep 587
netstat -nlp | grep 465
and since UFW is just a frontend of iptables:
iptables -L | grep imap
Hello, @FrankHeijden
You can make sure that the ports are open. You can do this with the following command:
sudo ufw allow 587
sudo ufw allow 993
For more information about UFW, please check this link: https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands
If you prefer to use just iptables:
sudo iptables -A INPUT -p tcp --dport 993 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
sudo iptables -A OUTPUT -p tcp --sport 993 -m conntrack --ctstate ESTABLISHED -j ACCEPT
For more information about iptables you can check this link: https://www.digitalocean.com/community/tutorials/iptables-essentials-common-firewall-rules-and-commands
I hope this helps!
Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.