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. 