From owner-freebsd-stable@FreeBSD.ORG Mon Aug 23 01:50:23 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B253C1065693; Mon, 23 Aug 2010 01:50:22 +0000 (UTC) (envelope-from john@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.freebsd.org (Postfix) with ESMTP id 786AC8FC17; Mon, 23 Aug 2010 01:50:22 +0000 (UTC) Received: from [192.168.2.40] (jn@stealth.jnielsen.net [74.218.226.254]) (authenticated bits=0) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id o7N1Skcr036084; Sun, 22 Aug 2010 21:28:48 -0400 (EDT) (envelope-from john@jnielsen.net) References: <20100822031045.sl4d10544k0s80kw@newwebmail.jnielsen.net> In-Reply-To: Mime-Version: 1.0 (iPhone Mail 8A306) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <3E7350F2-5295-4D83-B807-C7F2246F9D2C@jnielsen.net> X-Mailer: iPhone Mail (8A306) From: John Nielsen Date: Sun, 22 Aug 2010 21:29:12 -0400 To: "gshapiro@freebsd.org" X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on ns1.jnielsen.net X-Virus-Status: Clean Cc: FreeBSD Stable , Stefan Bethke Subject: Re: Apparent dnsbl bug in Sendmail or m4 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 01:50:23 -0000 It was pointed out to me that the example in freebsd.mc has been double-quot= ed for some time. That's what I get for carrying old config files around for= too long I suppose. Sorry for the noise and thanks again all for the prompt= replies. On Aug 22, 2010, at 3:48 PM, John Nielsen wrote: > On Aug 22, 2010, at 6:40 AM, Stefan Bethke wrote: >=20 >> Am 22.08.2010 um 10:00 schrieb Stefan Bethke: >>=20 >>> FEATURE(`dnsbl', `bl.spamcop.net', `"550 " $&{client_addr} "foo" $&{clie= nt_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 sing= le argument into two. >=20 > That makes a lot of sense, especially when combined with the off-list sugg= estions I got to double-quote the error message. >=20 >> Tracing the ifelses with -d aceq I see this for the last ifelse in cf/fea= ture/dnsbl.m4: >>=20 >> m4trace: -1- ifelse(`X"550 Mail from " $&{client_addr} " rejected', `see h= ttp://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 $: _DNSB= L_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. >=20 > 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 make= s the problem go away. >=20 > Does someone with some m4-fu want to take a stab at producing a fix? The p= roblem appears in the 7-arg "ifelse" in the last few lines of /usr/share/sen= dmail/cf/feature/dnsbl.m4, though the source could of course be missing quot= es earlier in the file. >=20 > I'd be happy to test any proposed patches and submit a bug report to Sendm= ail 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. >=20 > Thanks! >=20 > JN >=20