Ports

What ports do I need to open on my firewall?

This depends on the services you wish to offer, but in principle the main ports you will need open to TCP traffic are:

53 DNS lookup for outgoing mail
110 POP3 services (Also used for mirroring)
143 IMAP services
25 SMTP services
587 SMTP Local Users
443 HTTPS
80 (or 7080 if port 80 is already in use) Webmail HTTP access
7025 Administration HTTPS access
995 Secure POP3 services
993 Secure IMAP services
465 Secure SMTP services
7443 Secure Webmail HTTPS access
7026 Administration HTTP access

Note for 'firewalld' (Linux)


<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Surgemail</short>
<description>This option is for Surgemail from Netwinsite.com</description>
<port protocol="tcp" port="25"/>
<port protocol="tcp" port="106"/>
<port protocol="tcp" port="110"/>
<port protocol="tcp" port="143"/>
<port protocol="tcp" port="465"/>
<port protocol="tcp" port="587"/>
<port protocol="tcp" port="993"/>
<port protocol="tcp" port="995"/>
<port protocol="tcp" port="7025"/>
<port protocol="tcp" port="7026"/>
<port protocol="tcp" port="7080"/>
<port protocol="tcp" port="7110"/>
<port protocol="tcp" port="7443"/>
</service>
The usage is:

cp surgemail.xml /usr/lib/firewalld/services/
firewall-cmd --add-service=surgemail --zone=public --permanent
firewall-cmd --reload

I have more than one IP but only want SurgeMail to listen on one, how?

g_smtp_port <ip:port>

This allows SurgeMail to listen on a specified port and IP, you can add multiple IPs if you wish to listen on more than one and multiple ports also.

eg:
g_smtp_port "1.1.1.1:25, 2.2.2.2:1025"

How do I make SurgeMail bind to one ip for outgoing messages?

In surgemail.ini add the following setting then restart.

g_bind_out "x.x.x.x"



Was this article helpful?