Postfix

Catch All

  • To support catch-all email addresses, create a new virtul alias maps using virtual_alias_maps.cf as template:
$ cd /etc/postfix/ldap
$ cp virtual_alias_maps.cf virtual_alias_maps_catchall.cfg
  • Edit the query_filter parameter accordingly:
/etc/postfix/ldap/virtual_alias_maps_catchall.cfg
...
query_filter = (&(alias=catchall@%d)(objectclass=kolabinetorgperson))
...
  • Append to the virtual_alias_maps:
/etc/posfix/main.cf
...
virtual_alias_maps = $alias_maps, ldap:/etc/postfix/ldap/virtual_alias_maps.cf,ldap:/etc/postfix/ldap/virtual_alias_maps_sharedfolders.cf,ldap:/etc/postfix/ldap/mailenabled_distgroups.cf, ldap:/etc/postfix/ldap/mailenabled_dynamic_distgroups.cf,ldap:/etc/postfix/ldap/virtual_alias_maps_catchall.cf
...
  • After reloading Postfix, you can add a catchall@<domain> address to any user you want.