1 (edited by hata_ph 2012-06-28 01:01:14)

Topic: catch-all account not working in iRedMail-0.8.1

==== ==== Provide required information ====
- iRedMail version and backend (LDAP/MySQL/PGSQL): iRedMail-0.8.1 LDAP backend
- Linux/BSD distribution name and version: CentOS 6.2
- Any related log? Log is helpful for troubleshooting.
====

I try to configure catch-all account in iRedMail but it seem not working. Below is my ldap entry...

dn: mail=@xxx.tld,ou=Users,domainName=xxx.tld,o=domains,dc=xxx,dc=tld
accountstatus: active
cn: catch-all
mail: @xxx.tld
mailForwardingAddress: test@xxx.tld
objectclass: inetOrgPerson
objectclass: mailUser
sn: catch-all
uid: catch-all

This is virtual_alias_maps for my /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/virtual_group_members_maps.cf, proxy:ldap:/etc/postfix/ldap/catchall_maps.cf, proxy:ldap:/etc/postfix/ldap/sender_login_maps.cf

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: catch-all account not working in iRedMail-0.8.1

hata_ph wrote:

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/virtual_group_members_maps.cf, proxy:ldap:/etc/postfix/ldap/catchall_maps.cf, proxy:ldap:/etc/postfix/ldap/sender_login_maps.cf

The last map is not used at all, please remove it.

LDIF data looks fine, could you please paste whole content of file /etc/postfix/ldap/catchall_maps.cf here to help troubleshoot?

Also, verify your catch-all account with below commands:

# cd /etc/postfix/ldap/
# for cf in $(ls *.cf); do echo $cf; postmap -q 'non-exist@domain.ltd' ldap:./$cf; done

Replace 'non-exist@domain.ltd' by a non-exist email address of your domain, then paste output message here to help troubleshoot.

3

Re: catch-all account not working in iRedMail-0.8.1

this is my catchall_maps.cf

#
# File generated by iRedMail (2012.06.26.10.42.38):
#
# Version:  0.8.1
# Project:  http://www.iredmail.org/
#
# Community: http://www.iredmail.org/forum/
#

server_host     = 127.0.0.1
server_port     = 389
version         = 3
bind            = yes
start_tls       = no
bind_dn         = cn=vmail,dc=xxxx,dc=tld
bind_pw         = xxx
search_base     = o=domains,dc=xxx,dc=tld
scope           = sub
query_filter    = (&(objectClass=mailUser)(accountStatus=active)(|(mail=@%d)(shadowAddress=@%d)))
result_attribute= mailForwardingAddress
debuglevel      = 0

this is the result of the command

> for cf in $(ls *.cf); do echo $cf; postmap -q 'aaa@xxx.ltd' ldap:./$cf; done
catchall_maps.cf
test@xxx.tld
recipient_bcc_maps_domain.cf
recipient_bcc_maps_user.cf
relay_domains.cf
sender_bcc_maps_domain.cf
sender_bcc_maps_user.cf
sender_login_maps.cf
transport_maps_domain.cf
transport_maps_user.cf
virtual_alias_maps.cf
virtual_group_maps.cf
virtual_group_members_maps.cf
virtual_mailbox_domains.cf
virtual_mailbox_maps.cf

4

Re: catch-all account not working in iRedMail-0.8.1

hata_ph wrote:

> for cf in $(ls *.cf); do echo $cf; postmap -q 'aaa@xxx.ltd' ldap:./$cf; done
catchall_maps.cf
test@xxx.tld

As you can see, catchall_maps.cf returns correct catch-all account: test@xxx.tld. So your catch-all account is working as expected. smile

5

Re: catch-all account not working in iRedMail-0.8.1

But when I send email to my others email account it did not send a copy of the email to test@xxx.tld? Any idea?

6

Re: catch-all account not working in iRedMail-0.8.1

hata_ph wrote:

when I send email to my others email account

Do these mail accounts exist or not?

Catch-all is used to catch emails which sent to non-exist mail accounts.

7

Re: catch-all account not working in iRedMail-0.8.1

A@domain.tld, B@domain.tld and test@domain.tld is a real account that exist in the ldap directory. I want everything send to A and B to be availbale in test@domain.tld account. Is that what catch-all option do, right?

8

Re: catch-all account not working in iRedMail-0.8.1

This is what BCC does, not catch-all. Catch-all is used to catch emails which sent to non-exist mail accounts.
So please configure per-user BCC settings for A@, B@ instead.

9

Re: catch-all account not working in iRedMail-0.8.1

Oh...I think I make a mistake on the definition of catch-all account. Is there a way to set globally to forward all domain email to 1 specific email?
Let say manager want to have a copy of all the email currently in the domain for viewing...

10 (edited by hata_ph 2012-06-28 09:42:04)

Re: catch-all account not working in iRedMail-0.8.1

Oh...I think I make a mistake on the definition of catch-all account. I have tested the catch-all function and it work perfectly. Thanks for help.
Is there a way to set globally to forward all domain email to 1 specific email?
Let say manager want to have a copy of all the email currently in the domain for viewing...

11

Re: catch-all account not working in iRedMail-0.8.1

Do the BCC just forward received mail? Do you forward sent mail too?

12

Re: catch-all account not working in iRedMail-0.8.1

hata_ph wrote:

Is there a way to set globally to forward all domain email to 1 specific email?

Yes, this is per-domain BCC setting.

hata_ph wrote:

Do the BCC just forward received mail? Do you forward sent mail too?

Postfix has two parameters: sender_bcc_maps, recipient_bcc_maps. One for outgoing emails, another for incoming emails.

If you have iRedAdmin-Pro installed, you can manage per-domain BCC in domain profile page, under tab "BCC". Screenshot for your reference:

http://iredmail.org/images/iredadmin/domain_profile_bcc.png

13

Re: catch-all account not working in iRedMail-0.8.1

thanks for the advice smile