1 (edited by wdbacker 2012-10-18 21:02:07)

Topic: Monitoring incoming/outgoing mails with BCC

==== Required information ====
- iRedMail version: 0.8.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: CentOS 6.3
- Related log if you're reporting an issue:
====
Hi,

I think I've found a problem with monitoring of incoming & outgoing mails through BCC. When I configure this per user, it works for the main e-mail address, but not for all mail aliases of this user. I didn't test this BCC feature with aliases at domain level, so maybe there is the same issue?

Thanks in advance!

2

Re: Monitoring incoming/outgoing mails with BCC

Sounds like a bug. Will test it later and fix it. Thanks for your feedback. smile

3

Re: Monitoring incoming/outgoing mails with BCC

Hi wdbacker,

iRedMail-0.8.3 and earlier versions have this issue. Here's fix for OpenLDAP backend:

- In /etc/postfix/ldap/sender_bcc_maps_user.cf, replace "(mail=%s)" by "(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s)))" in parameter "query_filter =". The final LDAP filter looks like below:

query_filter    = (&(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s)))(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=senderbcc))

- Perform the same modification in file /etc/postfix/ldap/recipient_bcc_user.cf, the final LDAP filter looks like below:

query_filter    = (&(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s)))(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=recipientbcc))

To avoid too many SQL lookups in Postfix, i prefer fixing it with iRedAdmin-Pro:

- While adding new alias domain for domain 'example.com', iRedAdmin-Pro-MySQL or iRedAdmin-Pro-PGSQL will insert new records in SQL tables (vmail.sender_bcc_domain, vmail.recipient_bcc_domain) if domain 'example.com' has bcc settings, or users under 'example.com' have bcc settings (vmail.sender_bcc_user, vmail.recipient_bcc_user).

- Perform opposite process while removing alias domain.

This fix will be available in next release of iRedAdmin-Pro-MySQL and iRedAdmin-Pro-PGSQL.

Thanks for your feedback. smile