1 (edited by koval.roma 2019-05-07 18:40:08)

Topic: Monitor incoming and outgoing mails both per domain and per user ?

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):0.9.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx):Apache
- Manage mail accounts with iRedAdmin-Pro?: no
====

Hello, my question is about monitor incoming and outgoing mails. Let assume that I have following accounts:

user1@myserver.net
user2@myserver.net
user3@myserver.net
user4@myserver.net
bcc-out@myserver.net
bcc-out-sales@myserver.net

My configuration:
user1@myserver.net, user2@myserver.net mails forwarded to bcc-out-sales@myserver.net (per-user bcc settings)

Also I've configured that all mails in domain @myserver.net forwarded to bcc-out@myserver.net.

Recently I found that mails from user1@myserver.net, user2@myserver.net forwarded only to bcc-out-sales@myserver.net, but not to bcc-out@myserver.net.

Am I right that if I have enabled "per-domain bcc settings" and "per-user bcc settings", it means that "per-domain bcc settings" contains all mail except "per-user bcc settings" ?

There is no information about this feature in documentation .

2

Re: Monitor incoming and outgoing mails both per domain and per user ?

koval.roma wrote:

Am I right that if I have enabled "per-domain bcc settings" and "per-user bcc settings", it means that "per-domain bcc settings" contains all mail except "per-user bcc settings" ?

With default iRedMail settings, YES. If per-user bcc exists, it has higher priority than per-domain bcc setting, and only per-user bcc will be used.

I think it's possible to implement your requirement by changing postfix setting "sender_bcc_maps" and "recipient_bcc_maps". Currently, it's configured to query per-user bcc setting first, then per-domain. If query for per-user bcc matched and return some email address, it will stop here and NOT query per-domain bcc.

The solution is: merge the SQL tables used to store per-user and per-domain bcc settings to only one SQL table, and use a SQL query to return both per-user and per-domain settings.

I'm not sure how many people want this.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3

Re: Monitor incoming and outgoing mails both per domain and per user ?

Ok, thank you for your reply.

We need this because our boss want to monitor all incoming and outgoing email's and our head of department want to monitor incoming and outgoing email's only for user's who work's in his department.

4

Re: Monitor incoming and outgoing mails both per domain and per user ?

I think this feature is reasonable.
Do you want to try to implement it yourself?

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

5

Re: Monitor incoming and outgoing mails both per domain and per user ?

ZhangHuangbin wrote:

I think this feature is reasonable.
Do you want to try to implement it yourself?

On my free time I will try "to play" with SQL tables.