Topic: Proper way to accept email from outside servers for local account
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.4.2
- 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? Plain iRedAdmail
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hello,
thanks for this software and all your hard work.
I have the following setup:
I have a domain example.com and an account info@example.com. These work as they should. As example.com is an e-shop, I need to send emails from the e-shop using an outside service (in my case Mailgun) for improved deliverability. This works OK for clients but when the e-shop tries to send an email (for example a New order notification) to the iRedMail server it fails:
Jan 10 15:25:47 mail postfix/smtpd[1690131]: NOQUEUE: reject: RCPT from m239-4.eu.mailgun.net[185.250.239.4]: 550 5.1.0 <bounce+0f28da.2db60-info=example.com@example.com>: Sender address rejected: User unknown; from=<bounce+0f28da.2db60-info=example.com@example.com> to=<info@example.com> proto=ESMTP helo=<m239-4.eu.mailgun.net>
Mailgun reports:
5.1.0 <bounce+0f28da.2db60-info=example.com@example.com>: Sender address rejected: User unknown
Now I understand this is a default security setting, as this could well be a forged email. However I need this functionality.
What is the best way for iRedMail to accept the emails sent from an external service like Mailgun even if the domain and account exist?
Thanks in advance!
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.