Activities

July 2014
M T W T F S S
« Jun   Aug »
 123456
78910111213
14151617181920
21222324252627
28293031  

Enabling multiple SMTP ports on Postfix email server

One of my friends who working on a persoanl project have the issue with sending email from his home internet connection. Most of the ISP’s will block the external/outbound access towards the smtp port[25] in their firewall to avoid spamming and increase the IP reputation of their network.

Even though it is a good approach but it may hurt the users those are using Outlook or any other MUA configured either on systems or mobile devices. Users cant send emails from it !!

In order to address the issue, I need to configure my postfix server to listen on another nonstandard higher port which is free from ISP’s blocking.

Here are the steps,

Open Postfix main configuration file (/etc/postfix/master.cf) and add the newline as shown below,

2525 inet n – – – – smtpd

And then restart the postfix service

[root@mail ~]# service postfix restart
Shutting down postfix:                                     [  OK  ]
Starting postfix:                                          [  OK  ]
[root@mail ~]#

My configuration file (/etc/postfix/master.cf) wil looks like showing below after the modification.

# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
2525      inet  n       -       -       -       -       smtpd
#submission inet n       -       n       -       -       smtpd
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING

Since I’m using Amazon EC2 service, I may need to open this port (2525) in security group to have public access. You can Telnet to verify the port availability.

[root@rc-025 trunk]# telnet mail.asdsing.com 2525
Trying 54.201.68.82...
Connected to mail.asding.com (54.201.68.82).
Escape character is '^]'.
220 mail.asding.com ESMTP Postfix

enjoy 🙂

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>