Topic: Use iRedmail as relay/smart host for one domain
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.7.4 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? Downloadable installer.
- Linux/BSD distribution name and version: Ubuntu 22.04.5 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Nope
====
Here's what I try to accomplish:
I want my iRedmail server to receive mail for several domains. The email for one (1) of these domains should be re-routed to another email server and then also be able to act as a smart relay for that email server and that domain.
Incoming email:
Internet -> iRedmail -> Postfix on other server -> local mailbox
Outgoing email:
User writes email -> Postfix on other server -> iRedmail -> Internet
---------
I have been trying to get this to work for many hours now. What I have tried so far:
Created /etc/postfix/transport and entered the following info into it:
domain.tld relay:[server.hostname.tld]:port
I then ran postmap /etc/postfix/transport
I then added that file to /etc/postfix/main.cf:
transport_maps =
hash:/etc/postfix/transport
----------
This works if I send email locally on the iRedmail server. If I send an email from Gmail or something I get "Relay access denied" from Postfix on my iRedmail server. I can send email from the other server to a user on the iRedmail server without any problems. If I try to send email from the other server to Gmail or something, I get "relay denied".
Any ideas?
Thanks.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.