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.
thanks for this software and all your hard work.
I have the following setup:
I have a domain example.com and an account firstname.lastname@example.org. 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: NOQUEUE: reject: RCPT from m239-4.eu.mailgun.net[188.8.131.52]: 550 5.1.0 <email@example.com>: Sender address rejected: User unknown; from=<firstname.lastname@example.org> to=<email@example.com> proto=ESMTP helo=<m239-4.eu.mailgun.net>
5.1.0 <firstname.lastname@example.org>: 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.