1

Topic: missing recipient and sender info in activities

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? download
- Linux/BSD distribution name and version: debian v7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx): apache
- Manage mail accounts with iRedAdmin-Pro? yes v4.0
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
in https://mailserver/iredadmin/activities/sent we are missing nearly all data for senders and recipients, though sometimes it seems to be logged.

at https://mailserver/iredadmin/activities/received we see nearly all senders, but absolutely no recipient-data...

----

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

2

Re: missing recipient and sender info in activities

Please try this:

- Login to iRedAdmin-Pro as global admin
- Clean all quarantined mails by releasing or deleting them
- Run SQL commands below as MySQL root user:

USE amavisd;
TRUNCATE quarantine;
TRUNCATE msgrcpt;
TRUNCATE msgs;
TRUNCATE maddr;

3

Re: missing recipient and sender info in activities

ZhangHuangbin wrote:

Please try this:

- Login to iRedAdmin-Pro as global admin
- Clean all quarantined mails by releasing or deleting them
- Run SQL commands below as MySQL root user:

USE amavisd;
TRUNCATE quarantine;
TRUNCATE msgrcpt;
TRUNCATE msgs;
TRUNCATE maddr;

thx, but on a real-life production system I can't simply wipe quarantined mails.

4

Re: missing recipient and sender info in activities

I mean you should release the clean ones and delete spams, not simply delete all.

5

Re: missing recipient and sender info in activities

ZhangHuangbin wrote:

I mean you should release the clean ones and delete spams, not simply delete all.

well, we are simply not allowed to read customers mail, being it spam or no spam.
therefore we can not clean/release something we are not allowed to read by law.

6

Re: missing recipient and sender info in activities

OK, here's the SQL commands to fix it, please run it as MySQL root user:

USE amavisd;
UPDATE maddr SET email_raw=email WHERE email_raw IS NULL;

7

Re: missing recipient and sender info in activities

ZhangHuangbin wrote:

OK, here's the SQL commands to fix it, please run it as MySQL root user:

USE amavisd;
UPDATE maddr SET email_raw=email WHERE email_raw IS NULL;

thank you for your detailed commands, but I have to report:

mysql> select count(*) from maddr;
+----------+
| count(*) |
+----------+
|   192511 |
+----------+
1 row in set (0.24 sec)

mysql> select count(*) from maddr where email_raw = "";
+----------+
| count(*) |
+----------+
|   180694 |
+----------+
1 row in set (0.07 sec)

mysql> select count(*) from maddr where email_raw IS NULL;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)


I'd be curious if you would suggest to use your update-command on those rows having email_raw="" while no row has email_raw is null.

thank you in advance!

8

Re: missing recipient and sender info in activities

hk@ wrote:
ZhangHuangbin wrote:

OK, here's the SQL commands to fix it, please run it as MySQL root user:

USE amavisd;
UPDATE maddr SET email_raw=email WHERE email_raw IS NULL;

thank you for your detailed commands, but I have to report:

mysql> select count(*) from maddr;
+----------+
| count(*) |
+----------+
|   192511 |
+----------+
1 row in set (0.24 sec)

mysql> select count(*) from maddr where email_raw = "";
+----------+
| count(*) |
+----------+
|   180694 |
+----------+
1 row in set (0.07 sec)

mysql> select count(*) from maddr where email_raw IS NULL;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)


I'd be curious if you would suggest to use your update-command on those rows having email_raw="" while no row has email_raw is null.

thank you in advance!

tested with ="" works - thx!