1 (edited by misieq 2014-07-09 22:14:08)

Topic: AD UPN longer than 20 chars

==== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP AD
- Linux/BSD distribution name and version: RH 6.5
- Related log if you're reporting an issue:
====
Hello
I have following problem. I have UPN limit - 20 chars which I cannot change
I have user whose UPN is longer than 20chars . I want an email to be longer.
I get a message in log:

 status=bounced (host 10.4.13.10[10.4.13.10] said: 550 5.1.1 <korespondencja.seryjna@somedomain.com> User doesn't exist: korespondencja.seryjna@somedomain.pl (in reply to RCPT TO command))

I have following filters for LDAP connection:

 cat ad_sender_login_maps.cf | egrep '(filter|result)'
query_filter    = (&(userPrincipalName=%s)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
result_attribute= mail

cat ad_virtual_mailbox_maps.cf | egrep '(filter|result)'
query_filter    = (&(objectclass=person)(userPrincipalName=%s))
result_attribute= mail
result_format   = %d/%u/Maildir/

and some output which looks OK

for cf in $(ls ad_*); do echo ${cf}; postmap -q 'korespondencja.seryjna' ldap:./${cf}; done
ad_sender_login_maps.cf
korespondencja.seryjna@somedomain.pl
ad_virtual_group_maps.cf
ad_virtual_mailbox_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: AD UPN longer than 20 chars

Does it work if you use the same value for "query_filter" in ad_sender_login_maps.cf and ad_virtual_mailbox_maps.cf?

3

Re: AD UPN longer than 20 chars

ZhangHuangbin wrote:

Does it work if you use the same value for "query_filter" in ad_sender_login_maps.cf and ad_virtual_mailbox_maps.cf?

No it didn't but I figured it out.

I had to check dovecot-ldap.conf
I've changed upn to mail so it now looks like:

user_filter     = (&(mail=%u)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
pass_filter     = (&(mail=%u)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))

And it works now.