1

Topic: dovecot trying to deliver mail to alias mailbox

==== Required information ====
- iRedMail version: 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LADP AD
- Linux/BSD distribution name and version: Centos 6.5
- Related log if you're reporting an issue:
====
I create group with 4 recipients. Then I trying to send mail to this group. My mail delivered to this group but dovecot tried to deliver this mail to mailbox with alias name.
Example:
alias: it@example.com
mailboxes: user1@example.com, user2@example.com, user3@example.com
Mail trying to delivered to 'user1', 'user2', 'user3' and 'it' mailboxes. What i need to do to change this behavior?
Sorry for bad English.

----

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

2

Re: dovecot trying to deliver mail to alias mailbox

there must be something wrong in your LDAP query files used in Postfix+Dovecot. Please show us output of below commands:

# cd /etc/postfix/
# for cf in $(ls ad*.cf); do echo $cf; postmap -q it@example.com ldap:./$cf; done

Also, show us whole file content of /etc/dovecot/dovecot-ldap.conf (Remove password before pasting).

3 (edited by lev 2014-07-10 16:28:27)

Re: dovecot trying to deliver mail to alias mailbox

# for cf in $(ls ad*.cf); do echo $cf; postmap -q it@example.com ldap:./$cf; done
ad_sender_login_maps.cf
ad_virtual_group_maps.cf
user1@example.com,user2@example.com,user3@example.com,user4@example.com,user5@example.com,it@example.com
ad_virtual_mailbox_maps.cf

/etc/dovecot/dovecot-ldap.conf

hosts           = exam.ple:3268
ldap_version    = 3
auth_bind       = yes
dn              = login
dnpass          = password
base            = dc=exam,dc=ple
scope           = subtree
deref           = never
user_filter     = (&(mail=%u)(objectClass=person)(!(userAccountControl=514)))
pass_filter     = (&(mail=%u)(objectClass=person)(!(userAccountControl=514)))
pass_attrs      = userPassword=password
default_pass_scheme = CRYPT
user_attrs      = =home=/var/vmail/vmail1/%Ld/%Ln/Maildir/,=mail=maildir:/var/vmail/vmail1/%Ld/%Ln/Maildir/

/etc/postfix/ad_virtual_group_maps.cf

server_host     = ip_addr
server_port     = 389
version         = 3
bind            = yes
start_tls       = no
bind_dn         = login
bind_pw         = password
search_base     = dc=exam,dc=ple
scope           = sub
query_filter    = (&(objectClass=group)(mail=%s))
special_result_attribute = member
#leaf_result_attribute = mail
result_attribute= mail
debuglevel      = 0

4

Re: dovecot trying to deliver mail to alias mailbox

lev wrote:

# for cf in $(ls ad*.cf); do echo $cf; postmap -q it@example.com ldap:./$cf; done
...
ad_virtual_group_maps.cf
user1@example.com,user2@example.com,user3@example.com,user4@example.com,user5@example.com,it@example.com
...

You see, it@ is a member of this group/mailing list, you should remove it from this group.

5

Re: dovecot trying to deliver mail to alias mailbox

ZhangHuangbin wrote:
lev wrote:

# for cf in $(ls ad*.cf); do echo $cf; postmap -q it@example.com ldap:./$cf; done
...
ad_virtual_group_maps.cf
user1@example.com,user2@example.com,user3@example.com,user4@example.com,user5@example.com,it@example.com
...

You see, it@ is a member of this group/mailing list, you should remove it from this group.

I checked. There are only 5 members of group it, and I don't have user with mailbox it@. Maybe I should change query filter somehow?

6

Re: dovecot trying to deliver mail to alias mailbox

If you don't have it@ as group member, then please try to tune your LDAP filter in ad_virtual_group_maps.cf.