1 (edited by broth 2018-09-20 21:35:02)

Topic: MySQL: vmail.forwardings, "address" and forwarding" are the same?

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8 (latest)
- Linux/BSD distribution name and version: Ubuntu 16.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes, latest version 2.9.0
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====


Hello Zhang!

Today I discovered a strange behaviour of our iRedMail server.
When adding a "Forwarding" in iRedMail-Pro MySQL, after clicking save the list is empty.

It looks like the value is never saved.

On the other hand I do have records in MySQL vmail.forwarding table where the value of "address" and "forwarding" are the same.

This looks very strange to me.

First things first: Where can I find the error logs of iRedAdmin-Pro? In uwscgi or nginx log directlory I cannot find error messages of any kind. Only the request from the browser where I try to save.

When I manually modify the affected record in the MySQL table, then iRedMail Pro does show the forwarding correctly in the list.

I'm a bit concerned because I found 88 results for following SQL:

SELECT * FROM vmail.forwardings where address=forwarding;

The table has around 348 entries.

Please share your thoughts. If it helps  I'll be happy to spend a coffee or two smile

Cheers,
Bernhard

----

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

2

Re: MySQL: vmail.forwardings, "address" and forwarding" are the same?

It looks like the problem does occur when "domain" and "dest_domain" are the same.

3

Re: MySQL: vmail.forwardings, "address" and forwarding" are the same?

broth wrote:

On the other hand I do have records in MySQL vmail.forwarding table where the value of "address" and "forwarding" are the same.

This is for normal user without forwarding, or forwarding but save a copy of mailbox.

broth wrote:

It looks like the value is never saved.

Could you please show us the sql table structure? MySQL command:

USE vmail;
DESC forwardings;

4 (edited by broth 2018-09-21 11:39:58)

Re: MySQL: vmail.forwardings, "address" and forwarding" are the same?

Thanks for your help!

Attached a screenshot of the output.

Maybe you are right and the table is wrong somehow. This would be an easy fix smile

Post's attachments

Screenshot at 2018-09-21 05:38:25.png
Screenshot at 2018-09-21 05:38:25.png 8.4 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

5

Re: MySQL: vmail.forwardings, "address" and forwarding" are the same?

SQL table structure of "forwardings" is correct.

broth wrote:

When adding a "Forwarding" in iRedMail-Pro MySQL, after clicking save the list is empty.

I wonder what email addresses did you use as forwarding addresses.
If it's address under same domain, do they exist? if doesn't exist, it will be silently discarded by iRedAdmin-Pro.

6

Re: MySQL: vmail.forwardings, "address" and forwarding" are the same?

The forwarding address is a mailbox of the same domain.
Example:

Mailbox 1 : red@example.com
Mailbox 2 : blue@example.com

Now user of "blue@example.com" does not work anymore at example.com.

So I edit "blue@example.com" and add a forwarding to "red@example.com".

When I do this, my installation does silently drop the forwarding address. No message nor error log is generated.

Can you reproduce the problem in your test environment? Is what I'm doing very exotic? smile

7

Re: MySQL: vmail.forwardings, "address" and forwarding" are the same?

broth wrote:

The forwarding address is a mailbox of the same domain.
Example:
Mailbox 1 : red@example.com
Mailbox 2 : blue@example.com
Now user of "blue@example.com" does not work anymore at example.com.

Question: what do you mean "blue@... does not WORK anymore"?

Do you mean account "blue@" was removed and does not exist under this domain?

If forwarding address is under same domain, iRedAdmin-Pro will query sql/ldap to make sure it exists, if yes, save it. if not, (silently) discard it.

8

Re: MySQL: vmail.forwardings, "address" and forwarding" are the same?

I meant that USER does not WORK anymore.
So the PERSON which uses blue@ does not do its job anymore smile

Both mailboxes do exist.

I only want to forward all incoming messages to blue@example.com to red@example.com

Sorry for the confusion

9

Re: MySQL: vmail.forwardings, "address" and forwarding" are the same?

- Did you disable this "blue@" with iRedAdmin-Pro?

broth wrote:

When I manually modify the affected record in the MySQL table, then iRedMail Pro does show the forwarding correctly in the list.

Which column/value did you modify?

10

Re: MySQL: vmail.forwardings, "address" and forwarding" are the same?

blue@... was  not changed nor disabled.

I updated the "forwarding" column.

Before:

address = blue@example.com
forwarding = blue@example.com

(note: Nothing displayed in iRedAdminPro)

After:

Before:

address = blue@example.com
forwarding = red@example.com

(Note: Now it's shown correctly in iRedAdmin pro)


I think we should conclude wether this is a Bug or another error specific to my iRedMail installation.

If its a bug, I am happy to help in order to find a solution and fix it.

If it's a problem specific to my installation, I am consodering asking for paid support.
I like to get the problem fixed asap smile

Thank you!

11

Re: MySQL: vmail.forwardings, "address" and forwarding" are the same?

I need full sql records for troubleshooting, otherwise direct ssh access is required (with a support ticket).

12

Re: MySQL: vmail.forwardings, "address" and forwarding" are the same?

I can send you the records by email if you like. I do not want to make them public to protect privacy of customers.

13

Re: MySQL: vmail.forwardings, "address" and forwarding" are the same?

yes you can send me by email: zhb _at_ iredmail _dot_ org

14

Re: MySQL: vmail.forwardings, "address" and forwarding" are the same?

Update:

It turned out that some records in vmail.forwardings table were missing.
These created the problem in iRedMail Pro.

Example:

INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_forwarding) values ('blue@example.com', 'blue@example.com', 'example.com', 'example.com', 1);

After adding these records, everything is working now correctly.

Thanks Zhang for your great support and help!

15

Re: MySQL: vmail.forwardings, "address" and forwarding" are the same?

Thanks for buying our support ticket. smile