From iRedMail
iRedMail with OpenLDAP backend doesn't support catch-all account by default, but you can implement it with below steps:
- Change your postfix setting in /etc/postfix/main.cf:
| File: /etc/postfix/main.cf
|
virtual_alias_maps =
proxy:ldap:/etc/postfix/ldap_virtual_alias_maps.cf,
proxy:ldap:/etc/postfix/ldap_virtual_group_maps.cf,
proxy:ldap:/etc/postfix/ldap_sender_login_maps.cf, # <-- Add this line.
proxy:ldap:/etc/postfix/ldap_catch_all_maps.cf # <-- Add this line.
|
- File /etc/postfix/ldap_sender_login_maps.cf already exist by default, so what you need is adding new file: /etc/postfix/ldap_catch_all_maps.cf.
| File: /etc/postfix/ldap_catch_all_maps.cf
|
server_host = 127.0.0.1
server_port = 389
version = 3
bind = yes
start_tls = no
bind_dn = cn=vmail,dc=iredmail,dc=org
bind_pw = JnvF4UQheMdImdXYnRVEgKpsdCXJy3
search_base = domainName=%d,o=domains,dc=iredmail,dc=org
scope = sub
query_filter = (&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(mail=@%d))
result_attribute= mailForwardingAddress
debuglevel = 0
|
As you see, below attributes and values are required to make catch-all account work:
| Attribute Name |
Value |
| objectClass |
mailUser |
| mail |
@your_domain_name |
| accountStatus |
active |
| enabledService |
mail |
- Restart postfix service to make it work.
- Add sample catch-all account under ou=Users container.
| Terminal:
|
dn: mail=@a.cn,ou=Users,domainName=a.cn,o=domains,dc=iredmail,dc=org
accountstatus: active
cn: catch-all
enabledservice: mail
mail: @a.cn
mailforwardingaddress: www@a.cn
mailforwardingaddress: auditor@a.cn
objectclass: inetOrgPerson
objectclass: mailUser
sn: catch-all
uid: catch-all
|