Re: RFC 5233 "Subaddresses" and LDAP lookups
On Wed, Jan 11, 2023 at 09:02:23PM +0100, Patrick Ben Koetter wrote: > * 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. > > Thanks! Makes me wonder why the setup I was testing today failed to behave > like you wrote. I'll try to reconstruct this on a test machine as soon as I > find time and verify that. Do you have "recipient_delimiter = +" in main.cf? > p@rick cheers, raf
Re: RFC 5233 "Subaddresses" and LDAP lookups
* 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. Thanks! Makes me wonder why the setup I was testing today failed to behave like you wrote. I'll try to reconstruct this on a test machine as soon as I find time and verify that. p@rick -- [*] sys4 AG https://sys4.de, +49 (89) 30 90 46 64 Schleißheimer Straße 26/MG,80333 München Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief Aufsichtsratsvorsitzender: Florian Kirstein
Re: RFC 5233 "Subaddresses" and LDAP lookups
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
Re: RFC 5233 "Subaddresses" and LDAP lookups
Patrick Ben Koetter skrev den 2023-01-11 15:57: Greetings! 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. ... Is that intentional e.g. because subaddresses are meant for filtering on the recipients side and not for senders as envelope-sender or is it something Postfix should support and it just hasn't been implemented yet? no postconf -n, no problem https://fvdm.com/code/plus-address-forwarding-in-postfix its not ldap but more generic in postfix your ip is on spamhaus 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [46.183.103.8 listed in zen.spamhaus.org]
Re: RFC 5233 "Subaddresses" and LDAP lookups
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. Wietse
Re: RFC 5233 "Subaddresses" and LDAP lookups
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. -- Viktor.