1

Topic: [1.0-beta1] Mail alias not working with LDAP backend

Hi,

I did a fresh install of iRedMail 1.0-beta1 (with downloadable installer) on Debian Buster, and I can't make mail alias working (https://docs.iredmail.org/ldap.add.mail.alias.html).
When I receive an email on an alias email, Postfix logs say :

Recipient address rejected: Unknown user

If I try the given command :

postmap -v -q 'alias@yyy.zzz' ldap:/etc/postfix/ldap/virtual_alias_maps.cf

It works fine, it finds the mailForwardingAddress.

I didn't change any of the ldap maps, and I changed almost nothing in the generated postfix configuration (see the attached file).

Can you please help me ?

Thanks !

----

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

2

Re: [1.0-beta1] Mail alias not working with LDAP backend

Could you please export the full LDIF data of this mail alias account? I'd like to double check and make sure you didn't miss any required LDAP attribute/value.

3

Re: [1.0-beta1] Mail alias not working with LDAP backend

Hi ZhangHuangbin,

Sorry for the late answer, I was pretty busy.

Here's the LDIF export :

version: 1

dn: mail=postmaster@xxx.yyy,ou=Aliases,domainName=xxx.yyy,o=domains,dc=aaa,dc=bbb
accountstatus: active
enabledservice: mail
enabledservice: deliver
mail: postmaster@xxx.yyy
mailforwardingaddress: postmaster@aaa.bbb
objectclass: mailAlias
objectclass: top

Regards,
tms

4

Re: [1.0-beta1] Mail alias not working with LDAP backend

Up !

Hi ZhangHuangbin, do you have any idea ?

Thanks,
tms

5

Re: [1.0-beta1] Mail alias not working with LDAP backend

LDIF looks fine and it should work.

Could you please show me the output of commands below:

cd /etc/postfix/ldap/
for i in $(ls *cf); do echo $i; postmap -v -q 'alias@yyy.zzz' ldap:./$i; done

Also, show me the full content of /etc/dovecot/dovecot-ldap.conf (remove the LDAP bind password before pasting here).

6

Re: [1.0-beta1] Mail alias not working with LDAP backend

Hello ZhangHuangbin,

Pleae see attached files.
By the way, thank you for your help, much appreciate !

7

Re: [1.0-beta1] Mail alias not working with LDAP backend

Both looks fine. Please show me output of command below:

cd /etc/postfix/ldap/
grep 'query_filter' transport_maps_domain.cf virtual_mailbox_maps.cf

8

Re: [1.0-beta1] Mail alias not working with LDAP backend

I am experiencing a similar problem.

I also installed version 1.0-beta1 and I am getting the same error. Apparently the difference is that this error only occurs when email is sent to a list from an external member of it.

Should I open a separate topic to address this?

What information can I offer to help with this issue?

9

Re: [1.0-beta1] Mail alias not working with LDAP backend

Hi @fcaseiro,

Please show me output of command below:

cd /etc/postfix/ldap/
grep 'query_filter' transport_maps_domain.cf virtual_mailbox_maps.cf

10

Re: [1.0-beta1] Mail alias not working with LDAP backend

Hi Zhang,

That's the output:

transport_maps_domain.cf:query_filter    = (&(objectClass=mailDomain)(accountStatus=active)(enabledService=mail)(|(domainName=%s)(domainAliasName=%s)))
virtual_mailbox_maps.cf:query_filter    = (&(objectClass=mailUser)(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s)))(accountStatus=active)(!(domainStatus=disabled))(enabledService=mail)(enabledService=deliver))

11

Re: [1.0-beta1] Mail alias not working with LDAP backend

Seems same issue as this one:
https://forum.iredmail.org/post71261.html#p71261

Could you please try to comment out "check_policy_service inet:127.0.0.1:12340" line in /etc/postfix/main.cf and try again?

12

Re: [1.0-beta1] Mail alias not working with LDAP backend

Hi, Zhang.

You've solved the mystery. Now it works. Thank you!

13

Re: [1.0-beta1] Mail alias not working with LDAP backend

Hi @fcaseiro,

Which linux distribution and release are you running? I can not reproduce this issue locally.