Wietse Venema: > Viktor Dukhovni: > > On Wed, Jan 11, 2023 at 03:57:28PM +0100, Patrick Ben Koetter wrote: > > > > > Today I ran into a lookup problem where a sender (!) was using the RFC > > > 5233 > > > subaddress schema so send a message e.g. as > > > localpart+subaddress@domainpart > > > and lookups with smtpd_sender_login_maps failed because I was unable to > > > come > > > up with a LDAP query_filter that would look for localpart@domainpart a ka > > > strip the subaddress. > > > > http://www.postfix.org/postconf.5.html#recipient_delimiter > > > > The documentation isn't clear on whether extensions are handled in > > > > http://www.postfix.org/postconf.5.html#smtpd_sender_login_maps > > > > but they are. You shouldn't need any LDAP-specific support here, > > Postfix will automatically generate a query with the extension elided. > > The doc should include this text from virtual(5), canonical(5), etc., > which use a similar lookup stratgy. > > ADDRESS EXTENSION > When a mail address localpart contains the optional recipient delimiter > (e.g., user+foo@domain), the lookup order becomes: user+foo@domain, > user@domain, user+foo, user, and @domain.
Turns out that when Postfix features were added over time (virtual, canonical, *bcc_maps), the same lookup behavior was documented in different ways (and in the above case, only partially). I added a TODO to make this more consistent. Wietse