From: Chuck Foster To: djb-qmail@koobera.math.uic.edu Subject: tcpcontrol on domain names Date: Sat, 6 Sep 1997 00:39:08 +0100 (BST) Well it was one of those spare tuits before going to bed (well the Outer Limits on tv anyway!) so I ended up adding domain lookups into tcpcontrol as it was something that always nagged me as being as useful as IP lookups. Here's the simple patch to tcpcontrol.c that I made; I didn't bother with tcpremoteinfo checking with domains too, but its no hardship to add if you really need it. Feel free to use the patch if you think its something you want to use in the great spam fight. Only one condition of use: you can't use: .uu.net:deny (grin) Usual disclaimers apply, ie. it worked for me but it might not work for you and I am not responsible for your use/abuse of the code - use it at your own risk! *** tcpcontrol.c 1997/09/05 23:10:07 1.1 --- tcpcontrol.c 1997/09/05 23:13:16 *************** *** 152,157 **** --- 152,167 ---- if (tcpremoteip[--i] == '.') if (findrule(tcpremoteip,i + 1)) return; + if (tcpremotehost) { + unsigned int s; + i = 0; + s = str_len(tcpremotehost); + if (findrule(tcpremotehost, s)) return; + while (++i < s) + if (tcpremotehost[i] == '.') + if (findrule(tcpremotehost + i, s - i)) return; + } + if (findrule("",0)) return; } .