Date: Sun, 22 Aug 2010 15:48:23 -0400 From: John Nielsen <lists@jnielsen.net> To: Stefan Bethke <stb@lassitu.de> Cc: gshapiro@freebsd.org, FreeBSD Stable <freebsd-stable@freebsd.org> Subject: Re: Apparent dnsbl bug in Sendmail or m4 Message-ID: <CABA9DBB-D584-491F-AE6E-14A5C862B8EF@jnielsen.net> In-Reply-To: <B6617274-729C-42F3-AC70-7FB81B16EEC4@lassitu.de> References: <20100822031045.sl4d10544k0s80kw@newwebmail.jnielsen.net> <CD37C0F6-F202-4941-A740-BF17358270A5@lassitu.de> <B6617274-729C-42F3-AC70-7FB81B16EEC4@lassitu.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Aug 22, 2010, at 6:40 AM, Stefan Bethke wrote: > Am 22.08.2010 um 10:00 schrieb Stefan Bethke: >=20 >> FEATURE(`dnsbl', `bl.spamcop.net', `"550 " $&{client_addr} "foo" = $&{client_addr} ""')dnl >=20 > The real culprit is the comma. I believe the problem stems from = unquoted use of the arguments in some of the ifelses, where the comma = turns the single argument into two. That makes a lot of sense, especially when combined with the off-list = suggestions I got to double-quote the error message. > Tracing the ifelses with -d aceq I see this for the last ifelse in = cf/feature/dnsbl.m4: >=20 > m4trace: -1- ifelse(`X"550 Mail from " $&{client_addr} " rejected', = `see http://spamcop.net/bl.shtml?" $&{client_addr}', `Xquarantine', = `R<?>$+ $#error $@ quarantine $: _DNSBL_SRV_', `X"550 Mail from = " $&{client_addr} " rejected', ` > see http://spamcop.net/bl.shtml?" $&{client_addr}', `Xdiscard', = `R<?>$+ =20 > $#discard $: _DNSBL_SRV_', `R<?>$+ $#error $@ 5.7.1 $: = _DNSBL_MSG_' > ) -> ??? > m4trace: -1- ifelse(...) -> `' > m4trace: -1- ifelse ... >=20 >=20 > I've never managed to really wrap my head around m4 quoting, but the = easy fix is to use some other character that has no meaning to m4. The fact that you knew how to do a trace shows that you're way ahead of = me in grokking m4. :) I can confirm that replacing the comma with a = colon makes the problem go away. Does someone with some m4-fu want to take a stab at producing a fix? The = problem appears in the 7-arg "ifelse" in the last few lines of = /usr/share/sendmail/cf/feature/dnsbl.m4, though the source could of = course be missing quotes earlier in the file. I'd be happy to test any proposed patches and submit a bug report to = Sendmail if appropriate. At the very least perhaps the example in the = comment of /etc/mail/freebsd.mc should be modified to not use a comma. Thanks! JN
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABA9DBB-D584-491F-AE6E-14A5C862B8EF>