Addition/OpenLDAP/Catch-all
From iRedMail
(Difference between revisions)
| (5 intermediate revisions not shown) | |||
| Line 1: | Line 1: | ||
| - | iRedMail with OpenLDAP backend doesn't support catch-all account by default, but you can implement it with below steps: | + | Note: This feature was added in iRedMail-0.6.0. |
| + | |||
| + | iRedMail-0.5.1 and eariler versions 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: | * Change your postfix setting in /etc/postfix/main.cf: | ||
| Line 10: | Line 12: | ||
</pre>}} | </pre>}} | ||
| - | File '''/etc/postfix/ldap_sender_login_maps.cf''' is used to return email addresses who doesn't forward their email to other accounts (stored in attribute '''mailForwardingAddress''', per-user setting.), it will prevent postfix delivering incoming mails which sent to these accounts to catch-all address. | + | File '''/etc/postfix/ldap_sender_login_maps.cf''' is used here to return email addresses who doesn't forward their email to other accounts (stored in attribute '''mailForwardingAddress''', per-user setting.), it will prevent postfix delivering incoming mails which sent to these accounts to catch-all address. |
| - | * 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_sender_login_maps.cf''' already exist by default, so what you need to do is adding new file: '''/etc/postfix/ldap_catch_all_maps.cf'''. |
{{cfg|/etc/postfix/ldap_catch_all_maps.cf|<pre> | {{cfg|/etc/postfix/ldap_catch_all_maps.cf|<pre> | ||
| + | # | ||
| + | # This is a sample config. Please REPLACE bind_dn, bind_pw, search_base below. | ||
| + | # | ||
server_host = 127.0.0.1 | server_host = 127.0.0.1 | ||
server_port = 389 | server_port = 389 | ||
| Line 60: | Line 65: | ||
cn: catch-all | cn: catch-all | ||
mail: @a.cn | mail: @a.cn | ||
| - | + | mailForwardingAddress: www@a.cn | |
| - | + | mailForwardingAddress: www2@a.cn | |
objectclass: inetOrgPerson | objectclass: inetOrgPerson | ||
objectclass: mailUser | objectclass: mailUser | ||
Current revision as of 15:23, 24 May 2010
Note: This feature was added in iRedMail-0.6.0.
iRedMail-0.5.1 and eariler versions 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 is used here to return email addresses who doesn't forward their email to other accounts (stored in attribute mailForwardingAddress, per-user setting.), it will prevent postfix delivering incoming mails which sent to these accounts to catch-all address.
- File /etc/postfix/ldap_sender_login_maps.cf already exist by default, so what you need to do is adding new file: /etc/postfix/ldap_catch_all_maps.cf.
| File: /etc/postfix/ldap_catch_all_maps.cf |
# # This is a sample config. Please REPLACE bind_dn, bind_pw, search_base below. # 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)(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 |
| @your_domain_name | |
| accountStatus | active |
- 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 mail: @a.cn mailForwardingAddress: www@a.cn mailForwardingAddress: www2@a.cn objectclass: inetOrgPerson objectclass: mailUser sn: catch-all uid: catch-all |
