Topic: BACKUPMX - Recipient address rejected: Policy rejection not logged in
==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6
- Linux/BSD distribution name and version: Ubuntu 16.04LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? yes
- Related log if you're reporting an issue:
Mar 11 21:19:59 postman postfix/smtpd[5281]: NOQUEUE: reject: RCPT from mail.domain2.tld[111.222.333.444]: 554 5.7.1 <receiver@domain.tld>: Recipient address rejected: Policy rejection not logged in; from=<sender@domain2.tld> to=<receiver@domain.tld> proto=ESMTP helo=<server.domain2.tld>
====
Dear Supporteam,
we had the issue that an email could not be sent from one mailserver which is the backup MX of the other.
We found out that the problem is the plugin reject_sender_login_mismatch. It seems that the function is_local_domain in libs/sql/__init__.py gets all domains, even the backup MX domains. So iredAPD wants to block emails that are sent from a domain which belongs to the local server already.
We changed the SQL query in the libs/sql/__init__.py script as following:
sql = """SELECT domain
FROM domain
WHERE domain=%s
AND backupmx=0
LIMIT 1""" % sql_quote_domain
Then the emails arrived.
We want to ask you if this is the right place to change or if there is a better solution. Probably this should be the default.
Thanks for your answer in advance!
Greetings,
Heinz
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.