1

Topic: SMTP port 26 - iptables

==== Provide required information to help troubleshoot and get quick answer ====
- Linux/BSD distribution name and version: CentOS 6.2
- iRedMail version and backend (LDAP/MySQL): OpenLDAP 0.7.4
- Any related log? Log is helpful for troubleshooting.
====

I have opened up port 26 in the postfix master.cf because some ISP's reserve port 25 for their SMTP server ONLY. Do you know off the top of your head the command to add an accept in IPTABLES for port 26 but have it also work with fail2-ban, etc.

I know this is off-topic support but figured i'd ask.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: SMTP port 26 - iptables

Open /etc/sysconfig/iptables, and add '26' right after port '25'. Like this:

-A INPUT -p tcp -m multiport --dport 80,443,25,26,110,995,143,993,587,465,22 -j ACCEPT

In Fail2ban, please open /etc/fail2ban/jail.local, add port '26' right after '25'.

3

Re: SMTP port 26 - iptables

Zhang,
I can't seem to find the value for port 25. I am assuming it is listed as "smtp" below, but unsure which values to change


[root@mail ~]# cat /etc/fail2ban/jail.local
#
# File generated by iRedMail (2012.02.08.14.55.08):
#
# Version:  0.7.4
# Project:  http://www.iredmail.org/
#
# Community: http://www.iredmail.org/forum/
#


# Please refer to /etc/fail2ban/jail.conf for more examples.

[ssh-iredmail]
enabled     = true
filter      = sshd
action      = iptables[name=ssh, port="ssh", protocol=tcp]
#               sendmail-whois[name=ssh, dest=root, sender=fail2ban@mail.com]
logpath     = /var/log/secure
maxretry    = 5
#ignoreip    = 127.0.0.1

[roundcube-iredmail]
enabled     = true
filter      = roundcube.iredmail
action      = iptables-multiport[name=roundcube, port="http,https,smtp,smtps,pop3,pop3s,imap,imaps,sieve", protocol=tcp]
logpath     = /var/log/maillog
findtime    = 3600
maxretry    = 5
bantime     = 3600
ignoreip    = 127.0.0.1

[dovecot-iredmail]
enabled     = true
filter      = dovecot.iredmail
action      = iptables-multiport[name=dovecot, port="http,https,smtp,smtps,pop3,pop3s,imap,imaps,sieve", protocol=tcp]
logpath     = /var/log/dovecot.log
maxretry    = 5
findtime    = 300
bantime     = 3600
ignoreip    = 127.0.0.1

[postfix-iredmail]
enabled     = true
filter      = postfix.iredmail
action      = iptables-multiport[name=postfix, port="http,https,smtp,smtps,pop3,pop3s,imap,imaps,sieve", protocol=tcp]
#           sendmail[name=Postfix, dest=you@mail.com]
logpath     = /var/log/maillog
bantime     = 3600
maxretry    = 5
ignoreip    = 127.0.0.1
[root@mail ~]#

4

Re: SMTP port 26 - iptables

Try adding '26,' after 'smtp'.