Topic: Problem with iRedMail 0.9.0, backupmx and custom relay broken
======== Required information ====
- iRedMail version: 0.9.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Debian 7
- Related log if you're reporting an issue:
====
Hello Zhang,
Today I upgraded to the newest iRedMail 0.9.0 release (including iRedAPD etc...) according to your manual.
Thank you very much for your great software and documentation!
Unfortunately I discovered a problem and I would like to get your feedback about that issue.
Problem summary:
=================
BackupMX and custom SMTP relay is broken since 0.9.0
Why is this feature used:
=======================
We are accepting email for example.com, scan them for viruses, malware, do graylisting etc. If the email message is clean, it is relayed to the destination SMTP server. This function is somewhat like a SMTP firewall and scanning service for servers which shall not be reachable from the internet (like microsoft exchange)
Problem description:
===================
In the MySQL database vmail/domains the domain example.com has backupmx=1 and a custom SMTP relay setting smtp:[1.2.3.4]
This is done in order to accept the email messages but without checking the presence of the mailbox (which does not work for obvious reasons)
In the update description you tell to modify the transport_maps_domain.cf file in order to check if backupmx is 0
See:
http://www.iredmail.org/docs/upgrade.ir … query-file
Now incoming email messages for all customers subscribed to this feature are not forwarded anymore.
Postfix tries to send email to the MX record of the domain (to itself!!!) although even it shall send it to the configured transport setting in the database.
The web interface of iRedAdmin-Pro MySQL (1.9.0) the setting "Mark as backup MX" is grayed out and the question mark shows "Backup MX does not work with custom relay"
IMHO the new version does break a previously working and useful feature.
I reverted the modification to the transport_maps_domain.cf but iRedAdmin-Pro does still force the invalid setting
Please let me know.
Best regards,
Bernhard
----
Some logs:
Postfix sends email to itself (IP address hidden, connection timed out due to firewall NAT)
Jan 5 09:13:44 mail postfix/smtp[5190]: A973D29847: to=<xxx@example.com>, relay=none, delay=1094, delays=1063/0.03/30/0, dsn=4.4.1, status=deferred (connect to mail.xxxx.net[xx.xx.xx.xx]:25: Connection timed out)
This is how it shall look like:
Jan 5 09:55:29 mail postfix/smtp[6209]: C928E200AE: to=<xxx@example.com>, relay=xx.xx.xx.xx[xx.xx.xx.xx]:25, delay=0.46, delays=0.02/0.02/0.02/0.4, dsn=2.6.0, status=sent (250 2.6.0 <xxxx@gmail.com> [InternalId=378] Queued mail for delivery)
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.