Apparent dnsbl bug in Sendmail or m4

Stefan Bethke stb at lassitu.de
Sun Aug 22 10:40:32 UTC 2010


Am 22.08.2010 um 10:00 schrieb Stefan Bethke:

> FEATURE(`dnsbl', `bl.spamcop.net', `"550 " $&{client_addr} "foo" $&{client_addr} ""')dnl

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.  Tracing the ifelses with -d aceq I see this for the last ifelse in cf/feature/dnsbl.m4:

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<?>$+         
$#discard $: _DNSBL_SRV_', `R<?>$+              $#error $@ 5.7.1 $: _DNSBL_MSG_'
) -> ???
m4trace: -1- ifelse(...) -> `'
m4trace: -1- ifelse ...


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.


Stefan

-- 
Stefan Bethke <stb at lassitu.de>   Fon +49 151 14070811





More information about the freebsd-stable mailing list