1 (edited by broth 2015-01-05 17:01:30)

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 sad

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.

2

Re: Problem with iRedMail 0.9.0, backupmx and custom relay broken

Looks like a bug in iRedMail-0.9.0, will test it later and come back to you. (I'm sick these two days, too bad, please give me sometime. And don't wait for me, try to solve it yourself if possible. )

3

Re: Problem with iRedMail 0.9.0, backupmx and custom relay broken

I am sick as well this time, I hope you will get better soon!

I fixed the problem already by reverting the change to the postfix config file transport_maps_domain.cf
So there is no hurry.

Please let me know if I can do some tests for you.
Thank you!

4

Re: Problem with iRedMail 0.9.0, backupmx and custom relay broken

I decided to reverse this change in iRedMail-0.9.0, will mention this in iRedMail upgrade tutorial and re-pack iRedMail-0.9.0 tomorrow (Still testing a FreeBSD issue).

5

Re: Problem with iRedMail 0.9.0, backupmx and custom relay broken

Thank you!
BTW: What was your initial idea or background about implementing this feature?

6

Re: Problem with iRedMail 0.9.0, backupmx and custom relay broken

Another user suggested to add backupmx check in transport query, it's a good idea. The problem is I didn't test this situation like your first post here.

7

Re: Problem with iRedMail 0.9.0, backupmx and custom relay broken

Thanks for the clarification!

I applied all patches and fixes to my current iRedMail and -Pro installation. Thanks for updating the code and documentation.

Anyhow in iRedAdmin-Pro MySQL 1.9.1 I still get the same message as before: The setting "Mark as backup MX" is grayed out and the question mark shows "Backup MX does not work with custom relay"
Maybe a regression?

8

Re: Problem with iRedMail 0.9.0, backupmx and custom relay broken

Works as designed.

9

Re: Problem with iRedMail 0.9.0, backupmx and custom relay broken

Hello Zhang,

please tell me what the design actually is.

When configuring a custom relay setting, is backupmx set automatically?
I notice there is a new option "Relay without verifying local recipients" which is checked in my case.

What I need is custom relay setting and backupmx set to 1 in database. Can this setting be done in iRedAdmin-Pro without having to edit the mysql database by hand?

Best regards,
Bernhard

10

Re: Problem with iRedMail 0.9.0, backupmx and custom relay broken

broth wrote:

When configuring a custom relay setting, is backupmx set automatically?
I notice there is a new option "Relay without verifying local recipients" which is checked in my case.
What I need is custom relay setting and backupmx set to 1 in database. Can this setting be done in iRedAdmin-Pro without having to edit the mysql database by hand?

A backup mx domain should use 'relay' as transport, and Postfix should accept emails sent to this mail domain, and waiting for primary mx up and running. so when custom relay is set, you cannot use this domain as a backup mx, because received emails were relayed to other servers.

Maybe i was wrong?