https://github.com/lldap/lldap logo
jul - I'm trying to add catch-alls to my docker...
# troubleshooting
j
I'm trying to add catch-alls to my docker-mailserver. I've created a multi-value mailalias attribute in my user schema that works and delivers mail as it should. I've added @XYZ.io as an alias as I would in the postfix config but that doesn't work and just gets me undelievered returns my filters:
Copy code
LDAP_QUERY_FILTER_USER=(&(objectClass=inetOrgPerson)(|(uid=%u)(mail=%u)))
LDAP_QUERY_FILTER_GROUP=(&(objectClass=groupOfUniqueNames)(uid=%s))
LDAP_QUERY_FILTER_ALIAS=(&(objectClass=inetOrgPerson)(|(mail=%s)(mailalias=%s)))
LDAP_QUERY_FILTER_DOMAIN=(|(mail=*@%s)(mailalias=*@%s))
DOVECOT_USER_FILTER=(&(objectClass=inetOrgPerson)(|(uid=%u)(mail=%u)))
DOVECOT_USER_ATTRS==uid=5000,=gid=5000,=home=/var/mail/%Ln,=mail=maildir:~/Maildir
DOVECOT_PASS_FILTER=(&(objectClass=inetOrgPerson)(|(uid=%u)(mail=%u)))
logs:
Copy code
2025-01-05T19:03:40.196766+00:00 mx1 dovecot: lmtp(446): Connect from local
2025-01-05T19:03:40.257009+00:00 mx1 dovecot: auth: ldap(2@abc.xyz): unknown user 
2025-01-05T19:03:40.299816+00:00 mx1 postfix/lmtp[445]: B0563240301D: to=<2@abc.xyz>, relay=mx1.mailhost.tld[/var/run/dovecot/lmtp], delay=0.61, delays=0.48/0.02/0.01/0.1, dsn=5.1.1, status=bounced (host mx1.mailhost.tld[/var/run/dovecot/lmtp] said: 550 5.1.1 <2@abc.xyz> User doesn't exist: 2@abc.xyz (in reply to RCPT TO command))
2025-01-05T19:03:40.300028+00:00 mx1 dovecot: lmtp(446): Disconnect from local: Logged out (state=READY)
n
That's a known limitation of LLDAP: you can't search multi valued attributes
The workaround is having mailAlias1, mailAlias2, ... and having the filter check each one
It should really be mentioned in the docs, at least for dovecot/mailserver
j
oh well
oh so it does work for the full length aliases, just not the matching of the catch-alls?
n
You can't query an element of a list (or check whether the list contains the element)
If you want to do that, you have to use single value elements
And actually, as of now, catch all are going to be hard to do since we don't support substring matching on custom attributes (only the built-in ones)
j
weird it seems to be working for non catch all
that's quite unfortunate
n
Have you tried with more than one element in the list?
j
wait now it doesnt
im so confused
guess ill do it the ugly wayy then
n
Yeah, sorry about that
j
ill have to hardcode the catch all into the dovecot conf then somehow
4 Views