Topic: Send emails to the same domain as the server but not locally
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.1 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? Downloadable
- Linux/BSD distribution name and version: Ubuntu 20.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Nop
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hi,
I have a problem with iRedMail / Postfix, I also have the impression that my "mydestination" variable is not taken into account.
Let me explain :
I own the domain "xyz".com
My server is only used to send commercial emails, so we have another mail server for sending and receiving message, this mail server is intended, only for the use of our CRM
Sometimes a copy needs to be sent to the commercial who sent the mail, in other words, I would like commercial@xyz.com receive a copy
Except that as the commercial@xyz.com is not found locally, the e-mail is not sent and it never receives its copy.
I can put in main.cf
mydestination =
Iredmail / Postfix continues to want to deliver the message locally without going out to my domain's DNS zone.
As a result, I don't really understand what's going on.
# Accepted local emails
mydestination =
#mydestination = $myhostname, localhost, localhost.localdomain
Test from Rouncube or other :
postfix/submission/smtpd[6572]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <mto@xyz.com>: Recipient address rejected: User unknown; from=<contact@xyz.com> to=<mto@xyz.com> proto=ESMTP helo=<localhost>
Oct 22 11:58:16 sendmails roundcube: <sl9h97uu> PHP Error: Invalid response code received from server (POST /mail/?_task=mail&_unlock=loading1603360696357&_framed=1&_lang=en&_action=send)
Oct 22 11:58:16 sendmails roundcube: <sl9h97uu> SMTP Error: Failed to add recipient 'mto@xyz.com'. 5.1.1 <mto@xyz.com>: Recipient address rejected: User unknown (Code: 550) in /opt/www/roundcubemail-1.4.7/program/lib/Roundcube/rcube.php on line 1702 (POST /mail/?_task=mail&_unlock=loading1603360696357&_framed=1&_lang=en&_action=send)
Oct 22 11:58:16 sendmails postfix/submission/smtpd[6572]: disconnect from localhost[127.0.0.1] ehlo=2 starttls=1 auth=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=7/8
Any idea ?
Thank you for your help !
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.