1 (edited by wiro 2014-03-21 19:18:07)

Topic: Backup MX transport to dovecot bug ?

I had a problem with setting second node as backup mx. When I did it, postfix always send email to dovecot and dovect return error "Unknown user".

Same issue was reported here: http://www.iredmail.org/forum/topic4160 … up-mx.html

I think I found problem in SQL query for transports.

/etc/postfix/mysql/transport_maps_domain.cf

query       = SELECT transport FROM domain WHERE domain='%s' AND active=1

This query apply transport field also to domains which are relay_domains, domains with backupmx = 1. My opinion is backupmx domain should be only received by postfix, stored in queue (maybe checked by amavis) and then resent to domain primary mailserver based on DNS mx records for domain, no transport magic.

So i changed this query to

query       = SELECT transport FROM domain WHERE domain='%s' AND active=1 AND backupmx = 0

and now it works.

BUT i just look into

http://www.iredmail.org/wiki/index.php? … 6-hotfixes

Can you please tell me what is wrong with this ? Before I put mailserver into production.

Thank you.


==== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Linux/BSD distribution name and version: Debian Wheezy
- Related log if you're reporting an issue:
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Backup MX transport to dovecot bug ?

So sorry about this trouble. BackupMX on iRedMail is broken, please don't use iRedMail as backup mx until we fixed it.

3

Re: Backup MX transport to dovecot bug ?

Hi ZhangHuangbin,

Any update about this case? I have two servers already in production. We have done a workaround to use this feature but i would like to do the things by the official way.

Regards

4

Re: Backup MX transport to dovecot bug ?

hi Toni,

Sorry about the delay, still not yet fixed. Would you mind sharing your solution?

5

Re: Backup MX transport to dovecot bug ?

Off course

This is our workaround in a cron.

#!/bin/bash
mysql --defaults-file=/etc/mysql/debian.cnf -NBe "UPDATE vmail.domain SET transport = 'relay' WHERE backupmx = 1 AND transport NOT LIKE \"smtp%\" AND transport <> 'relay';"

Regards