Mercurial > dnsbl
changeset 52:a84752107aca
host names cannot have consecutive periods.
author | carl |
---|---|
date | Thu, 15 Jul 2004 23:01:41 -0700 |
parents | 9f2971c692d0 |
children | c2371bb6cf84 |
files | ChangeLog dnsbl.spec.in package.bash src/scanner.cpp |
diffstat | 4 files changed, 34 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jul 13 08:54:03 2004 -0700 +++ b/ChangeLog Thu Jul 15 23:01:41 2004 -0700 @@ -1,5 +1,12 @@ $Id$ +3.4 2004-07-15 + Tokens with two consecutive periods cannot be ip addresses + or host names. + + Updated dnsbl.spec file for building rpms from John Gunkel. + + 3.3 2004-07-09 Drop root priviledges properly, including the group id.
--- a/dnsbl.spec.in Tue Jul 13 08:54:03 2004 -0700 +++ b/dnsbl.spec.in Thu Jul 15 23:01:41 2004 -0700 @@ -1,11 +1,10 @@ Summary: DNSBL Sendmail Milter Name: dnsbl -Version: 3.3 +Version: 3.4 Release: 2 Copyright: GPL Group: System Environment/Daemons Source: http://www.five-ten-sg.com/util/dnsbl.tar.gz -Patch0: dnsbl.rc.patch BuildRoot: %{_tmppath}/%{name}-%{version} Requires(pre): /usr/sbin/groupadd @@ -29,7 +28,6 @@ %prep %setup -%patch0 -p1 %build pwd @@ -49,12 +47,13 @@ install -m 644 dnsbl.conf %{buildroot}/etc/dnsbl/dnsbl.conf install -m 644 html-tags.conf %{buildroot}/etc/dnsbl/html-tags.conf install -m 644 tld.conf %{buildroot}/etc/dnsbl/tld.conf +install -m 644 sample.conf %{buildroot}/etc/dnsbl/sample.conf mkdir -p %{buildroot}/usr/sbin install -m 755 dnsbl %{buildroot}/usr/sbin/dnsbl -mkdir -p %{buildroot}/etc/init.d -install -m 755 dnsbl.rc %{buildroot}/etc/init.d/dnsbl +mkdir -p %{buildroot}/etc/rc.d/init.d +install -m 755 dnsbl.rc %{buildroot}/etc/rc.d/init.d/dnsbl mkdir -p %{buildroot}/var/run/dnsbl @@ -82,7 +81,7 @@ /sbin/service dnsbl start echo Remember to edit /etc/dnsbl.conf and add the following line to your sendmail.mc: -echo "INPUT_MAIL_FILTER(\`dnsbl\', \`S=local:/var/run/dnsbl/dnsbl.sock, F=T, T=C:30s;S:2m;R:2m;E:5m\')" +echo "INPUT_MAIL_FILTER(\`dnsbl\', \`S=local:/var/run/dnsbl/dnsbl.sock, F=T, T=C:30s;S:5m;R:5m;E:5m\')" echo @@ -99,12 +98,17 @@ %files %defattr(-,root,root) -%config /etc/dnsbl/ -/etc/init.d/dnsbl +%config(noreplace) /etc/dnsbl/ +%doc RELEASE_NOTES LICENSE sample.conf test.cpp +/etc/rc.d/init.d/dnsbl /usr/sbin/dnsbl %dir %attr(0750,dnsbl,root) /var/run/dnsbl %changelog +* Thu Jul 15 2004 John Gunkel <antispam@boing.ca> 1.3 +- patch to rc file no longer needed +- see RELEASE_NOTES + * Mon Jul 05 2004 John Gunkel <jgunkel@palliser.ca> 1.2 - Fixed some typos - removed patch into separate file
--- a/package.bash Tue Jul 13 08:54:03 2004 -0700 +++ b/package.bash Thu Jul 15 23:01:41 2004 -0700 @@ -1,6 +1,6 @@ #!/bin/bash -VER=dnsbl-3.3 +VER=dnsbl-3.4 mkdir $VER target1=/home/httpd/html/510sg/util/dnsbl.tar.gz target2=/home/httpd/html/510sg/dnsbl.conf
--- a/src/scanner.cpp Tue Jul 13 08:54:03 2004 -0700 +++ b/src/scanner.cpp Thu Jul 15 23:01:41 2004 -0700 @@ -957,8 +957,9 @@ // not an email address or message id char *p1 = strchr((const char *)pending, '.'); char *p2 = strrchr((const char *)pending, '.'); - if (p1 && (p1 != p2)) { - // have two periods, so three components + char *p3 = strstr((const char *)pending, ".."); + if (p1 && (p1 != p2) & !p3) { + // have two periods, so at least three components, and no empty components for (int i=0; i<count; i++) pending[i] = tolower(pending[i]); // is last component a tld? string_set::iterator i = memory->tlds->find(p2+1); @@ -1012,6 +1013,7 @@ char *p = strrchr((const char *)pending, '/'); if (p && // have a leading / strchr(p, '.') && // require at least one . in a dns name + !strstr(p, "..") && // no empty components in the dns name (strncasecmp((const char *)pending, "http", 4) == 0)) { // must start with protocol // we seem to have a host name p++; // skip the last /