Open smtp, imap and pop3 through iptables

September 17, 2013 6.9k views
I have zpanel installed on ubuntu and i have set up iptables as DO instructed. I can send emails but not receive, so i believe it is down to a port not being open in iptables. Can someone please tell me how to open SMTP, POP3 and IMAP in iptables?
10 Answers
I have been doing research and i think i need to set up MX records?
Can someone please tell me how to and what i should put in as mx records for my zpanel ?
Add an A record:

Name: mail

Hostname/Value: (your droplet's IP address)

Then add an MX record:

Priority: 5

Hostname: mail

Wait a couple of hours until the DNS recrods propagate and try sending an email again.
Thank you. I have now done that i shall wait a couple hours.

It was actually that i can send emails through webmail but i am not receiving them.

Would the MX record affect incoming records too?
The MX records only handle incoming mail so I believe that's your issue.
Thank you. Hopefully it will work :)
I know i am maybe rushing things. I have left it one hour and it still appears not to be receiving emails in webmail ? Could it be the pop3 or imap port also?
@cameron: Try now, does it work? Also check zPanel's mail logs and see if there are any issues
@kamal Just tried it now and nope nothing. I have tried two email address on the same domain and nothing.

Where would i find those logs?
Had look round and cant find the logs
Port 25 isn't open on your droplet -- did you install a firewall/do you have an MTA running?
Have another answer? Share your knowledge.