Topic: Use iRedMail as relay to GSuite
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.1
- Deployed with iRedMail Easy or the downloadable installer? DLable installer
- Linux/BSD distribution name and version: Debian 10.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
My compagny decides to change our mail system. From iRedMail we go to GSuite.
Some of our printers send mails. GSuite has a functionnality called "Less secure App" wich is going to be disabled by Google next february. Without this functionnality, printers cannot send mail because of the 2 auth of GSuite.
I decided to make a fresh server, using iRedMail to relay mails sended by "less secure" hardware to Google.
To do so, I created a domain (let's say mydomain.fr) - this domain was managed by irRedMail in the past and have been moved to GSuite- in my fresh iredmail install and in this domain, I created accounts dedicated to the printers (lets say email@example.com). I also setup in the domain profile, under "relay" : "relay outgoing emails to" : smtp-relay.gmail.com:587
If a printer sends a mail to firstname.lastname@example.org (outside mydomain.fr), it works.
If a printer sends a mail to email@example.com, it fails.
The mail.log is the following :
NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <firstname.lastname@example.org>: Recipient address rejected: User unknown; from=<email@example.com> to=<firstname.lastname@example.org> proto=ESMTP helo=<localhost>
Obviously, the account "email@example.com" is now stored in GSuite and not in iRedMail.
How to tell to iRedAdmin to not to check if a recipient address exists, and to forward unconditionally to GSuite ?
I also changed those two Postfix option from "Yes" to "No" but without success :
# Reject unlisted sender and recipient
smtpd_reject_unlisted_recipient = no
smtpd_reject_unlisted_sender = no
Hope I was clear in my explanations