1

Topic: Relay or SMTP Port Change

==== Required information ====
- iRedMail version (check /etc/iredmail-release): v0.9.5
- Linux/BSD distribution name and version: Ubuntu 14.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? yes
- Related log if you're reporting an issue:
====

Basically, my issue is this. I'd like to use my setup of iRedMail on AWS for all of my applications that require email. Unfortunately, one of my projects is hosted on GCE. I'm looking for a way around their port blocking without needing the extra layer of a VPN connection. Is there a way for postfix to listen on an extra port for incoming client connections or setup a separate relay listening on a different port on the same mail server so that it can receive mail from my application?

----

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

2

Re: Relay or SMTP Port Change

You can append this to your Postfix configuration in /etc/postfix/master.cf
This will make another submission service (port 587) on new port.

new_port inet n       -       n       -       -       smtpd
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  -o content_filter=smtp-amavis:[127.0.0.1]:10026

Change "new_port" to unused port and open it in iptables.

If you want additional port with no secure connection, follow this guide:
http://www.iredmail.org/docs/additional.smtp.port.html

Hope this solves the problem.
If you have any more question, just ask smile

3

Re: Relay or SMTP Port Change

Thank you so much! I'm having a couple issues with connecting to the port I chose however. One is unrelated and has to do with my remote ssmtp setup for php mail() but the other is I'm having trouble connecting telenet to test the port I chose 2525. I can connect from the server and my workstation but not the application or other remote tool. Does this have to do maybe with fail2ban or some other firewall?

brix wrote:

You can append this to your Postfix configuration in /etc/postfix/master.cf
This will make another submission service (port 587) on new port.

new_port inet n       -       n       -       -       smtpd
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  -o content_filter=smtp-amavis:[127.0.0.1]:10026

Change "new_port" to unused port and open it in iptables.

If you want additional port with no secure connection, follow this guide:
http://www.iredmail.org/docs/additional.smtp.port.html

Hope this solves the problem.
If you have any more question, just ask smile

4

Re: Relay or SMTP Port Change

Did you open the port in iptables? Do you have any other firewall in front of the server? Then open the port also there.

5

Re: Relay or SMTP Port Change

The issue was that the server I was working from didn't have its ports open. Additionally my ssmtp setup ran into errors because postfix was not authenticating against LDAP correctly. Thanks for your help!

brix wrote:

Did you open the port in iptables? Do you have any other firewall in front of the server? Then open the port also there.