Topic: Configure iRedMail to forward emails to test server.
iRedMail 1.4 on main server and 1.6.2 on test server.
Downloadable installers.
Ubuntu 20.04 on main server and 22.04 on test server.
PostgreSQL
Nginx
Manage email accounts with iRedAdmin (not pro)
I have been using iRedMail for years without issue. I would like to perform some testing on a test server. The test iRedMail server is also working as it should. The problem is that I have only one IP address to work with for testing so I need to pass emails destine for the test server through the main server.
DNS was already working for the main server at linxco-inc.com. There's an A record and an MX record. I've created a new A record for the test server named pimail. I also created an MX record for the test server that points pimail.linxco-inc.com to the pimail sub domain.
Both servers are on my internal netowk/domain. Within the main server are two mail domains named linxco-inc.com and linxconsultinginc.linxco-inc.com. I don't use the latter mail domain.
The test server machine is named mx.linxco-inc.com and the mail domain on that server is named pimail.linxco-inc.com.
As already stated, I can email to linxco-inc.com from anywhere. I can only email to pimail.linxco-inc.com com from it's local machine.
I used a doucment at webhostinggeeks.com named 'How to setup Postfix Transport to Route the email messages' to configure a transport map to forward messages destined to pimail.linxco-inc.com through the main server. It works but only from my internal network.
The problem is that when I attempt to send an email to pimail.linxco-inc.com from outside my local network (from a comcast account) the message makes it to the main server at linxco-inc.com but is blocked with a message stating that relay access is denied.
I tested with telnet from an external machine and receive the same message. If I add the external IP address of the external machine into mynetworks the email will be passed. I've undone all changes at the moment but I believe that network was added to the configuration of the main server.
Can you provide complete instructions for setting up the transport map and allowing the relay to occur when sending email messages to the pimail server through the main server from any external email server without the need to add the external IP address to the mynetworks list?
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.