[-]
[+]
|
Changed |
spamdyke.spec
|
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/documentation/Changelog.txt
^
|
@@ -1,3 +1,67 @@
+VERSION 4.2.1: 1/4/2012
+ Added a filter to sendrecv so input containing "\r\n" will be translated into
+ CRLF without being interpreted as a line terminator (so multiple commands
+ can be sent in a single "packet") and input containing "\0" will be
+ translated into NULL bytes so NULL characters don't have to be embedded in
+ the test scripts.
+ Added support for the RSET command to smtpdummy.
+ Added a "priority" field to the input file for dnsdummy to force some
+ responses to be sent after others, no matter what order they were received.
+ Fixed nihdns_mx() to query names for A records using the query types
+ configured for MX queries, not A queries. Thanks to Eric Shubert for
+ reporting this one.
+ Changed smtp_filter() and middleman() to discard any buffered input after TLS
+ is started. This prevents the injection of commands into a secure session
+ by sending extra input in the same packet as the "STARTTLS" command. Not
+ really a security problem but good practice anyway. Thanks to Eric Shubert
+ for reporting this one.
+ Fixed a bug in examine_entry() that was cutting off 1-3 characters from the
+ end of target_entry every time it was called.
+ Changed check_ip_in_rdns_keyword() to return the line number of the matching
+ file as its return value and the name of the matchine file in a reference
+ variable.
+ Added reject_reason and strlen_reject_reason to struct rejection_data to
+ allow the triggered filter to return some text to indicate why it triggered.
+ Changed set_rejection() to accept new parameters to set reason text within the
+ rejection structure if available.
+ Changed set_rejection() to accept a new parameter to append to the rejection
+ text if available.
+ Added reset_rejection() to change either the rejection text or the reason text
+ within an existing rejection_data structure without erasing previously-set
+ values.
+ Changed nihdns_rbl(), check_dnsrbl() and check_rhsbl() not to accept a format
+ string or build part of the rejection message. That job belongs to the
+ caller(s).
+ Changed filter_rdns_blacklist(), filter_rdns_blacklist_file(),
+ filter_rdns_blacklist_dir(), filter_ip_blacklist(),
+ filter_ip_in_rdns_blacklist(), filter_dns_rbl(), filter_dns_rhsbl(),
+ filter_sender_blacklist(), filter_sender_rhsbl() and
+ filter_recipient_blacklist() to save the reason for their rejection in the
+ reject_reason variable in rejection_data.
+ Changed the log messages showing ALLOWED/DENIED to always output the "reason:"
+ field and fill it with the text returned by the triggered filter so the
+ sysadmin can figure out what happened or "(empty)" if no text was saved.
+ Thanks to Eric Shubert for suggesting this one.
+ Changed the way DNS timeout values are read from the configuration file,
+ the command line, /etc/resolv.conf and the environment so that values given
+ in the config file or on the command line are not overridden by values in
+ /etc/resolv.conf or the environment. Thanks to Teodor Milkov for reporting
+ this one.
+ Changed the reject-empty-rdns filter, the IP-related black/whitelist filters
+ and the IP-related RBL filters to skip their tests if the incoming IP address
+ is 0.0.0.0. This is for connections from IPv6 hosts -- those filters can be
+ skipped until full IPv6 support can be added. Thanks to Daniel Anliker for
+ suggesting this.
+ Changed the way the flag FILTER_DECISION_TRANSIENT_DO_NOT_FILTER is handled by
+ smtp_filter() and middleman() so a transient non-rejection (e.g a recipient
+ whitelist) isn't held over to later recipients. The interaction between
+ the recipient whitelist and the graylist filter was fixed in version 4.0.0
+ but an issue still remained between recipient whitelists and other
+ non-transient rejections like the missing rDNS filter. Thanks to bischowski
+ for reporting this one.
+ Changed smtpdummy to use memchr() instead of strchr() so testing input with
+ NULL bytes will work correctly.
+
VERSION 4.2.0: 2/5/2011
Changed read_file() to return the number of usable lines read, instead of the
total number of lines (including comments and whitespace).
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/documentation/FAQ.html
^
|
@@ -282,6 +282,7 @@
<ul>
<li>Apple OS X 10.6</li>
<li>CentOS 5.2 64-bit</li>
+<li>CentOS 5.5</li>
<li>Fedora Core 4</li>
<li>Fedora 11</li>
<li>FreeBSD 2.2.2</li>
@@ -294,7 +295,7 @@
</p><p>
spamdyke's test scripts execute correctly on the following systems:
<ul>
-<li>Fedora Core 4, netqmail 1.03 (patched with TLS and SMTP AUTH) and vpopmail 5.4.10</li>
+<li>CentOS 5.5, netqmail 1.03 (patched with TLS and SMTP AUTH) and vpopmail 5.4.10</li>
<li>OpenBSD 4.3, netqmail 1.03 (no additional patches) and vpopmail 5.4.10</li>
</ul>
If you are unable to configure or compile spamdyke correctly, please send an email to
@@ -652,8 +653,9 @@
and vpopmail (if present) only complicates matters. Since it's better to
accept spam than reject legitimate email, this feature doesn't exist (yet).
</p><p>
-If you have a suggestion or method for checking recipient validity, I'd love to know
-about it. Note: recompiling qmail or reusing qmail's source code is not an option.
+I've actually written the code to do recipient checking properly, by parsing qmail's
+files the same way qmail does to determine if an address can receive a message.
+That code hasn't been integrated into spamdyke yet because it hasn't been fully tested.
</p>
<a name="SUGGESTION5"></a>
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/documentation/README.html
^
|
@@ -20,7 +20,7 @@
features and behavior. If you need documentation for an older version, each version's README
file is included in the download package for that version.
</p><p>
-<b>This document applies to spamdyke version 4.2.0.</b>
+<b>This document applies to spamdyke version 4.2.1.</b>
<ul>
<li><a href="#ABOUT">About spamdyke</a></li>
<li><a href="#SUPPORT">Support</a></li>
@@ -2769,9 +2769,9 @@
</dl>
</p><p>
Each message log entry (produced when the value of <code>log-level</code> is <code>info</code> or higher) takes the following form
-(error messages and debugging statements are text preceeded by <code>ERROR:</code>, <code>FILTER:</code>, <code>DEBUG:</code> or <code>EXCESSIVE:</code>):
+(error messages and debugging statements are always preceeded by <code>ERROR:</code>, <code>FILTER:</code>, <code>DEBUG:</code> or <code>EXCESSIVE:</code>):
<dl>
-<dd><code>CODE from: SENDER to: RECIPIENT origin_ip: IPADDRESS origin_rdns: RDNSNAME auth: USERNAME encryption: TYPE [ reason: REALCODE ]</code>
+<dd><code>CODE from: SENDER to: RECIPIENT origin_ip: IPADDRESS origin_rdns: RDNSNAME auth: USERNAME encryption: TYPE reason: REASON</code>
</dl>
This format makes the logs very easy to parse from other scripts for monitoring
and graphing.
@@ -2809,7 +2809,10 @@
<tr>
<td><code>DENIED_ACCESS_DENIED</code></td>
<td>The connection was blocked because the remote server's
- IP address or rDNS name was found in the access file with a <code>deny</code> command.</td>
+IP address or rDNS name was found in the access file with a <code>deny</code> command.<br/>
+<br/>
+<code>REASON</code> will contain the filename and matching line number of the access file where the <code>deny</code> was found.
+</td>
<td>
<code>access-file</code>
</td>
@@ -2826,7 +2829,11 @@
<tr>
<td><code>DENIED_BLACKLIST_IP</code></td>
<td>The connection was blocked because the remote server's IP
- address is blacklisted.</td>
+address is blacklisted.<br/>
+<br/>
+<code>REASON</code> will contain the matching entry if <code>ip-blacklist-entry</code> was used or the filename and matching line
+number if <code>ip-blacklist-file</code> was used.
+</td>
<td>
<code>ip-blacklist-entry</code><br />
<code>ip-blacklist-file</code>
@@ -2836,7 +2843,15 @@
<tr>
<td><code>DENIED_BLACKLIST_NAME</code></td>
<td>The connection was blocked because
- the remote server's rDNS name is blacklisted.</td>
+the remote server's rDNS name is blacklisted.<br/>
+<br/>
+<code>REASON</code> will contain:
+<ul>
+<li>the matching entry if <code>rdns-blacklist-entry</code> was used,
+<li>the filename and matchine line number if <code>rdns-blacklist-file</code> was used, or
+<li>the full path to the matching file if <code>rdns-blacklist-dir</code> was used.
+</ul>
+</td>
<td>
<code>rdns-blacklist-entry</code><br/>
<code>rdns-blacklist-file</code><br/>
@@ -2886,7 +2901,11 @@
<td><code>DENIED_IP_IN_RDNS</code></td>
<td>The connection was blocked because the remote server's
IP address was found in the remote server's rDNS name <u>and</u> a prohibited
- keyword was found in the remote server's rDNS name.</td>
+ keyword was found in the remote server's rDNS name.<br/>
+<br/>
+<code>REASON</code> will contain the matching entry if <code>ip-in-rdns-keyword-blacklist-entry</code> was used or
+the filename and matching line if <code>ip-in-rdns-keyword-blacklist-file</code> was used.
+</td>
<td>
<code>ip-in-rdns-keyword-blacklist-entry</code><br />
<code>ip-in-rdns-keyword-blacklist-file</code>
@@ -2896,14 +2915,20 @@
<tr>
<td><code>DENIED_OTHER</code></td>
<td>The connection was rejected by qmail (or another downstream filter),
-not spamdyke.</td>
+not spamdyke.<br/>
+<br/>
+<code>REASON</code> will contain the rejection message given by the qmail (or other downstream filter).
+</td>
<td> </td>
</tr>
<tr>
<td><code>DENIED_RBL_MATCH</code></td>
<td>The connection was blocked because the remote server's IP
- address was found on a DNS RBL.</td>
+address was found on a DNS RBL.<br/>
+<br/>
+<code>REASON</code> will contain the name of the matched RBL and the text it returned (if any).
+</td>
<td>
<code>dns-blacklist-entry</code><br/>
<code>dns-blacklist-file</code><br/>
@@ -2933,7 +2958,10 @@
<td>The connection was blocked because the remote server's reverse
DNS name was found on a right hand-side DNS blacklist (RHSBL) <b>OR</b>
because the sender's domain name was found on a right hand-side DNS blacklist
-(RHSBL).</td>
+(RHSBL).<br/>
+<br/>
+<code>REASON</code> will contain the name of the matched RBL and the text it returned (if any).
+</td>
<td>
<code>rhs-blacklist-entry</code><br/>
<code>rhs-blacklist-file</code><br/>
@@ -2943,7 +2971,11 @@
<tr>
<td><code>DENIED_RECIPIENT_BLACKLISTED</code></td>
<td>The recipient was blocked because the recipient
- email address is blacklisted.</td>
+email address is blacklisted.<br/>
+<br/>
+<code>REASON</code> will contain the matching entry if <code>recipient-blacklist-entry</code> was used or
+the filename and matching line if <code>recipient-blacklist-file</code> was used.
+</td>
<td>
<code>recipient-blacklist-entry</code><br />
<code>recipient-blacklist-file</code>
@@ -2970,7 +3002,11 @@
<tr>
<td><code>DENIED_SENDER_BLACKLISTED</code></td>
<td>The connection was blocked because the sender's
- email address is blacklisted.</td>
+ email address is blacklisted.<br/>
+<br/>
+<code>REASON</code> will contain the matching entry if <code>sender-blacklist-entry</code> was used or
+the filename and matching line if <code>sender-blacklist-file</code> was used.
+</td>
<td>
<code>sender-blacklist-entry</code><br />
<code>sender-blacklist-file</code>
@@ -3029,7 +3065,7 @@
<td><code>TIMEOUT</code></td>
<td>The connection timed out, either in total time or idle time.
If the connection was already being blocked for another reason, the code for that
- error is given as <code>REALCODE</code>.</td>
+ error is given as <code>REASON</code>.</td>
<td>
<code>connection-timeout-secs</code><br/>
<code>idle-timeout-secs</code>
@@ -3104,10 +3140,8 @@
</table>
</p><p>
-<code>REALCODE</code> is only present if <code>CODE</code> is <code>TIMEOUT</code> and the connection was going to be
-blocked anyway. For example, if a remote server has no rDNS entry and the
-connection is going to be blocked but the connection times out instead, <code>CODE</code>
-will be <code>TIMEOUT</code> and <code>REALCODE</code> will be <code>DENIED_RDNS_MISSING</code>.
+<code>REASON</code> is provided to give an explanation of why a connection was blocked.
+See the table above for the possible values.
</p>
<a name="SMTP_ERROR"></a>
@@ -3604,7 +3638,7 @@
</dd>
</dl>
<b>NOTE: It is not normally necessary to set these options; they are only useful in very specific situations where a local
-DNS server does not respond quickly to a specific type of query.
+DNS server does not respond quickly to a specific type of query.</b>
</p><p>
Most DNS queries are performed using UDP packets, which can carry no more than 512 bytes of data.
This is enough data for typical DNS data, but occasionally some records are too big to fit in 512 bytes. When that
@@ -4219,7 +4253,7 @@
<code>local-domains-file</code><br />
<code>recipient-blacklist-entry</code><br />
<code>recipient-blacklist-file</code><br />
-<code>reject-identical-sender-recipient</code<br />
+<code>reject-identical-sender-recipient</code><br />
<code>reject-missing-sender-mx</code><br />
<code>sender-blacklist-entry</code><br />
<code>sender-blacklist-file</code>
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/documentation/UPGRADING.txt
^
|
@@ -7,6 +7,9 @@
options and features. Be sure to check that file for full details on these
changes.
+UPGRADING FROM VERSION 4.2.0 to 4.2.1:
+ All changes are backwards compatible.
+
UPGRADING FROM VERSION 4.1.0 to 4.2.0:
All changes are backwards compatible.
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/documentation/development_notes/TODO.txt
^
|
@@ -1,4 +1,13 @@
HIGHEST PRIORITIES:
+ Full database support, especially for the graylist filter, to make life
+ simpler for administrators of large sites.
+ Add a "proxy mode" that will listen for incoming connections and tunnel
+ them to another server/port for non-qmail servers (or replace tcpserver
+ on qmail servers). Use TLS to communicate with the remote server if
+ possible. Listen on multiple interfaces/ports.
+ Add full support for IPv6.
+
+ALSO TODO:
Add recipient validation. This will probably require reimplementing
qmail's/vpopmail's .qmail file parser. DO NOT reuse code from qmail or
vpopmail.
@@ -15,20 +24,12 @@
injection).
Add the ability to insert headers instead of rejecting a message.
Add the ability to modify the subject line instead of rejecting a message.
- Full database support, especially for the graylist filter, to make life
- simpler for administrators of large sites.
Add a feature that would automatically whitelist senders for a recipient
if the recipient had sent a message to the sender (an auto-whitelist).
Credit goes to Roman V. Isaev.
- Add a "proxy mode" that will listen for incoming connections and tunnel
- them to another server/port for non-qmail servers (or replace tcpserver
- on qmail servers). Use TLS to communicate with the remote server if
- possible. Listen on multiple interfaces/ports.
Wrap spamdyke in an NT service so MS Exchange administrators can use it.
Tarpit mode to trap botnet spammers the way LaBrea used to trap Code Red
attackers.
-
-LOWER PRIORITIES:
Add the ability to require TLS/SSL before authentication is allowed (e.g. a
"require-tls" value for "smtp-auth-level". Credit goes to Eric Shubert.
Consider extending sender/recipient wildcards to allow user@ instead of just
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/documentation/spamdyke.conf.example
^
|
@@ -1,4 +1,4 @@
-# This is an example spamdyke configuration file for spamdyke version 4.2.0.
+# This is an example spamdyke configuration file for spamdyke version 4.2.1.
#
# Without editing, this file will do nothing -- every available option is
# commented out. To enable options, edit the values and remove the comment
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/Makefile.in
^
|
@@ -1,7 +1,7 @@
# @configure_input@
################################################################################
# spamdyke -- a filter for stopping spam at connection time.
-# Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+# Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/base64.c
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/base64.h
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/config.h.in
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/config_test.c
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/config_test.h
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/configuration.c
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -98,6 +98,7 @@
target_options->transient_reject_message_buf[0] = '\0';
target_options->short_reject_message_buf[0] = '\0';
target_options->transient_short_reject_message_buf[0] = '\0';
+ target_options->prev_rejection = NULL;
target_options->nihdns_primary_server_data[0].sin_addr.s_addr = INADDR_ANY;
target_options->nihdns_secondary_server_data[0].sin_addr.s_addr = INADDR_ANY;
@@ -1060,9 +1061,9 @@
CONFIG_ACCESS_NONE,
CONFIG_LOCATION_CMDLINE | CONFIG_LOCATION_GLOBAL_FILE,
{ "dns-timeout-secs", required_argument, NULL, -1 },
- { .integer_value = DEFAULT_TIMEOUT_NIHDNS_TOTAL_SECS },
- { .integer_value = DEFAULT_TIMEOUT_NIHDNS_TOTAL_SECS },
- { .get_integer = CONFIG_ACCESSOR_INTEGER(nihdns_timeout_total_secs) },
+ { .integer_value = -1 },
+ { .integer_value = -1 },
+ { .get_integer = CONFIG_ACCESSOR_INTEGER(nihdns_timeout_total_secs_parameter) },
{ .integer_range = { .minimum = 0, .maximum = INT32_MAX } },
FILTER_DECISION_UNDECIDED,
FILTER_GRACE_NONE,
@@ -2938,6 +2939,8 @@
tmp_settings.smtp_auth_response[0] = '\0';
tmp_settings.smtp_auth_username[0] = '\0';
+ tmp_settings.current_options->nihdns_timeout_total_secs_system = -1;
+
tmp_settings.connection_start = 0;
tmp_settings.command_start = 0;
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/configuration.h
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/configure
^
|
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for spamdyke 4.2.0.
+# Generated by GNU Autoconf 2.61 for spamdyke 4.2.1.
#
# Report bugs to <samc (at) silence (dot) org>.
#
@@ -574,8 +574,8 @@
# Identity of this package.
PACKAGE_NAME='spamdyke'
PACKAGE_TARNAME='-spamdyke-'
-PACKAGE_VERSION='4.2.0'
-PACKAGE_STRING='spamdyke 4.2.0'
+PACKAGE_VERSION='4.2.1'
+PACKAGE_STRING='spamdyke 4.2.1'
PACKAGE_BUGREPORT='samc (at) silence (dot) org'
ac_unique_file="spamdyke.h"
@@ -1178,7 +1178,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures spamdyke 4.2.0 to adapt to many kinds of systems.
+\`configure' configures spamdyke 4.2.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1239,7 +1239,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of spamdyke 4.2.0:";;
+ short | recursive ) echo "Configuration of spamdyke 4.2.1:";;
esac
cat <<\_ACEOF
@@ -1332,7 +1332,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-spamdyke configure 4.2.0
+spamdyke configure 4.2.1
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1346,7 +1346,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by spamdyke $as_me 4.2.0, which was
+It was created by spamdyke $as_me 4.2.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -7193,7 +7193,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by spamdyke $as_me 4.2.0, which was
+This file was extended by spamdyke $as_me 4.2.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7242,7 +7242,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-spamdyke config.status 4.2.0
+spamdyke config.status 4.2.1
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/configure.ac
^
|
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
################################################################################
# spamdyke -- a filter for stopping spam at connection time.
-# Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+# Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -17,7 +17,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
AC_PREREQ(2.59)
-AC_INIT([[spamdyke]], [[4.2.0]], [[samc (at) silence (dot) org]])
+AC_INIT([[spamdyke]], [[4.2.1]], [[samc (at) silence (dot) org]])
AC_CONFIG_SRCDIR([spamdyke.h])
AC_CONFIG_HEADER([config.h])
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/dns.c
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -463,7 +463,7 @@
(target_timeout > 0) &&
(target_timeout <= 65536))
{
- current_settings->current_options->nihdns_timeout_total_secs = target_timeout * current_settings->current_options->nihdns_attempts_total;
+ current_settings->current_options->nihdns_timeout_total_secs_system = target_timeout * current_settings->current_options->nihdns_attempts_total;
SPAMDYKE_LOG_EXCESSIVE(current_settings, LOG_DEBUGX_RESOLV_QUERY_TIMEOUT_ENV, ENVIRONMENT_RESOLV_OPTION, target_timeout);
}
@@ -669,6 +669,7 @@
socklen_t server_address_len;
int num_types;
int types[NUM_NIHDNS_TYPE];
+ int current_timeout_total_secs;
return_value = -1;
error_occurred = 0;
@@ -777,6 +778,7 @@
num_queries = 0;
num_primary = -1;
num_secondary = -1;
+ current_timeout_total_secs = (current_settings->current_options->nihdns_timeout_total_secs_parameter != -1) ? current_settings->current_options->nihdns_timeout_total_secs_parameter : ((current_settings->current_options->nihdns_timeout_total_secs_system != -1) ? current_settings->current_options->nihdns_timeout_total_secs_system : DEFAULT_TIMEOUT_NIHDNS_TOTAL_SECS);
do
{
@@ -916,8 +918,9 @@
if (num_packets_sent > 0)
{
- tmp_timeval.tv_sec = MINVAL(current_settings->current_options->nihdns_timeout_total_secs - (time(NULL) - start_time), current_settings->current_options->nihdns_timeout_total_secs / current_settings->current_options->nihdns_attempts_total);
+ tmp_timeval.tv_sec = MINVAL(current_timeout_total_secs - (time(NULL) - start_time), current_timeout_total_secs / current_settings->current_options->nihdns_attempts_total);
tmp_timeval.tv_usec = 0;
+ SPAMDYKE_LOG_EXCESSIVE(current_settings, LOG_DEBUGX_DNS_TIMEOUT, tmp_timeval.tv_sec);
while (!error_occurred &&
(tmp_timeval.tv_sec > 0))
@@ -1171,7 +1174,7 @@
if (return_value >= 0)
break;
- tmp_timeval.tv_sec = MINVAL(current_settings->current_options->nihdns_timeout_total_secs - (time(NULL) - start_time), current_settings->current_options->nihdns_timeout_total_secs / current_settings->current_options->nihdns_attempts_total);
+ tmp_timeval.tv_sec = MINVAL(current_timeout_total_secs - (time(NULL) - start_time), current_timeout_total_secs / current_settings->current_options->nihdns_attempts_total);
tmp_timeval.tv_usec = 0;
}
else
@@ -1224,7 +1227,7 @@
* FAILURE: 0
* SUCCESS: 1
*/
-int nihdns_rbl(struct filter_settings *current_settings, char **target_name_array, char *target_message_format, char *target_message_buf, int size_target_message_buf, char **target_rbl_array, int *return_target_name_index, struct previous_action *history)
+int nihdns_rbl(struct filter_settings *current_settings, char **target_name_array, char *target_message_buf, int size_target_message_buf, char **target_rbl_array, int *return_target_name_index, struct previous_action *history)
{
int return_value;
int i;
@@ -1242,12 +1245,9 @@
int num_queries;
int exit_loop;
int target_name_index;
- int num_names;
- int num_rbls;
struct previous_action current_lookup;
struct previous_action *tmp_lookup;
char **cname_array;
- int tmp_strlen;
union
{
char *char_ptr;
@@ -1317,16 +1317,9 @@
case NIHDNS_TYPE_A:
SPAMDYKE_LOG_EXCESSIVE(current_settings, LOG_DEBUGX_DNS_A, target_name_array[target_name_index], answer_ptr[0], answer_ptr[1], answer_ptr[2], answer_ptr[3]);
- if ((target_message_format != NULL) &&
- (target_message_buf != NULL) &&
+ if ((target_message_buf != NULL) &&
(size_target_message_buf > 0))
- {
- for (num_names = 0; target_name_array[num_names] != NULL; num_names++);
- for (num_rbls = 0; target_rbl_array[num_rbls] != NULL; num_rbls++);
-
- if ((tmp_strlen = snprintf(target_message_buf, size_target_message_buf, "%s", target_message_format)) < size_target_message_buf)
- snprintf(target_message_buf + tmp_strlen, size_target_message_buf - tmp_strlen, "%s", target_rbl_array[(target_name_index * num_rbls) / num_names]);
- }
+ target_message_buf[0] = '\0';
if (return_target_name_index != NULL)
*return_target_name_index = target_name_index;
@@ -1412,7 +1405,7 @@
}
if (cname_array[0] != NULL)
- return_value = nihdns_rbl(current_settings, cname_array, target_message_format, target_message_buf, size_target_message_buf, target_rbl_array, return_target_name_index, ¤t_lookup);
+ return_value = nihdns_rbl(current_settings, cname_array, target_message_buf, size_target_message_buf, target_rbl_array, return_target_name_index, ¤t_lookup);
for (i = 0; (i < num_cnames) && (cname_array[i] != NULL); i++)
free(cname_array[i]);
@@ -1833,7 +1826,7 @@
return_value = 1;
}
else
- return_value = nihdns_a_inner(current_settings, (char *)host, NULL, NULL, 1, current_settings->current_options->nihdns_query_type_mx);
+ return_value = nihdns_a_inner(current_settings, (char *)host, NULL, NULL, 1, current_settings->current_options->nihdns_query_type_a);
answer_ptr += size;
}
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/dns.h
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -23,7 +23,7 @@
#define NIHDNS_CLASS_INTERNET 1
int nihdns_initialize(struct filter_settings *current_settings, int close_socket);
-int nihdns_rbl(struct filter_settings *current_settings, char **target_name_array, char *target_message_format, char *target_message_buf, int size_target_message_buf, char **target_rbl, int *return_target_name_index, struct previous_action *history);
+int nihdns_rbl(struct filter_settings *current_settings, char **target_name_array, char *target_message_buf, int size_target_message_buf, char **target_rbl, int *return_target_name_index, struct previous_action *history);
int nihdns_ptr(struct filter_settings *current_settings, char *target_ip);
int nihdns_mx(struct filter_settings *current_settings, char *target_name, struct previous_action *history);
int nihdns_a(struct filter_settings *current_settings, char *target_name, int *return_octets, struct previous_action *history, int disqualify_localhost);
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/environment.c
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/environment.h
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/exec.c
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/exec.h
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/filter.c
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -57,20 +57,105 @@
static struct rejection_data *rejection = REJECTION_DATA;
-void set_rejection(struct filter_settings *current_settings, int rejection_index, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf)
+void reset_rejection(struct filter_settings *current_settings, int rejection_index, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *input_reason, char *target_reason_buf, int size_target_reason_buf)
{
+ int i;
+
+ if (target_rejection != NULL)
+ {
+ if ((target_rejection_buf != NULL) &&
+ (target_rejection_buf != &rejection[rejection_index]))
+ {
+ if ((current_settings->current_options->rejection_text[rejection_index] != NULL) &&
+ (target_message_buf != NULL) &&
+ (size_target_message_buf > 0))
+ {
+ target_rejection_buf->strlen_reject_message = MINVAL(strlen(current_settings->current_options->rejection_text[rejection_index]), size_target_message_buf);
+ memcpy(target_message_buf, current_settings->current_options->rejection_text[rejection_index], sizeof(char) * target_rejection_buf->strlen_reject_message);
+ target_message_buf[target_rejection_buf->strlen_reject_message] = '\0';
+ target_rejection_buf->reject_message = target_message_buf;
+ }
+
+ if ((input_reason != NULL) &&
+ (target_reason_buf != NULL) &&
+ (size_target_reason_buf > 0))
+ {
+ target_rejection_buf->strlen_reject_reason = MINVAL(strlen(input_reason), size_target_reason_buf);
+ memcpy(target_reason_buf, input_reason, sizeof(char) * target_rejection_buf->strlen_reject_reason);
+ target_reason_buf[target_rejection_buf->strlen_reject_reason] = '\0';
+
+ for (i = 0; i < target_rejection_buf->strlen_reject_reason; i++)
+ if (target_reason_buf[i] == REASON_REPLACE_TARGET)
+ target_reason_buf[i] = REASON_REPLACE_REPLACEMENT;
+
+ target_rejection_buf->reject_reason = target_reason_buf;
+ }
+
+ *target_rejection = target_rejection_buf;
+ }
+ else
+ set_rejection(current_settings, rejection_index, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, input_reason, target_reason_buf, size_target_reason_buf);
+ }
+
+ return;
+ }
+
+void set_rejection(struct filter_settings *current_settings, int rejection_index, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *append_message, char *input_reason, char *target_reason_buf, int size_target_reason_buf)
+ {
+ int i;
+
if (target_rejection != NULL)
{
- if ((current_settings->current_options->rejection_text[rejection_index] != NULL) &&
- (target_rejection_buf != NULL) &&
- (target_message_buf != NULL) &&
- (size_target_message_buf > 0))
+ if ((target_rejection_buf != NULL) &&
+ (((current_settings->current_options->rejection_text[rejection_index] != NULL) &&
+ (target_message_buf != NULL) &&
+ (size_target_message_buf > 0)) ||
+ ((input_reason != NULL) &&
+ (target_reason_buf != NULL) &&
+ (size_target_reason_buf > 0))))
{
memcpy(target_rejection_buf, &rejection[rejection_index], sizeof(struct rejection_data));
- target_rejection_buf->strlen_reject_message = MINVAL(strlen(current_settings->current_options->rejection_text[rejection_index]), size_target_message_buf);
- memcpy(target_message_buf, current_settings->current_options->rejection_text[rejection_index], sizeof(char) * target_rejection_buf->strlen_reject_message);
- target_message_buf[target_rejection_buf->strlen_reject_message] = '\0';
- target_rejection_buf->reject_message = target_message_buf;
+
+ if ((current_settings->current_options->rejection_text[rejection_index] != NULL) &&
+ (target_message_buf != NULL) &&
+ (size_target_message_buf > 0))
+ {
+ target_rejection_buf->strlen_reject_message = MINVAL(strlen(current_settings->current_options->rejection_text[rejection_index]), size_target_message_buf);
+ memcpy(target_message_buf, current_settings->current_options->rejection_text[rejection_index], sizeof(char) * target_rejection_buf->strlen_reject_message);
+ if (append_message != NULL)
+ {
+ memcpy(target_message_buf + target_rejection_buf->strlen_reject_message, append_message, MINVAL(size_target_message_buf - target_rejection_buf->strlen_reject_message, strlen(append_message)));
+ target_rejection_buf->strlen_reject_message += MINVAL(size_target_message_buf - target_rejection_buf->strlen_reject_message, strlen(append_message));
+ }
+ target_message_buf[target_rejection_buf->strlen_reject_message] = '\0';
+ target_rejection_buf->reject_message = target_message_buf;
+ }
+ else if (append_message != NULL)
+ {
+ target_rejection_buf->strlen_reject_message = MINVAL(rejection[rejection_index].strlen_reject_message, size_target_message_buf);
+ memcpy(target_message_buf, rejection[rejection_index].reject_message, sizeof(char) * target_rejection_buf->strlen_reject_message);
+
+ memcpy(target_message_buf + target_rejection_buf->strlen_reject_message, append_message, MINVAL(size_target_message_buf - target_rejection_buf->strlen_reject_message, strlen(append_message)));
+ target_rejection_buf->strlen_reject_message += MINVAL(size_target_message_buf - target_rejection_buf->strlen_reject_message, strlen(append_message));
+
+ target_message_buf[target_rejection_buf->strlen_reject_message] = '\0';
+ target_rejection_buf->reject_message = target_message_buf;
+ }
+
+ if ((input_reason != NULL) &&
+ (target_reason_buf != NULL) &&
+ (size_target_reason_buf > 0))
+ {
+ target_rejection_buf->strlen_reject_reason = MINVAL(strlen(input_reason), size_target_reason_buf);
+ memcpy(target_reason_buf, input_reason, sizeof(char) * target_rejection_buf->strlen_reject_reason);
+ target_reason_buf[target_rejection_buf->strlen_reject_reason] = '\0';
+
+ for (i = 0; i < target_rejection_buf->strlen_reject_reason; i++)
+ if (target_reason_buf[i] == REASON_REPLACE_TARGET)
+ target_reason_buf[i] = REASON_REPLACE_REPLACEMENT;
+
+ target_rejection_buf->reject_reason = target_reason_buf;
+ }
*target_rejection = target_rejection_buf;
}
@@ -492,7 +577,7 @@
* NO DNSRBL MATCH FOUND: 0
* DNSRBL MATCH FOUND: 1
*/
-int check_dnsrbl(struct filter_settings *current_settings, char *target_ip_address, char **target_dnsrbl_array, char *target_message_format, char *target_message_buf, int size_target_message_buf, int *return_dnsrbl_index)
+int check_dnsrbl(struct filter_settings *current_settings, char *target_ip_address, char **target_dnsrbl_array, char *target_message_buf, int size_target_message_buf, int *return_dnsrbl_index)
{
int return_value;
int i;
@@ -526,7 +611,7 @@
}
if ((return_value == 0) &&
- (nihdns_rbl(current_settings, rbl_name_array, target_message_format, target_message_buf, size_target_message_buf, target_dnsrbl_array, return_dnsrbl_index, NULL) > 0))
+ (nihdns_rbl(current_settings, rbl_name_array, target_message_buf, size_target_message_buf, target_dnsrbl_array, return_dnsrbl_index, NULL) > 0))
return_value = 1;
for (i = 0; i < num_dnsrbl; i++)
@@ -551,7 +636,7 @@
* NO RHSBL MATCH FOUND: 0
* RHSBL MATCH FOUND: 1
*/
-int check_rhsbl(struct filter_settings *current_settings, char *target_right_side, char **target_rhsbl_array, char *target_message_format, char *target_message_buf, int size_target_message_buf, int *return_rhsbl_index)
+int check_rhsbl(struct filter_settings *current_settings, char *target_right_side, char **target_rhsbl_array, char *target_message_buf, int size_target_message_buf, int *return_rhsbl_index)
{
int return_value;
int i;
@@ -635,7 +720,7 @@
}
if ((return_value == 0) &&
- (nihdns_rbl(current_settings, rbl_name_array, target_message_format, target_message_buf, size_target_message_buf, target_rhsbl_array, &tmp_rhsbl_index, NULL) > 0))
+ (nihdns_rbl(current_settings, rbl_name_array, target_message_buf, size_target_message_buf, target_rhsbl_array, &tmp_rhsbl_index, NULL) > 0))
{
if (return_rhsbl_index != NULL)
*return_rhsbl_index = tmp_rhsbl_index % num_rhsbl;
@@ -791,9 +876,9 @@
/*
* RETURN VALUE:
* 0: target_name does not contain the IP address and a keyword
- * 1: target_name does contain the IP address and a keyword
+ * >0: target_name does contain the IP address and a keyword, returned value is line number in matching file
*/
-int check_ip_in_rdns_keyword(struct filter_settings *current_settings, char **target_keyword_file, char *target_ip, char *target_name, int strlen_target_name, char *verbose_match_format, int *return_ip_in_name)
+int check_ip_in_rdns_keyword(struct filter_settings *current_settings, char **target_keyword_file, char *target_ip, char *target_name, int strlen_target_name, char *verbose_match_format, int *return_ip_in_name, char **return_filename)
{
int return_value;
int i;
@@ -852,7 +937,10 @@
if (verbose_match_format != NULL)
SPAMDYKE_LOG_VERBOSE(current_settings, verbose_match_format, target_ip, target_name, orig_keyword, target_keyword_file[i], line_num + 1);
- return_value = 1;
+ if (return_filename != NULL)
+ *return_filename = target_keyword_file[i];
+
+ return_value = line_num + 1;
break;
}
@@ -892,7 +980,8 @@
((*target_action) < FILTER_DECISION_DO_FILTER)) &&
((return_action_locked == NULL) ||
!(*return_action_locked)) &&
- current_settings->current_options->check_rdns_exist)
+ current_settings->current_options->check_rdns_exist &&
+ (strcmp(current_settings->server_ip, DEFAULT_REMOTE_IP) != 0))
{
SPAMDYKE_LOG_DEBUG(current_settings, LOG_DEBUG_FILTER_RDNS_MISSING, (current_settings->strlen_server_name > 0) ? current_settings->server_name : LOG_MISSING_DATA);
@@ -900,7 +989,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_RDNS_MISSING, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_RDNS_MISSING, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, NULL, NULL, 0);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_RDNS_MISSING, current_settings->server_ip);
return_value = FILTER_DECISION_DO_FILTER;
@@ -939,7 +1028,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_IP_IN_NAME_CC, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_IP_IN_NAME_CC, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, NULL, NULL, 0);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_IP_IN_RDNS_CC, current_settings->server_ip, current_settings->server_name);
return_value = FILTER_DECISION_DO_FILTER;
@@ -1056,7 +1145,7 @@
return(return_value);
}
-int filter_rdns_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf)
+int filter_rdns_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf)
{
int return_value;
int i;
@@ -1078,7 +1167,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_BLACKLIST_NAME, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_BLACKLIST_NAME, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, current_settings->current_options->blacklist_rdns[i], target_reason_buf, size_target_reason_buf);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_RDNS_BLACKLIST, current_settings->server_ip, current_settings->server_name, current_settings->current_options->blacklist_rdns[i]);
return_value = FILTER_DECISION_DO_FILTER;
@@ -1089,11 +1178,12 @@
return(return_value);
}
-int filter_rdns_blacklist_file(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf)
+int filter_rdns_blacklist_file(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf)
{
int return_value;
int i;
int search_return;
+ char tmp_buf[MAX_BUF + 1];
return_value = FILTER_DECISION_UNDECIDED;
@@ -1112,7 +1202,8 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_BLACKLIST_NAME, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ snprintf(tmp_buf, MAX_BUF, "%s:%d", current_settings->current_options->blacklist_rdns_file[i], search_return);
+ set_rejection(current_settings, REJECTION_BLACKLIST_NAME, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, tmp_buf, target_reason_buf, size_target_reason_buf);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_RDNS_BLACKLIST_FILE, current_settings->server_ip, current_settings->server_name, current_settings->current_options->blacklist_rdns_file[i], search_return);
return_value = FILTER_DECISION_DO_FILTER;
@@ -1123,7 +1214,7 @@
return(return_value);
}
-int filter_rdns_blacklist_dir(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf)
+int filter_rdns_blacklist_dir(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf)
{
int return_value;
int i;
@@ -1146,7 +1237,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_BLACKLIST_NAME, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_BLACKLIST_NAME, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, search_return, target_reason_buf, size_target_reason_buf);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_RDNS_BLACKLIST_DIR, current_settings->server_ip, current_settings->server_name, current_settings->current_options->blacklist_rdns_dir[i], search_return);
return_value = FILTER_DECISION_DO_FILTER;
@@ -1208,11 +1299,12 @@
return(return_value);
}
-int filter_ip_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf)
+int filter_ip_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf)
{
int return_value;
int i;
int search_return;
+ char tmp_buf[MAX_BUF + 1];
return_value = FILTER_DECISION_UNDECIDED;
@@ -1231,7 +1323,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_BLACKLIST_IP, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_BLACKLIST_IP, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, current_settings->current_options->blacklist_ip[i], target_reason_buf, size_target_reason_buf);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_IP_BLACKLIST, current_settings->server_ip, current_settings->current_options->blacklist_ip[i]);
return_value = FILTER_DECISION_DO_FILTER;
@@ -1245,7 +1337,8 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_BLACKLIST_IP, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ snprintf(tmp_buf, MAX_BUF, "%s:%d", current_settings->current_options->blacklist_ip_file[i], search_return);
+ set_rejection(current_settings, REJECTION_BLACKLIST_IP, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, tmp_buf, target_reason_buf, size_target_reason_buf);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_IP_BLACKLIST_FILE, current_settings->server_ip, current_settings->current_options->blacklist_ip_file[i], search_return);
return_value = FILTER_DECISION_DO_FILTER;
@@ -1256,12 +1349,16 @@
return(return_value);
}
-int filter_ip_in_rdns_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf)
+int filter_ip_in_rdns_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf)
{
int return_value;
int i;
+ int line_num;
+ char *tmp_filename;
+ char tmp_buf[MAX_BUF + 1];
return_value = FILTER_DECISION_UNDECIDED;
+ tmp_filename = NULL;
/* Check for IP and keywords in name */
if (((target_action == NULL) ||
@@ -1280,7 +1377,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_IP_IN_NAME, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_IP_IN_NAME, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, current_settings->current_options->blacklist_rdns_keyword[i], target_reason_buf, size_target_reason_buf);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_IP_IN_RDNS_BLACKLIST, current_settings->server_ip, current_settings->server_name, current_settings->current_options->blacklist_rdns_keyword[i]);
return_value = FILTER_DECISION_DO_FILTER;
@@ -1289,11 +1386,12 @@
if ((return_value == FILTER_DECISION_UNDECIDED) &&
(current_settings->current_options->blacklist_rdns_keyword_file != NULL) &&
- check_ip_in_rdns_keyword(current_settings, current_settings->current_options->blacklist_rdns_keyword_file, current_settings->server_ip, current_settings->server_name, current_settings->strlen_server_name, LOG_VERBOSE_FILTER_IP_IN_RDNS_BLACKLIST_FILE, ¤t_settings->ip_in_server_name))
+ ((line_num = check_ip_in_rdns_keyword(current_settings, current_settings->current_options->blacklist_rdns_keyword_file, current_settings->server_ip, current_settings->server_name, current_settings->strlen_server_name, LOG_VERBOSE_FILTER_IP_IN_RDNS_BLACKLIST_FILE, ¤t_settings->ip_in_server_name, &tmp_filename)) > 0))
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_IP_IN_NAME, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ snprintf(tmp_buf, MAX_BUF, "%s:%d", tmp_filename, line_num);
+ set_rejection(current_settings, REJECTION_IP_IN_NAME, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, tmp_buf, target_reason_buf, size_target_reason_buf);
return_value = FILTER_DECISION_DO_FILTER;
}
@@ -1336,7 +1434,7 @@
if ((return_value == FILTER_DECISION_UNDECIDED) &&
(current_settings->current_options->whitelist_rdns_keyword_file != NULL) &&
- check_ip_in_rdns_keyword(current_settings, current_settings->current_options->whitelist_rdns_keyword_file, current_settings->server_ip, current_settings->server_name, current_settings->strlen_server_name, LOG_VERBOSE_FILTER_IP_IN_RDNS_WHITELIST_FILE, ¤t_settings->ip_in_server_name))
+ (check_ip_in_rdns_keyword(current_settings, current_settings->current_options->whitelist_rdns_keyword_file, current_settings->server_ip, current_settings->server_name, current_settings->strlen_server_name, LOG_VERBOSE_FILTER_IP_IN_RDNS_WHITELIST_FILE, ¤t_settings->ip_in_server_name, NULL) > 0))
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_NOT_FILTER;
@@ -1373,7 +1471,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_RDNS_RESOLVE, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_RDNS_RESOLVE, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, NULL, NULL, 0);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_RDNS_RESOLVE, current_settings->server_ip, current_settings->server_name);
return_value = FILTER_DECISION_DO_FILTER;
@@ -1404,7 +1502,8 @@
((return_action_locked == NULL) ||
!(*return_action_locked)) &&
((current_settings->current_options->dnsrwl_fqdn != NULL) ||
- (current_settings->current_options->dnsrwl_fqdn_file != NULL)))
+ (current_settings->current_options->dnsrwl_fqdn_file != NULL)) &&
+ (strcmp(current_settings->server_ip, DEFAULT_REMOTE_IP) != 0))
{
SPAMDYKE_LOG_DEBUG(current_settings, LOG_DEBUG_FILTER_DNS_RWL, current_settings->server_ip);
@@ -1445,7 +1544,7 @@
if ((return_value == FILTER_DECISION_UNDECIDED) &&
(strcmp(current_settings->server_ip, LOCALHOST_IP) != 0) &&
- (check_dnsrbl(current_settings, current_settings->server_ip, name_array, NULL, NULL, 0, &rwl_index) == 1))
+ (check_dnsrbl(current_settings, current_settings->server_ip, name_array, NULL, 0, &rwl_index) == 1))
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_NOT_FILTER;
@@ -1532,7 +1631,7 @@
name_array = current_settings->current_options->rhswl_fqdn;
if ((return_value == FILTER_DECISION_UNDECIDED) &&
- (check_rhsbl(current_settings, current_settings->server_name, name_array, NULL, NULL, 0, &rhswl_index) == 1))
+ (check_rhsbl(current_settings, current_settings->server_name, name_array, NULL, 0, &rhswl_index) == 1))
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_NOT_FILTER;
@@ -1556,7 +1655,7 @@
return(return_value);
}
-int filter_dns_rbl(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf)
+int filter_dns_rbl(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf)
{
int return_value;
int i;
@@ -1564,6 +1663,8 @@
int num_names;
int rbl_index;
char **name_array;
+ char tmp_text[MAX_BUF + 1];
+ char tmp_buf[MAX_BUF + 1];
return_value = FILTER_DECISION_UNDECIDED;
num_fqdn = 0;
@@ -1577,7 +1678,8 @@
((return_action_locked == NULL) ||
!(*return_action_locked)) &&
((current_settings->current_options->dnsrbl_fqdn != NULL) ||
- (current_settings->current_options->dnsrbl_fqdn_file != NULL)))
+ (current_settings->current_options->dnsrbl_fqdn_file != NULL)) &&
+ (strcmp(current_settings->server_ip, DEFAULT_REMOTE_IP) != 0))
{
SPAMDYKE_LOG_DEBUG(current_settings, LOG_DEBUG_FILTER_DNS_RBL, current_settings->server_ip);
@@ -1618,17 +1720,15 @@
if ((return_value == FILTER_DECISION_UNDECIDED) &&
(strcmp(current_settings->server_ip, LOCALHOST_IP) != 0) &&
- (check_dnsrbl(current_settings, current_settings->server_ip, name_array, (current_settings->current_options->rejection_text[REJECTION_RBL] != NULL) ? current_settings->current_options->rejection_text[REJECTION_RBL] : rejection[REJECTION_RBL].reject_message, target_message_buf, size_target_message_buf, &rbl_index) == 1))
+ (check_dnsrbl(current_settings, current_settings->server_ip, name_array, tmp_text, MAX_BUF, &rbl_index) == 1))
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- if (target_rejection != NULL)
- {
- memcpy(target_rejection_buf, &rejection[REJECTION_RBL], sizeof(struct rejection_data));
- target_rejection_buf->strlen_reject_message = strlen(target_message_buf);
- target_rejection_buf->reject_message = target_message_buf;
- *target_rejection = target_rejection_buf;
- }
+ if (tmp_text[0] != '\0')
+ snprintf(tmp_buf, MAX_BUF, "%s: %s", name_array[rbl_index], tmp_text);
+ else
+ tmp_buf[0] = '\0';
+ set_rejection(current_settings, REJECTION_RBL, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, (tmp_buf[0] != '\0') ? tmp_buf : name_array[rbl_index], name_array[rbl_index], target_reason_buf, size_target_reason_buf);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_DNS_RBL, current_settings->server_ip, name_array[rbl_index]);
return_value = FILTER_DECISION_DO_FILTER;
@@ -1647,7 +1747,7 @@
return(return_value);
}
-int filter_dns_rhsbl(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf)
+int filter_dns_rhsbl(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf)
{
int return_value;
int i;
@@ -1655,6 +1755,8 @@
int num_names;
int rhsbl_index;
char **name_array;
+ char tmp_text[MAX_BUF + 1];
+ char tmp_buf[MAX_BUF + 1];
return_value = FILTER_DECISION_UNDECIDED;
num_fqdn = 0;
@@ -1710,17 +1812,15 @@
name_array = current_settings->current_options->rhsbl_fqdn;
if ((return_value == FILTER_DECISION_UNDECIDED) &&
- (check_rhsbl(current_settings, current_settings->server_name, name_array, (current_settings->current_options->rejection_text[REJECTION_RHSBL] != NULL) ? current_settings->current_options->rejection_text[REJECTION_RHSBL] : rejection[REJECTION_RHSBL].reject_message, target_message_buf, size_target_message_buf, &rhsbl_index) == 1))
+ (check_rhsbl(current_settings, current_settings->server_name, name_array, tmp_text, MAX_BUF, &rhsbl_index) == 1))
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- if (target_rejection != NULL)
- {
- memcpy(target_rejection_buf, &rejection[REJECTION_RHSBL], sizeof(struct rejection_data));
- target_rejection_buf->strlen_reject_message = strlen(target_message_buf);
- target_rejection_buf->reject_message = target_message_buf;
- *target_rejection = target_rejection_buf;
- }
+ if (tmp_text[0] != '\0')
+ snprintf(tmp_buf, MAX_BUF, "%s: %s", name_array[rhsbl_index], tmp_text);
+ else
+ tmp_buf[0] = '\0';
+ set_rejection(current_settings, REJECTION_RHSBL, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, (tmp_buf[0] != '\0') ? tmp_buf : name_array[rhsbl_index], name_array[rhsbl_index], target_reason_buf, size_target_reason_buf);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_DNS_RHSBL, current_settings->server_name, name_array[rhsbl_index]);
return_value = FILTER_DECISION_DO_FILTER;
@@ -1778,7 +1878,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_EARLYTALKER, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_EARLYTALKER, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, NULL, NULL, 0);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_EARLYTALKER, current_settings->current_options->check_earlytalker);
return_value = FILTER_DECISION_DO_FILTER;
@@ -1903,7 +2003,7 @@
name_array = current_settings->current_options->rhswl_fqdn;
if ((return_value == FILTER_DECISION_UNDECIDED) &&
- (check_rhsbl(current_settings, current_settings->sender_domain, name_array, NULL, NULL, 0, &rhswl_index) == 1))
+ (check_rhsbl(current_settings, current_settings->sender_domain, name_array, NULL, 0, &rhswl_index) == 1))
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_NOT_FILTER;
@@ -1927,13 +2027,14 @@
return(return_value);
}
-int filter_sender_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf)
+int filter_sender_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf)
{
int return_value;
int i;
int search_return;
char tmp_sender_address[MAX_ADDRESS + 1];
int strlen_sender_address;
+ char tmp_buf[MAX_BUF + 1];
return_value = FILTER_DECISION_UNDECIDED;
@@ -1954,7 +2055,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_SENDER_BLACKLISTED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_SENDER_BLACKLISTED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, current_settings->current_options->blacklist_sender[i], target_reason_buf, size_target_reason_buf);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_SENDER_BLACKLIST, tmp_sender_address, current_settings->current_options->blacklist_sender[i]);
return_value = FILTER_DECISION_DO_FILTER;
@@ -1968,7 +2069,8 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_SENDER_BLACKLISTED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ snprintf(tmp_buf, MAX_BUF, "%s:%d", current_settings->current_options->blacklist_sender_file[i], search_return);
+ set_rejection(current_settings, REJECTION_SENDER_BLACKLISTED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, tmp_buf, target_reason_buf, size_target_reason_buf);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_SENDER_BLACKLIST_FILE, tmp_sender_address, current_settings->current_options->blacklist_sender_file[i], search_return);
return_value = FILTER_DECISION_DO_FILTER;
@@ -1979,7 +2081,7 @@
return(return_value);
}
-int filter_sender_rhsbl(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf)
+int filter_sender_rhsbl(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf)
{
int return_value;
int i;
@@ -1987,6 +2089,8 @@
int num_names;
int rhsbl_index;
char **name_array;
+ char tmp_text[MAX_BUF + 1];
+ char tmp_buf[MAX_BUF + 1];
return_value = FILTER_DECISION_UNDECIDED;
num_fqdn = 0;
@@ -2041,17 +2145,15 @@
name_array = current_settings->current_options->rhsbl_fqdn;
if ((return_value == FILTER_DECISION_UNDECIDED) &&
- (check_rhsbl(current_settings, current_settings->sender_domain, name_array, (current_settings->current_options->rejection_text[REJECTION_RHSBL] != NULL) ? current_settings->current_options->rejection_text[REJECTION_RHSBL] : rejection[REJECTION_RHSBL].reject_message, target_message_buf, size_target_message_buf, &rhsbl_index) == 1))
+ (check_rhsbl(current_settings, current_settings->sender_domain, name_array, tmp_text, MAX_BUF, &rhsbl_index) == 1))
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- if (target_rejection != NULL)
- {
- memcpy(target_rejection_buf, &rejection[REJECTION_RHSBL], sizeof(struct rejection_data));
- target_rejection_buf->strlen_reject_message = strlen(target_message_buf);
- target_rejection_buf->reject_message = target_message_buf;
- *target_rejection = target_rejection_buf;
- }
+ if (tmp_text[0] != '\0')
+ snprintf(tmp_buf, MAX_BUF, "%s: %s", name_array[rhsbl_index], tmp_text);
+ else
+ tmp_buf[0] = '\0';
+ set_rejection(current_settings, REJECTION_RHSBL, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, (tmp_buf[0] != '\0') ? tmp_buf : name_array[rhsbl_index], name_array[rhsbl_index], target_reason_buf, size_target_reason_buf);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_SENDER_RHSBL, current_settings->sender_domain, name_array[rhsbl_index]);
return_value = FILTER_DECISION_DO_FILTER;
@@ -2104,7 +2206,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_AUTH_REQUIRED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_AUTH_REQUIRED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, NULL, NULL, 0);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_SMTP_AUTH);
return_value = FILTER_DECISION_DO_FILTER;
@@ -2118,7 +2220,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_UNCONDITIONAL, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_UNCONDITIONAL, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, NULL, NULL, 0);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_REJECT_ALL);
return_value = FILTER_DECISION_DO_FILTER;
@@ -2154,7 +2256,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_DO_FILTER;
- set_rejection(current_settings, REJECTION_SENDER_NO_MX, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_SENDER_NO_MX, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, NULL, NULL, 0);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_SENDER_MX, current_settings->sender_domain);
return_value = FILTER_DECISION_DO_FILTER;
@@ -2236,7 +2338,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_TRANSIENT_DO_FILTER;
- set_rejection(current_settings, REJECTION_RCPT_TO_LOCAL, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_RCPT_TO_LOCAL, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, NULL, NULL, 0);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_RECIPIENT_LOCAL, reassemble_address(current_settings->recipient_username, current_settings->recipient_domain, NULL, tmp_address, MAX_ADDRESS, NULL));
return_value = FILTER_DECISION_TRANSIENT_DO_FILTER;
@@ -2294,7 +2396,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_TRANSIENT_DO_FILTER;
- set_rejection(current_settings, REJECTION_RELAYING_DENIED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_RELAYING_DENIED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, NULL, NULL, 0);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_RELAY);
return_value = FILTER_DECISION_TRANSIENT_DO_FILTER;
@@ -2322,7 +2424,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_TRANSIENT_DO_FILTER;
- set_rejection(current_settings, REJECTION_RCPT_TO, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_RCPT_TO, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, NULL, NULL, 0);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_RECIPIENT_MAX, current_settings->current_options->max_rcpt_to);
return_value = FILTER_DECISION_TRANSIENT_DO_FILTER;
@@ -2332,13 +2434,14 @@
return(return_value);
}
-int filter_recipient_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf)
+int filter_recipient_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf)
{
int return_value;
int i;
int search_return;
char tmp_address[MAX_ADDRESS + 1];
int strlen_recipient_address;
+ char tmp_buf[MAX_BUF + 1];
return_value = FILTER_DECISION_UNDECIDED;
@@ -2360,7 +2463,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_TRANSIENT_DO_FILTER;
- set_rejection(current_settings, REJECTION_RECIPIENT_BLACKLISTED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_RECIPIENT_BLACKLISTED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, current_settings->current_options->blacklist_recipient[i], target_reason_buf, size_target_reason_buf);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_RECIPIENT_BLACKLIST, tmp_address, current_settings->current_options->blacklist_recipient[i]);
return_value = FILTER_DECISION_TRANSIENT_DO_FILTER;
@@ -2374,7 +2477,8 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_TRANSIENT_DO_FILTER;
- set_rejection(current_settings, REJECTION_RECIPIENT_BLACKLISTED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ snprintf(tmp_buf, MAX_BUF, "%s:%d", current_settings->current_options->blacklist_recipient_file[i], search_return);
+ set_rejection(current_settings, REJECTION_RECIPIENT_BLACKLISTED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, tmp_buf, target_reason_buf, size_target_reason_buf);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_RECIPIENT_BLACKLIST_FILE, tmp_address, current_settings->current_options->blacklist_recipient_file[i], search_return);
return_value = FILTER_DECISION_TRANSIENT_DO_FILTER;
@@ -2689,7 +2793,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_TRANSIENT_DO_FILTER;
- set_rejection(current_settings, REJECTION_GRAYLISTED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_GRAYLISTED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, NULL, NULL, 0);
}
}
/* Sender->user graylist file does not exist -- create it. */
@@ -2702,7 +2806,7 @@
if (target_action != NULL)
*target_action = FILTER_DECISION_TRANSIENT_DO_FILTER;
- set_rejection(current_settings, REJECTION_GRAYLISTED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_GRAYLISTED, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, NULL, NULL, 0);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_GRAYLIST, tmp_sender_address, tmp_recipient_address, graylist_path);
return_value = FILTER_DECISION_TRANSIENT_DO_FILTER;
@@ -2745,7 +2849,7 @@
{
if (target_action != NULL)
*target_action = FILTER_DECISION_TRANSIENT_DO_FILTER;
- set_rejection(current_settings, REJECTION_IDENTICAL_FROM_TO, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf);
+ set_rejection(current_settings, REJECTION_IDENTICAL_FROM_TO, target_rejection, target_rejection_buf, target_message_buf, size_target_message_buf, NULL, NULL, NULL, 0);
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_IDENTICAL_FROM_TO, tmp_sender_address, tmp_recipient_address);
return_value = FILTER_DECISION_TRANSIENT_DO_FILTER;
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/filter.h
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -25,32 +25,33 @@
int filter_rdns_whitelist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection);
int filter_rdns_whitelist_file(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection);
int filter_rdns_whitelist_dir(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection);
-int filter_rdns_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
-int filter_rdns_blacklist_file(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
-int filter_rdns_blacklist_dir(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
+int filter_rdns_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf);
+int filter_rdns_blacklist_file(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf);
+int filter_rdns_blacklist_dir(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf);
int filter_ip_whitelist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection);
-int filter_ip_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
-int filter_ip_in_rdns_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
+int filter_ip_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf);
+int filter_ip_in_rdns_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf);
int filter_ip_in_rdns_whitelist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection);
int filter_rdns_resolve(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
int filter_dns_rwl(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection);
int filter_dns_rhswl(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection);
-int filter_dns_rbl(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
-int filter_dns_rhsbl(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
+int filter_dns_rbl(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf);
+int filter_dns_rhsbl(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf);
int filter_earlytalker(struct filter_settings *current_settings, int initial_connection, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
int filter_sender_whitelist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection);
int filter_sender_rhswl(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection);
-int filter_sender_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
-int filter_sender_rhsbl(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
+int filter_sender_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf);
+int filter_sender_rhsbl(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf);
int filter_level(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
int filter_sender_no_mx(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
int filter_recipient_whitelist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection);
int filter_recipient_local(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
int filter_recipient_relay(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
int filter_recipient_max(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
-int filter_recipient_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
+int filter_recipient_blacklist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *target_reason_buf, int size_target_reason_buf);
int filter_recipient_graylist(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
int filter_identical_from_to(struct filter_settings *current_settings, int *target_action, int *return_action_locked, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
-void set_rejection(struct filter_settings *current_settings, int rejection_index, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf);
+void reset_rejection(struct filter_settings *current_settings, int rejection_index, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *input_reason, char *target_reason_buf, int size_target_reason_buf);
+void set_rejection(struct filter_settings *current_settings, int rejection_index, struct rejection_data **target_rejection, struct rejection_data *target_rejection_buf, char *target_message_buf, int size_target_message_buf, char *append_message, char *input_reason, char *target_reason_buf, int size_target_reason_buf);
#endif /* FILTER_H */
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/log.c
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/log.h
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/md5.c
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/md5.h
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/search_fs.c
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -171,44 +171,49 @@
check_start = 0;
check_end = 0;
- old_end_char = target_entry[strlen_target_entry];
- if ((end_wildcard != '\0') &&
- (target_entry[strlen_target_entry - 1] == end_wildcard))
- {
- strlen_target_entry--;
- target_entry[strlen_target_entry] = '\0';
- check_end = 1;
- }
-
- if ((start_wildcard != '\0') &&
- (target_entry[0] == start_wildcard))
+ if ((target_entry != NULL) &&
+ (strlen_target_entry > 0))
{
- strlen_target_entry--;
- tmp_entry = target_entry + 1;
- check_start = 1;
- }
- else
- tmp_entry = target_entry;
-
- tmp_string = find_case_insensitive_needle(target_string, tmp_entry);
+ old_end_char = target_entry[strlen_target_entry - 1];
+ if ((end_wildcard != '\0') &&
+ (target_entry[strlen_target_entry - 1] == end_wildcard))
+ {
+ strlen_target_entry--;
+ target_entry[strlen_target_entry] = '\0';
+ check_end = 1;
+ }
- while ((tmp_string != NULL) &&
- (return_value == 0))
- if (((check_start &&
- ((start_wildcard_matches == NULL) ||
- (strchr(start_wildcard_matches, (tmp_string - 1)[0]) != NULL))) ||
- (!check_start &&
- (tmp_string == target_string))) &&
- ((check_end &&
- ((end_wildcard_matches == NULL) ||
- (strchr(end_wildcard_matches, tmp_string[strlen_target_entry]) != NULL))) ||
- (!check_end &&
- (((tmp_string - target_string) + strlen_target_entry) == strlen_target_string))))
- return_value = 1;
+ if ((start_wildcard != '\0') &&
+ (target_entry[0] == start_wildcard))
+ {
+ strlen_target_entry--;
+ tmp_entry = target_entry + 1;
+ check_start = 1;
+ }
else
- tmp_string = find_case_insensitive_needle(tmp_string + 1, tmp_entry);
+ tmp_entry = target_entry;
- target_entry[strlen_target_entry] = old_end_char;
+ tmp_string = find_case_insensitive_needle(target_string, tmp_entry);
+
+ while ((tmp_string != NULL) &&
+ (return_value == 0))
+ if (((check_start &&
+ ((start_wildcard_matches == NULL) ||
+ (strchr(start_wildcard_matches, (tmp_string - 1)[0]) != NULL))) ||
+ (!check_start &&
+ (tmp_string == target_string))) &&
+ ((check_end &&
+ ((end_wildcard_matches == NULL) ||
+ (strchr(end_wildcard_matches, tmp_string[strlen_target_entry]) != NULL))) ||
+ (!check_end &&
+ (((tmp_string - target_string) + strlen_target_entry) == strlen_target_string))))
+ return_value = 1;
+ else
+ tmp_string = find_case_insensitive_needle(tmp_string + 1, tmp_entry);
+
+ strlen_target_entry += check_end + check_start;
+ target_entry[strlen_target_entry - 1] = old_end_char;
+ }
return(return_value);
}
@@ -745,9 +750,9 @@
if ((total_timeout != 0) &&
(current_settings->current_options->nihdns_attempts_total > 0))
- current_settings->current_options->nihdns_timeout_total_secs = total_timeout;
+ current_settings->current_options->nihdns_timeout_total_secs_system = total_timeout;
else if (query_timeout != 0)
- current_settings->current_options->nihdns_timeout_total_secs = query_timeout * current_settings->current_options->nihdns_attempts_total;
+ current_settings->current_options->nihdns_timeout_total_secs_system = query_timeout * current_settings->current_options->nihdns_attempts_total;
}
else
{
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/search_fs.h
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/spamdyke.c
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -964,7 +964,7 @@
if ((current_settings->smtp_auth_origin == SMTP_AUTH_ORIGIN_SPAMDYKE) ||
((current_settings->current_options->smtp_auth_level & SMTP_AUTH_LEVEL_MASK) >= SMTP_AUTH_LEVEL_VALUE_ALWAYS))
{
- set_rejection(current_settings, REJECTION_SMTP_AUTH_FAILURE, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
+ set_rejection(current_settings, REJECTION_SMTP_AUTH_FAILURE, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF, NULL, NULL, NULL, 0);
output_write_rejection(current_settings, current_settings->current_options->transient_rejection, outbound_fd, NULL);
current_settings->current_options->transient_rejection = NULL;
return_value = FILTER_FLAG_INTERCEPT | FILTER_FLAG_CHILD_CONTINUE;
@@ -1056,7 +1056,7 @@
if ((current_settings->smtp_auth_origin == SMTP_AUTH_ORIGIN_SPAMDYKE) ||
((current_settings->current_options->smtp_auth_level & SMTP_AUTH_LEVEL_MASK) >= SMTP_AUTH_LEVEL_VALUE_ALWAYS))
{
- set_rejection(current_settings, REJECTION_SMTP_AUTH_FAILURE, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
+ set_rejection(current_settings, REJECTION_SMTP_AUTH_FAILURE, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF, NULL, NULL, NULL, 0);
output_write_rejection(current_settings, current_settings->current_options->transient_rejection, outbound_fd, NULL);
current_settings->current_options->transient_rejection = NULL;
return_value = FILTER_FLAG_INTERCEPT | FILTER_FLAG_CHILD_CONTINUE;
@@ -1132,7 +1132,7 @@
if ((current_settings->smtp_auth_origin == SMTP_AUTH_ORIGIN_SPAMDYKE) ||
((current_settings->current_options->smtp_auth_level & SMTP_AUTH_LEVEL_MASK) >= SMTP_AUTH_LEVEL_VALUE_ALWAYS))
{
- set_rejection(current_settings, REJECTION_SMTP_AUTH_FAILURE, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
+ set_rejection(current_settings, REJECTION_SMTP_AUTH_FAILURE, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF, NULL, NULL, NULL, 0);
output_write_rejection(current_settings, current_settings->current_options->transient_rejection, outbound_fd, NULL);
current_settings->current_options->transient_rejection = NULL;
return_value = FILTER_FLAG_INTERCEPT | FILTER_FLAG_CHILD_CONTINUE;
@@ -1305,7 +1305,7 @@
if ((current_settings->smtp_auth_origin == SMTP_AUTH_ORIGIN_SPAMDYKE) ||
((current_settings->current_options->smtp_auth_level & SMTP_AUTH_LEVEL_MASK) >= SMTP_AUTH_LEVEL_VALUE_ALWAYS))
{
- set_rejection(current_settings, REJECTION_SMTP_AUTH_FAILURE, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
+ set_rejection(current_settings, REJECTION_SMTP_AUTH_FAILURE, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF, NULL, NULL, NULL, 0);
output_write_rejection(current_settings, current_settings->current_options->transient_rejection, outbound_fd, NULL);
current_settings->current_options->transient_rejection = NULL;
return_value = FILTER_FLAG_INTERCEPT | FILTER_FLAG_CHILD_CONTINUE;
@@ -1394,7 +1394,7 @@
break;
default:
/* The client requested an algorithm spamdyke didn't advertise. */
- set_rejection(current_settings, REJECTION_SMTP_AUTH_UNKNOWN, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
+ set_rejection(current_settings, REJECTION_SMTP_AUTH_UNKNOWN, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF, NULL, NULL, NULL, 0);
output_write_rejection(current_settings, current_settings->current_options->transient_rejection, outbound_fd, NULL);
current_settings->current_options->transient_rejection = NULL;
current_settings->smtp_auth_state = SMTP_AUTH_STATE_NONE;
@@ -1468,16 +1468,19 @@
if (current_settings->current_options->tls_certificate_file != NULL)
{
output_write_rejection(current_settings, &tls_success, outbound_fd, NULL);
+ return_value = FILTER_FLAG_INTERCEPT;
+
if (tls_start(current_settings, inbound_fd, outbound_fd))
+ {
output_writeln(current_settings, LOG_ACTION_TLS_START, -1, NULL, -1);
+ return_value |= FILTER_FLAG_CLEAR;
+ }
else
{
- set_rejection(current_settings, FAILURE_TLS, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
+ set_rejection(current_settings, FAILURE_TLS, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF, NULL, NULL, NULL, 0);
output_write_rejection(current_settings, current_settings->current_options->transient_rejection, outbound_fd, NULL);
current_settings->current_options->transient_rejection = NULL;
}
-
- return_value = FILTER_FLAG_INTERCEPT;
}
else
@@ -1485,16 +1488,16 @@
if (current_settings->current_options->tls_level == TLS_LEVEL_PROTOCOL_SPAMDYKE)
{
- set_rejection(current_settings, FAILURE_TLS, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
+ set_rejection(current_settings, FAILURE_TLS, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF, NULL, NULL, NULL, 0);
output_write_rejection(current_settings, current_settings->current_options->transient_rejection, outbound_fd, REJECT_SEVERITY_PERMANENT);
current_settings->current_options->transient_rejection = NULL;
return_value = FILTER_FLAG_INTERCEPT;
}
else
- return_value = FILTER_FLAG_PASS | FILTER_FLAG_TLS_CAPTURE;
+ return_value = FILTER_FLAG_PASS | FILTER_FLAG_TLS_CAPTURE | FILTER_FLAG_CLEAR;
else
{
- set_rejection(current_settings, FAILURE_TLS, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
+ set_rejection(current_settings, FAILURE_TLS, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF, NULL, NULL, NULL, 0);
output_write_rejection(current_settings, current_settings->current_options->transient_rejection, outbound_fd, REJECT_SEVERITY_PERMANENT);
current_settings->current_options->transient_rejection = NULL;
return_value = FILTER_FLAG_INTERCEPT;
@@ -1534,8 +1537,8 @@
filter_level(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
filter_sender_whitelist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
filter_sender_rhswl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
- filter_sender_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
- filter_sender_rhsbl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
+ filter_sender_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
+ filter_sender_rhsbl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
filter_sender_no_mx(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
}
}
@@ -1588,6 +1591,7 @@
current_settings->local_recipient = 1;
current_settings->current_options->prev_filter_action = current_settings->current_options->filter_action;
+ current_settings->current_options->prev_rejection = current_settings->current_options->rejection;
if ((current_settings->current_options->configuration_dir != NULL) &&
((current_settings->current_options->filter_action = copy_base_options(current_settings, current_settings->current_options->filter_action)) != FILTER_DECISION_ERROR))
@@ -1606,40 +1610,46 @@
filter_rdns_whitelist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
filter_rdns_whitelist_file(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
filter_rdns_whitelist_dir(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
- filter_rdns_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
- filter_rdns_blacklist_file(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
- filter_rdns_blacklist_dir(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
+ filter_rdns_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
+ filter_rdns_blacklist_file(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
+ filter_rdns_blacklist_dir(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
filter_ip_whitelist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
- filter_ip_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
+ filter_ip_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
filter_ip_in_rdns_whitelist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
- filter_ip_in_rdns_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
+ filter_ip_in_rdns_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
filter_rdns_resolve(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
filter_dns_rwl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
filter_dns_rhswl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
- filter_dns_rbl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
- filter_dns_rhsbl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
+ filter_dns_rbl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
+ filter_dns_rhsbl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
filter_earlytalker(current_settings, 0, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
/* Post-MAIL FROM filters */
filter_sender_whitelist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
filter_sender_rhswl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
- filter_sender_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
- filter_sender_rhsbl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
+ filter_sender_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
+ filter_sender_rhsbl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
filter_sender_no_mx(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
}
}
if (current_settings->current_options->filter_action != FILTER_DECISION_ERROR)
- filter_recipient_whitelist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->transient_rejection);
+ filter_recipient_whitelist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
filter_recipient_relay(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
if (current_settings->current_options->filter_action <= FILTER_DECISION_DO_FILTER)
{
+ /*
+ * This doesn't seem needed, because the rejection has already been set.
+ * But it's possible the rejection text was set after the rejection was
+ * processed. Calling reset_rejection() will set the text without erasing
+ * anything else.
+ */
if ((current_settings->current_options->rejection != NULL) &&
(current_settings->current_options->rejection->rejection_index == REJECTION_ACCESS_DENIED) &&
(current_settings->current_options->rejection_text[REJECTION_ACCESS_DENIED] != NULL))
- set_rejection(current_settings, REJECTION_ACCESS_DENIED, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
+ reset_rejection(current_settings, REJECTION_ACCESS_DENIED, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, NULL, NULL, 0);
if ((current_settings->current_options->filter_action == FILTER_DECISION_DO_FILTER) &&
(current_settings->current_options->filter_grace <= FILTER_GRACE_AFTER_TO) &&
@@ -1654,7 +1664,7 @@
/* Post-RCPT TO filters */
filter_recipient_local(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
filter_recipient_max(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
- filter_recipient_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
+ filter_recipient_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF, current_settings->current_options->transient_reject_reason_buf, MAX_BUF);
filter_identical_from_to(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
filter_recipient_graylist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
@@ -1668,37 +1678,42 @@
free_current_options(current_settings);
- if ((current_settings->current_options->filter_action == FILTER_DECISION_TRANSIENT_DO_NOT_FILTER) ||
- (current_settings->current_options->filter_action == FILTER_DECISION_TRANSIENT_DO_FILTER))
- current_settings->current_options->filter_action = current_settings->current_options->prev_filter_action;
-
if ((return_value & FILTER_MASK_PASS) == FILTER_FLAG_PASS)
return_value = FILTER_FLAG_PASS | FILTER_FLAG_RCPT_CAPTURE;
else
{
- SPAMDYKE_LOG_INFO(current_settings, "%s from: %s to: %s origin_ip: %s origin_rdns: %s auth: %s encryption: %s", (current_settings->current_options->transient_rejection != NULL) ? current_settings->current_options->transient_rejection->short_reject_message : ((current_settings->current_options->rejection != NULL) ? current_settings->current_options->rejection->short_reject_message : SHORT_SUCCESS), reassemble_address(current_settings->sender_username, current_settings->sender_domain, LOG_MISSING_DATA, tmp_sender_address, MAX_ADDRESS, NULL), reassemble_address(current_settings->recipient_username, current_settings->recipient_domain, LOG_MISSING_DATA, tmp_recipient_address, MAX_ADDRESS, NULL), (current_settings->server_ip != NULL) ? current_settings->server_ip : LOG_MISSING_DATA, (current_settings->strlen_server_name > 0) ? current_settings->server_name : LOG_MISSING_DATA, (current_settings->smtp_auth_username[0] != '\0') ? current_settings->smtp_auth_username : LOG_MISSING_DATA, tls_state_desc(current_settings));
+ SPAMDYKE_LOG_INFO(current_settings, "%s from: %s to: %s origin_ip: %s origin_rdns: %s auth: %s encryption: %s reason: %s",
+ (current_settings->current_options->transient_rejection != NULL) ? current_settings->current_options->transient_rejection->short_reject_message : ((current_settings->current_options->rejection != NULL) ? current_settings->current_options->rejection->short_reject_message : SHORT_SUCCESS),
+ reassemble_address(current_settings->sender_username, current_settings->sender_domain, LOG_MISSING_DATA, tmp_sender_address, MAX_ADDRESS, NULL),
+ reassemble_address(current_settings->recipient_username, current_settings->recipient_domain, LOG_MISSING_DATA, tmp_recipient_address, MAX_ADDRESS, NULL),
+ (current_settings->server_ip != NULL) ? current_settings->server_ip : LOG_MISSING_DATA,
+ (current_settings->strlen_server_name > 0) ? current_settings->server_name : LOG_MISSING_DATA,
+ (current_settings->smtp_auth_username[0] != '\0') ? current_settings->smtp_auth_username : LOG_MISSING_DATA,
+ tls_state_desc(current_settings),
+ (current_settings->current_options->transient_rejection != NULL) ? ((current_settings->current_options->transient_rejection->reject_reason != NULL) ? current_settings->current_options->transient_rejection->reject_reason : LOG_EMPTY_DATA) : (((current_settings->current_options->rejection != NULL) && (current_settings->current_options->rejection->reject_reason != NULL)) ? current_settings->current_options->rejection->reject_reason : LOG_EMPTY_DATA)
+ );
current_settings->current_options->transient_rejection = NULL;
}
}
else if ((strlen_input_line >= STRLEN(SMTP_DATA)) &&
(strncasecmp(SMTP_DATA, input_line, STRLEN(SMTP_DATA)) == 0))
{
- if ((current_settings->current_options->filter_action == FILTER_DECISION_DO_FILTER) &&
- (current_settings->current_options->filter_grace <= FILTER_GRACE_AFTER_DATA) &&
- (current_settings->current_options->rejection != NULL))
+ if (current_settings->num_rcpt_to > 0)
+ current_settings->inside_data = 1;
+ else if ((current_settings->current_options->filter_action == FILTER_DECISION_DO_FILTER) &&
+ (current_settings->current_options->filter_grace <= FILTER_GRACE_AFTER_DATA) &&
+ (current_settings->current_options->rejection != NULL))
{
output_write_rejection(current_settings, current_settings->current_options->rejection, outbound_fd, NULL);
return_value = FILTER_FLAG_INTERCEPT | FILTER_FLAG_CHILD_QUIT;
}
- else if (current_settings->num_rcpt_to == 0)
+ else
{
- set_rejection(current_settings, REJECTION_ZERO_RECIPIENTS, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
+ set_rejection(current_settings, REJECTION_ZERO_RECIPIENTS, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF, NULL, NULL, NULL, 0);
output_write_rejection(current_settings, current_settings->current_options->transient_rejection, STDOUT_FD, NULL);
current_settings->current_options->transient_rejection = NULL;
return_value = FILTER_FLAG_INTERCEPT | FILTER_FLAG_CHILD_CONTINUE;
}
- else
- current_settings->inside_data = 1;
}
else if ((strlen_input_line >= STRLEN(SMTP_QUIT)) &&
(strncasecmp(SMTP_QUIT, input_line, STRLEN(SMTP_QUIT)) == 0))
@@ -1787,6 +1802,7 @@
int child_stopped;
char tmp_sender_address[MAX_ADDRESS + 1];
char tmp_recipient_address[MAX_ADDRESS + 1];
+ char tmp_buf[MAX_BUF + 1];
strlen_buf_input = 0;
usable_buf_input = 0;
@@ -1884,14 +1900,23 @@
current_settings->current_options->timeout_connection = 0;
current_settings->current_options->timeout_command = 0;
- set_rejection(current_settings, REJECTION_TIMEOUT, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
+ set_rejection(current_settings, REJECTION_TIMEOUT, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, NULL, NULL, NULL, 0);
output_write_rejection(current_settings, current_settings->current_options->rejection, STDOUT_FD, NULL);
more_stdinput = 0;
discard_childinput = 1;
child_response_needed = 0;
- SPAMDYKE_LOG_INFO(current_settings, "%s from: %s to: %s origin_ip: %s origin_rdns: %s auth: %s encryption: %s reason: %s", current_settings->current_options->rejection->short_reject_message, reassemble_address(current_settings->sender_username, current_settings->sender_domain, LOG_MISSING_DATA, tmp_sender_address, MAX_ADDRESS, NULL), reassemble_address(current_settings->recipient_username, current_settings->recipient_domain, LOG_MISSING_DATA, tmp_recipient_address, MAX_ADDRESS, NULL), current_settings->server_ip, (current_settings->strlen_server_name > 0) ? current_settings->server_name : LOG_MISSING_DATA, (current_settings->smtp_auth_username[0] != '\0') ? current_settings->smtp_auth_username : LOG_MISSING_DATA, tls_state_desc(current_settings), (current_settings->current_options->rejection != NULL) ? current_settings->current_options->rejection->short_reject_message : LOG_MISSING_DATA);
+ SPAMDYKE_LOG_INFO(current_settings, "%s from: %s to: %s origin_ip: %s origin_rdns: %s auth: %s encryption: %s reason: %s",
+ current_settings->current_options->rejection->short_reject_message,
+ reassemble_address(current_settings->sender_username, current_settings->sender_domain, LOG_MISSING_DATA, tmp_sender_address, MAX_ADDRESS, NULL),
+ reassemble_address(current_settings->recipient_username, current_settings->recipient_domain, LOG_MISSING_DATA, tmp_recipient_address, MAX_ADDRESS, NULL),
+ current_settings->server_ip,
+ (current_settings->strlen_server_name > 0) ? current_settings->server_name : LOG_MISSING_DATA,
+ (current_settings->smtp_auth_username[0] != '\0') ? current_settings->smtp_auth_username : LOG_MISSING_DATA,
+ tls_state_desc(current_settings),
+ (current_settings->current_options->rejection != NULL) ? current_settings->current_options->rejection->short_reject_message : LOG_MISSING_DATA
+ );
timeout_printed = 1;
}
@@ -2034,19 +2059,28 @@
{
/* qmail said "250". Log success. */
current_settings->num_rcpt_to++;
- current_settings->current_options->rejection = NULL;
}
else
{
/* qmail did not say "250". Log a rejection. */
SPAMDYKE_LOG_VERBOSE(current_settings, LOG_VERBOSE_FILTER_OTHER_REJECTION, strlen_buf_trim, start_buf_childinput);
- set_rejection(current_settings, REJECTION_OTHER, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF);
+ snprintf(tmp_buf, MAX_BUF, "%.*s", strlen_buf_trim, start_buf_childinput);
+ set_rejection(current_settings, REJECTION_OTHER, ¤t_settings->current_options->transient_rejection, ¤t_settings->current_options->transient_rejection_buf, current_settings->current_options->transient_reject_message_buf, MAX_BUF, NULL, tmp_buf, current_settings->current_options->transient_reject_reason_buf, MAX_BUF);
}
output_writeln(current_settings, LOG_ACTION_CHILD_FROM, STDOUT_FD, start_buf_childinput, next_terminator - start_buf_childinput);
filter_return ^= FILTER_FLAG_RCPT_CAPTURE;
- SPAMDYKE_LOG_INFO(current_settings, "%s from: %s to: %s origin_ip: %s origin_rdns: %s auth: %s encryption: %s", (current_settings->current_options->transient_rejection != NULL) ? current_settings->current_options->transient_rejection->short_reject_message : ((current_settings->current_options->rejection != NULL) ? current_settings->current_options->rejection->short_reject_message : SHORT_SUCCESS), reassemble_address(current_settings->sender_username, current_settings->sender_domain, LOG_MISSING_DATA, tmp_sender_address, MAX_ADDRESS, NULL), reassemble_address(current_settings->recipient_username, current_settings->recipient_domain, LOG_MISSING_DATA, tmp_recipient_address, MAX_ADDRESS, NULL), (current_settings->server_ip != NULL) ? current_settings->server_ip : LOG_MISSING_DATA, (current_settings->strlen_server_name > 0) ? current_settings->server_name : LOG_MISSING_DATA, (current_settings->smtp_auth_username[0] != '\0') ? current_settings->smtp_auth_username : LOG_MISSING_DATA, tls_state_desc(current_settings));
+ SPAMDYKE_LOG_INFO(current_settings, "%s from: %s to: %s origin_ip: %s origin_rdns: %s auth: %s encryption: %s reason: %s",
+ (current_settings->current_options->transient_rejection != NULL) ? current_settings->current_options->transient_rejection->short_reject_message : ((current_settings->current_options->rejection != NULL) ? current_settings->current_options->rejection->short_reject_message : SHORT_SUCCESS),
+ reassemble_address(current_settings->sender_username, current_settings->sender_domain, LOG_MISSING_DATA, tmp_sender_address, MAX_ADDRESS, NULL),
+ reassemble_address(current_settings->recipient_username, current_settings->recipient_domain, LOG_MISSING_DATA, tmp_recipient_address, MAX_ADDRESS, NULL),
+ (current_settings->server_ip != NULL) ? current_settings->server_ip : LOG_MISSING_DATA,
+ (current_settings->strlen_server_name > 0) ? current_settings->server_name : LOG_MISSING_DATA,
+ (current_settings->smtp_auth_username[0] != '\0') ? current_settings->smtp_auth_username : LOG_MISSING_DATA,
+ tls_state_desc(current_settings),
+ (current_settings->current_options->transient_rejection != NULL) ? ((current_settings->current_options->transient_rejection->reject_reason != NULL) ? current_settings->current_options->transient_rejection->reject_reason : LOG_EMPTY_DATA) : (((current_settings->current_options->rejection != NULL) && (current_settings->current_options->rejection->reject_reason != NULL)) ? current_settings->current_options->rejection->reject_reason : LOG_EMPTY_DATA)
+ );
current_settings->current_options->transient_rejection = NULL;
}
else if ((((filter_return & FILTER_FLAG_AUTH_ADD) == FILTER_FLAG_AUTH_ADD) ||
@@ -2308,7 +2342,16 @@
line_terminator = '\0';
buf_childinput[strlen_buf_childinput] = '\0';
- SPAMDYKE_LOG_INFO(current_settings, "%s from: %s to: %s origin_ip: %s origin_rdns: %s auth: %s encryption: %s", SHORT_TLS_PASSTHROUGH, LOG_MISSING_DATA, LOG_MISSING_DATA, (current_settings->server_ip != NULL) ? current_settings->server_ip : LOG_MISSING_DATA, (current_settings->strlen_server_name > 0) ? current_settings->server_name : LOG_MISSING_DATA, (current_settings->smtp_auth_username[0] != '\0') ? current_settings->smtp_auth_username : LOG_MISSING_DATA, tls_state_desc(current_settings));
+ SPAMDYKE_LOG_INFO(current_settings, "%s from: %s to: %s origin_ip: %s origin_rdns: %s auth: %s encryption: %s reason: %s",
+ SHORT_TLS_PASSTHROUGH,
+ LOG_MISSING_DATA,
+ LOG_MISSING_DATA,
+ (current_settings->server_ip != NULL) ? current_settings->server_ip : LOG_MISSING_DATA,
+ (current_settings->strlen_server_name > 0) ? current_settings->server_name : LOG_MISSING_DATA,
+ (current_settings->smtp_auth_username[0] != '\0') ? current_settings->smtp_auth_username : LOG_MISSING_DATA,
+ tls_state_desc(current_settings),
+ LOG_EMPTY_DATA
+ );
}
else
{
@@ -2471,6 +2514,13 @@
output_writeln(current_settings, LOG_ACTION_REMOTE_FROM, -1, start_buf_input, next_terminator - start_buf_input);
+ if ((current_settings->current_options->filter_action == FILTER_DECISION_TRANSIENT_DO_NOT_FILTER) ||
+ (current_settings->current_options->filter_action == FILTER_DECISION_TRANSIENT_DO_FILTER))
+ {
+ current_settings->current_options->filter_action = current_settings->current_options->prev_filter_action;
+ current_settings->current_options->rejection = current_settings->current_options->prev_rejection;
+ }
+
filter_return = smtp_filter(STDIN_FD, STDOUT_FD, start_buf_input, strlen_buf_trim, current_settings);
switch (filter_return & FILTER_MASK_PASS)
{
@@ -2522,7 +2572,15 @@
}
}
- start_buf_input = next_terminator;
+ if ((filter_return & FILTER_MASK_CLEAR) == FILTER_FLAG_CLEAR)
+ {
+ SPAMDYKE_LOG_EXCESSIVE(current_settings, LOG_DEBUGX_CLEAR_INPUT, strlen_buf_input - strlen_buf_trim);
+ strlen_buf_input = 0;
+ buf_input[strlen_buf_input] = '\0';
+ start_buf_input = NULL;
+ }
+ else
+ start_buf_input = next_terminator;
}
else
{
@@ -2660,6 +2718,8 @@
char tmp_delimiter;
void *tmp_ptr;
char **destination_envp;
+ int line_num;
+ char tmp_buf[MAX_BUF + 1];
return_value = FILTER_DECISION_UNDECIDED;
command_text[0] = '\0';
@@ -2707,7 +2767,7 @@
if (current_settings->current_options->access_list_file != NULL)
for (i = 0; current_settings->current_options->access_list_file[i] != NULL; i++)
- if (search_tcprules_file(current_settings, command_text, MAX_BUF, current_settings->current_options->access_list_file[i], current_settings->server_ip, current_settings->server_name, current_settings->strlen_server_name) >= 0)
+ if ((line_num = search_tcprules_file(current_settings, command_text, MAX_BUF, current_settings->current_options->access_list_file[i], current_settings->server_ip, current_settings->server_name, current_settings->strlen_server_name)) >= 0)
{
if ((command_text[0] == '\0') ||
((strncasecmp(command_text, TCPRULES_ALLOW, STRLEN(TCPRULES_ALLOW)) == 0) &&
@@ -2791,7 +2851,8 @@
((command_text[STRLEN(TCPRULES_DENY)] == TCPRULES_DELIMITER) ||
(command_text[STRLEN(TCPRULES_DENY)] == '\0')))
{
- set_rejection(current_settings, REJECTION_ACCESS_DENIED, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
+ snprintf(tmp_buf, MAX_BUF, "%s:%d", current_settings->current_options->access_list_file[i], line_num);
+ set_rejection(current_settings, REJECTION_ACCESS_DENIED, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, NULL, tmp_buf, current_settings->current_options->reject_reason_buf, MAX_BUF);
return_value = FILTER_DECISION_DO_FILTER;
break;
@@ -2981,18 +3042,18 @@
filter_rdns_whitelist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
filter_rdns_whitelist_file(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
filter_rdns_whitelist_dir(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
- filter_rdns_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
- filter_rdns_blacklist_file(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
- filter_rdns_blacklist_dir(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
+ filter_rdns_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
+ filter_rdns_blacklist_file(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
+ filter_rdns_blacklist_dir(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
filter_ip_whitelist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
- filter_ip_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
+ filter_ip_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
filter_ip_in_rdns_whitelist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
- filter_ip_in_rdns_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
+ filter_ip_in_rdns_blacklist(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
filter_rdns_resolve(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
filter_dns_rwl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
filter_dns_rhswl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection);
- filter_dns_rbl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
- filter_dns_rhsbl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
+ filter_dns_rbl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
+ filter_dns_rhsbl(current_settings, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF, current_settings->current_options->reject_reason_buf, MAX_BUF);
filter_earlytalker(current_settings, 1, ¤t_settings->current_options->filter_action, ¤t_settings->current_options->filter_action_locked, ¤t_settings->current_options->rejection, ¤t_settings->current_options->rejection_buf, current_settings->current_options->reject_message_buf, MAX_BUF);
}
else
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/spamdyke.h
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -19,6 +19,7 @@
#define SPAMDYKE_H
#include "config.h"
+#include <stdio.h>
#ifdef HAVE_STDINT_H
@@ -180,6 +181,9 @@
#define RESOLVER_FILE_COMMENT_DELIMITER_1 '#'
#define RESOLVER_FILE_COMMENT_DELIMITER_2 ';'
+#define REASON_REPLACE_TARGET ' '
+#define REASON_REPLACE_REPLACEMENT '_'
+
#define MAX_ADDRESS 511
#define MAX_PATH 4095
#define MAX_BUF 1023
@@ -213,7 +217,7 @@
#define USAGE_LINE_WRAP 80
#define USAGE_LINE_INDENT " "
-#define USAGE_MESSAGE_HEADER "spamdyke " VERSION_STRING " (C)2011 Sam Clippinger, " PACKAGE_BUGREPORT "\nhttp://www.spamdyke.org/\n\n"
+#define USAGE_MESSAGE_HEADER "spamdyke " VERSION_STRING " (C)2012 Sam Clippinger, " PACKAGE_BUGREPORT "\nhttp://www.spamdyke.org/\n\n"
#define USAGE_MESSAGE_USAGE "USAGE: spamdyke [ OPTIONS ] [ -- ] qmail_smtpd_command [ qmail_smtpd_arguments ]\n"
#define USAGE_MESSAGE_INTEGER_RANGE "%s must be between (or equal to) %d and %d.\n"
#define USAGE_MESSAGE_NAME_VALUES "%s"
@@ -261,6 +265,11 @@
#define FILTER_FLAG_CHILD_RESPONSE_NEEDED 0x0000
#define FILTER_FLAG_CHILD_RESPONSE_NOT_NEEDED 0x0200
+#define FILTER_MASK_CLEAR 0x0400
+/* KEEP is implied in assignments if another flag is not specified. */
+#define FILTER_FLAG_KEEP 0x0000
+#define FILTER_FLAG_CLEAR 0x0400
+
/*
* The values of these constants are significant. set_config_value() and
* filter_*() use them to decide if the filter action should be set by comparing
@@ -444,114 +453,116 @@
int strlen_reject_message;
char *short_reject_message;
int append_policy;
+ char *reject_reason;
+ int strlen_reject_reason;
};
-#define SUCCESS_AUTH { -1, REJECT_SEVERITY_AUTH_SUCCESS, "Proceed.", 8, SHORT_SUCCESS "_AUTHENTICATED", 0 }
-#define SUCCESS_TLS { -2, REJECT_SEVERITY_TLS_SUCCESS, "Proceed.", 8, SHORT_SUCCESS "_TLS", 0 }
+#define SUCCESS_AUTH { -1, REJECT_SEVERITY_AUTH_SUCCESS, "Proceed.", 8, SHORT_SUCCESS "_AUTHENTICATED", 0, NULL, 0 }
+#define SUCCESS_TLS { -2, REJECT_SEVERITY_TLS_SUCCESS, "Proceed.", 8, SHORT_SUCCESS "_TLS", 0, NULL, 0 }
#define REJECTION_RCPT_TO 0
#define ERROR_RCPT_TO "Too many recipients. Try the remaining addresses again later."
-#define REJECTION_DATA_RCPT_TO { REJECTION_RCPT_TO, REJECT_SEVERITY_TEMPORARY, ERROR_RCPT_TO, STRLEN(ERROR_RCPT_TO), "DENIED_TOO_MANY_RECIPIENTS", 1 }
+#define REJECTION_DATA_RCPT_TO { REJECTION_RCPT_TO, REJECT_SEVERITY_TEMPORARY, ERROR_RCPT_TO, STRLEN(ERROR_RCPT_TO), "DENIED_TOO_MANY_RECIPIENTS", 1, NULL, 0 }
#define REJECTION_RCPT_TO_LOCAL 1
#define ERROR_RCPT_TO_LOCAL "Improper recipient address. Try supplying a domain name."
-#define REJECTION_DATA_RCPT_TO_LOCAL { REJECTION_RCPT_TO_LOCAL, REJECT_SEVERITY_PERMANENT, ERROR_RCPT_TO_LOCAL, STRLEN(ERROR_RCPT_TO_LOCAL), "DENIED_UNQUALIFIED_RECIPIENT", 1 }
+#define REJECTION_DATA_RCPT_TO_LOCAL { REJECTION_RCPT_TO_LOCAL, REJECT_SEVERITY_PERMANENT, ERROR_RCPT_TO_LOCAL, STRLEN(ERROR_RCPT_TO_LOCAL), "DENIED_UNQUALIFIED_RECIPIENT", 1, NULL, 0 }
#define REJECTION_GRAYLISTED 2
#define ERROR_GRAYLISTED "Your address has been graylisted. Try again later."
-#define REJECTION_DATA_GRAYLISTED { REJECTION_GRAYLISTED, REJECT_SEVERITY_TEMPORARY, ERROR_GRAYLISTED, STRLEN(ERROR_GRAYLISTED), "DENIED_GRAYLISTED", 1 }
+#define REJECTION_DATA_GRAYLISTED { REJECTION_GRAYLISTED, REJECT_SEVERITY_TEMPORARY, ERROR_GRAYLISTED, STRLEN(ERROR_GRAYLISTED), "DENIED_GRAYLISTED", 1, NULL, 0 }
#define REJECTION_RDNS_MISSING 3
#define ERROR_RDNS_MISSING "Refused. You have no reverse DNS entry."
-#define REJECTION_DATA_RDNS_MISSING { REJECTION_RDNS_MISSING, REJECT_SEVERITY_TEMPORARY, ERROR_RDNS_MISSING, STRLEN(ERROR_RDNS_MISSING), "DENIED_RDNS_MISSING", 1 }
+#define REJECTION_DATA_RDNS_MISSING { REJECTION_RDNS_MISSING, REJECT_SEVERITY_TEMPORARY, ERROR_RDNS_MISSING, STRLEN(ERROR_RDNS_MISSING), "DENIED_RDNS_MISSING", 1, NULL, 0 }
#define REJECTION_RDNS_RESOLVE 4
#define ERROR_RDNS_RESOLVE "Refused. Your reverse DNS entry does not resolve."
-#define REJECTION_DATA_RDNS_RESOLVE { REJECTION_RDNS_RESOLVE, REJECT_SEVERITY_TEMPORARY, ERROR_RDNS_RESOLVE, STRLEN(ERROR_RDNS_RESOLVE), "DENIED_RDNS_RESOLVE", 1 }
+#define REJECTION_DATA_RDNS_RESOLVE { REJECTION_RDNS_RESOLVE, REJECT_SEVERITY_TEMPORARY, ERROR_RDNS_RESOLVE, STRLEN(ERROR_RDNS_RESOLVE), "DENIED_RDNS_RESOLVE", 1, NULL, 0 }
#define REJECTION_IP_IN_NAME_CC 5
#define ERROR_IP_IN_NAME_CC "Refused. Your reverse DNS entry contains your IP address and a country code."
-#define REJECTION_DATA_IP_IN_NAME_CC { REJECTION_IP_IN_NAME_CC, REJECT_SEVERITY_PERMANENT, ERROR_IP_IN_NAME_CC, STRLEN(ERROR_IP_IN_NAME_CC), "DENIED_IP_IN_CC_RDNS", 1 }
+#define REJECTION_DATA_IP_IN_NAME_CC { REJECTION_IP_IN_NAME_CC, REJECT_SEVERITY_PERMANENT, ERROR_IP_IN_NAME_CC, STRLEN(ERROR_IP_IN_NAME_CC), "DENIED_IP_IN_CC_RDNS", 1, NULL, 0 }
#define REJECTION_IP_IN_NAME 6
#define ERROR_IP_IN_NAME "Refused. Your reverse DNS entry contains your IP address and a banned keyword."
-#define REJECTION_DATA_IP_IN_NAME { REJECTION_IP_IN_NAME, REJECT_SEVERITY_PERMANENT, ERROR_IP_IN_NAME, STRLEN(ERROR_IP_IN_NAME), "DENIED_IP_IN_RDNS", 1 }
+#define REJECTION_DATA_IP_IN_NAME { REJECTION_IP_IN_NAME, REJECT_SEVERITY_PERMANENT, ERROR_IP_IN_NAME, STRLEN(ERROR_IP_IN_NAME), "DENIED_IP_IN_RDNS", 1, NULL, 0 }
#define REJECTION_EARLYTALKER 7
#define ERROR_EARLYTALKER "Refused. You are not following the SMTP protocol."
-#define REJECTION_DATA_EARLYTALKER { REJECTION_EARLYTALKER, REJECT_SEVERITY_PERMANENT, ERROR_EARLYTALKER, STRLEN(ERROR_EARLYTALKER), "DENIED_EARLYTALKER", 1 }
+#define REJECTION_DATA_EARLYTALKER { REJECTION_EARLYTALKER, REJECT_SEVERITY_PERMANENT, ERROR_EARLYTALKER, STRLEN(ERROR_EARLYTALKER), "DENIED_EARLYTALKER", 1, NULL, 0 }
#define REJECTION_BLACKLIST_NAME 8
#define ERROR_BLACKLIST_NAME "Refused. Your domain name is blacklisted."
-#define REJECTION_DATA_BLACKLIST_NAME { REJECTION_BLACKLIST_NAME, REJECT_SEVERITY_PERMANENT, ERROR_BLACKLIST_NAME, STRLEN(ERROR_BLACKLIST_NAME), "DENIED_BLACKLIST_NAME", 1 }
+#define REJECTION_DATA_BLACKLIST_NAME { REJECTION_BLACKLIST_NAME, REJECT_SEVERITY_PERMANENT, ERROR_BLACKLIST_NAME, STRLEN(ERROR_BLACKLIST_NAME), "DENIED_BLACKLIST_NAME", 1, NULL, 0 }
#define REJECTION_BLACKLIST_IP 9
#define ERROR_BLACKLIST_IP "Refused. Your IP address is blacklisted."
-#define REJECTION_DATA_BLACKLIST_IP { REJECTION_BLACKLIST_IP, REJECT_SEVERITY_PERMANENT, ERROR_BLACKLIST_IP, STRLEN(ERROR_BLACKLIST_IP), "DENIED_BLACKLIST_IP", 1 }
+#define REJECTION_DATA_BLACKLIST_IP { REJECTION_BLACKLIST_IP, REJECT_SEVERITY_PERMANENT, ERROR_BLACKLIST_IP, STRLEN(ERROR_BLACKLIST_IP), "DENIED_BLACKLIST_IP", 1, NULL, 0 }
#define REJECTION_TIMEOUT 10
#define ERROR_TIMEOUT "Timeout. Talk faster next time."
-#define REJECTION_DATA_TIMEOUT { REJECTION_TIMEOUT, REJECT_SEVERITY_TEMPORARY, ERROR_TIMEOUT, STRLEN(ERROR_TIMEOUT), "TIMEOUT", 1 }
+#define REJECTION_DATA_TIMEOUT { REJECTION_TIMEOUT, REJECT_SEVERITY_TEMPORARY, ERROR_TIMEOUT, STRLEN(ERROR_TIMEOUT), "TIMEOUT", 1, NULL, 0 }
#define REJECTION_SENDER_BLACKLISTED 11
#define ERROR_SENDER_BLACKLISTED "Refused. Your sender address has been blacklisted."
-#define REJECTION_DATA_SENDER_BLACKLISTED { REJECTION_SENDER_BLACKLISTED, REJECT_SEVERITY_PERMANENT, ERROR_SENDER_BLACKLISTED, STRLEN(ERROR_SENDER_BLACKLISTED), "DENIED_SENDER_BLACKLISTED", 1 }
+#define REJECTION_DATA_SENDER_BLACKLISTED { REJECTION_SENDER_BLACKLISTED, REJECT_SEVERITY_PERMANENT, ERROR_SENDER_BLACKLISTED, STRLEN(ERROR_SENDER_BLACKLISTED), "DENIED_SENDER_BLACKLISTED", 1, NULL, 0 }
#define REJECTION_RECIPIENT_BLACKLISTED 12
#define ERROR_RECIPIENT_BLACKLISTED "Refused. Mail is not being accepted at this address."
-#define REJECTION_DATA_RECIPIENT_BLACKLISTED { REJECTION_RECIPIENT_BLACKLISTED, REJECT_SEVERITY_PERMANENT, ERROR_RECIPIENT_BLACKLISTED, STRLEN(ERROR_RECIPIENT_BLACKLISTED), "DENIED_RECIPIENT_BLACKLISTED", 1 }
+#define REJECTION_DATA_RECIPIENT_BLACKLISTED { REJECTION_RECIPIENT_BLACKLISTED, REJECT_SEVERITY_PERMANENT, ERROR_RECIPIENT_BLACKLISTED, STRLEN(ERROR_RECIPIENT_BLACKLISTED), "DENIED_RECIPIENT_BLACKLISTED", 1, NULL, 0 }
#define REJECTION_SENDER_NO_MX 13
#define ERROR_SENDER_NO_MX "Refused. The domain of your sender address has no mail exchanger (MX)."
-#define REJECTION_DATA_SENDER_NO_MX { REJECTION_SENDER_NO_MX, REJECT_SEVERITY_TEMPORARY, ERROR_SENDER_NO_MX, STRLEN(ERROR_SENDER_NO_MX), "DENIED_SENDER_NO_MX", 1 }
+#define REJECTION_DATA_SENDER_NO_MX { REJECTION_SENDER_NO_MX, REJECT_SEVERITY_TEMPORARY, ERROR_SENDER_NO_MX, STRLEN(ERROR_SENDER_NO_MX), "DENIED_SENDER_NO_MX", 1, NULL, 0 }
#define REJECTION_RBL 14
#define ERROR_RBL "Refused. Your IP address is listed in the RBL at "
-#define REJECTION_DATA_RBL { REJECTION_RBL, REJECT_SEVERITY_PERMANENT, ERROR_RBL, STRLEN(ERROR_RBL), "DENIED_RBL_MATCH", 1 }
+#define REJECTION_DATA_RBL { REJECTION_RBL, REJECT_SEVERITY_PERMANENT, ERROR_RBL, STRLEN(ERROR_RBL), "DENIED_RBL_MATCH", 1, NULL, 0 }
#define REJECTION_RHSBL 15
#define ERROR_RHSBL "Refused. Your domain name is listed in the RHSBL at "
-#define REJECTION_DATA_RHSBL { REJECTION_RHSBL, REJECT_SEVERITY_PERMANENT, ERROR_RHSBL, STRLEN(ERROR_RHSBL), "DENIED_RHSBL_MATCH", 1 }
+#define REJECTION_DATA_RHSBL { REJECTION_RHSBL, REJECT_SEVERITY_PERMANENT, ERROR_RHSBL, STRLEN(ERROR_RHSBL), "DENIED_RHSBL_MATCH", 1, NULL, 0 }
#define REJECTION_SMTP_AUTH_FAILURE 16
#define ERROR_SMTP_AUTH_FAILURE "Refused. Authentication failed."
-#define REJECTION_DATA_SMTP_AUTH_FAILURE { REJECTION_SMTP_AUTH_FAILURE, REJECT_SEVERITY_AUTH_FAILURE, ERROR_SMTP_AUTH_FAILURE, STRLEN(ERROR_SMTP_AUTH_FAILURE), "FAILED_AUTH", 0 }
+#define REJECTION_DATA_SMTP_AUTH_FAILURE { REJECTION_SMTP_AUTH_FAILURE, REJECT_SEVERITY_AUTH_FAILURE, ERROR_SMTP_AUTH_FAILURE, STRLEN(ERROR_SMTP_AUTH_FAILURE), "FAILED_AUTH", 0, NULL, 0 }
#define REJECTION_SMTP_AUTH_UNKNOWN 17
#define ERROR_SMTP_AUTH_UNKNOWN "Refused. Unknown authentication method."
-#define REJECTION_DATA_SMTP_AUTH_UNKNOWN { REJECTION_SMTP_AUTH_UNKNOWN, REJECT_SEVERITY_AUTH_UNKNOWN, ERROR_SMTP_AUTH_UNKNOWN, STRLEN(ERROR_SMTP_AUTH_UNKNOWN), "UNKNOWN_AUTH", 0 }
+#define REJECTION_DATA_SMTP_AUTH_UNKNOWN { REJECTION_SMTP_AUTH_UNKNOWN, REJECT_SEVERITY_AUTH_UNKNOWN, ERROR_SMTP_AUTH_UNKNOWN, STRLEN(ERROR_SMTP_AUTH_UNKNOWN), "UNKNOWN_AUTH", 0, NULL, 0 }
#define REJECTION_ACCESS_DENIED 18
#define ERROR_ACCESS_DENIED "Refused. Access is denied."
-#define REJECTION_DATA_ACCESS_DENIED { REJECTION_ACCESS_DENIED, REJECT_SEVERITY_PERMANENT, ERROR_ACCESS_DENIED, STRLEN(ERROR_ACCESS_DENIED), "DENIED_ACCESS_DENIED", 1 }
+#define REJECTION_DATA_ACCESS_DENIED { REJECTION_ACCESS_DENIED, REJECT_SEVERITY_PERMANENT, ERROR_ACCESS_DENIED, STRLEN(ERROR_ACCESS_DENIED), "DENIED_ACCESS_DENIED", 1, NULL, 0 }
#define REJECTION_RELAYING_DENIED 19
#define ERROR_RELAYING_DENIED "Refused. Sending to remote addresses (relaying) is not allowed."
-#define REJECTION_DATA_RELAYING_DENIED { REJECTION_RELAYING_DENIED, REJECT_SEVERITY_PERMANENT, ERROR_RELAYING_DENIED, STRLEN(ERROR_RELAYING_DENIED), "DENIED_RELAYING", 1 }
+#define REJECTION_DATA_RELAYING_DENIED { REJECTION_RELAYING_DENIED, REJECT_SEVERITY_PERMANENT, ERROR_RELAYING_DENIED, STRLEN(ERROR_RELAYING_DENIED), "DENIED_RELAYING", 1, NULL, 0 }
#define REJECTION_OTHER 20
#define ERROR_OTHER ""
-#define REJECTION_DATA_OTHER { REJECTION_OTHER, REJECT_SEVERITY_TEMPORARY, ERROR_OTHER, STRLEN(ERROR_OTHER), "DENIED_OTHER", 1 }
+#define REJECTION_DATA_OTHER { REJECTION_OTHER, REJECT_SEVERITY_TEMPORARY, ERROR_OTHER, STRLEN(ERROR_OTHER), "DENIED_OTHER", 1, NULL, 0 }
#define REJECTION_ZERO_RECIPIENTS 21
#define ERROR_ZERO_RECIPIENTS "Refused. You must specify at least one valid recipient."
-#define REJECTION_DATA_ZERO_RECIPIENTS { REJECTION_ZERO_RECIPIENTS, REJECT_SEVERITY_PERMANENT, ERROR_ZERO_RECIPIENTS, STRLEN(ERROR_ZERO_RECIPIENTS), "DENIED_ZERO_RECIPIENTS" }
+#define REJECTION_DATA_ZERO_RECIPIENTS { REJECTION_ZERO_RECIPIENTS, REJECT_SEVERITY_PERMANENT, ERROR_ZERO_RECIPIENTS, STRLEN(ERROR_ZERO_RECIPIENTS), "DENIED_ZERO_RECIPIENTS", 0, NULL, 0 }
#define REJECTION_AUTH_REQUIRED 22
#define ERROR_AUTH_REQUIRED "Refused. Authentication is required to send mail."
-#define REJECTION_DATA_AUTH_REQUIRED { REJECTION_AUTH_REQUIRED, REJECT_SEVERITY_PERMANENT, ERROR_AUTH_REQUIRED, STRLEN(ERROR_AUTH_REQUIRED), "DENIED_AUTH_REQUIRED", 1 }
+#define REJECTION_DATA_AUTH_REQUIRED { REJECTION_AUTH_REQUIRED, REJECT_SEVERITY_PERMANENT, ERROR_AUTH_REQUIRED, STRLEN(ERROR_AUTH_REQUIRED), "DENIED_AUTH_REQUIRED", 1, NULL, 0 }
#define REJECTION_UNCONDITIONAL 23
#define ERROR_UNCONDITIONAL "Refused. Mail is not being accepted."
-#define REJECTION_DATA_UNCONDITIONAL { REJECTION_UNCONDITIONAL, REJECT_SEVERITY_PERMANENT, ERROR_UNCONDITIONAL, STRLEN(ERROR_UNCONDITIONAL), "DENIED_REJECT_ALL", 1 }
+#define REJECTION_DATA_UNCONDITIONAL { REJECTION_UNCONDITIONAL, REJECT_SEVERITY_PERMANENT, ERROR_UNCONDITIONAL, STRLEN(ERROR_UNCONDITIONAL), "DENIED_REJECT_ALL", 1, NULL, 0 }
#define REJECTION_IDENTICAL_FROM_TO 24
#define ERROR_IDENTICAL_FROM_TO "Refused. Identical sender and recipient addresses are not allowed."
-#define REJECTION_DATA_IDENTICAL_FROM_TO { REJECTION_IDENTICAL_FROM_TO, REJECT_SEVERITY_PERMANENT, ERROR_IDENTICAL_FROM_TO, STRLEN(ERROR_IDENTICAL_FROM_TO), "DENIED_IDENTICAL_SENDER_RECIPIENT", 1 }
+#define REJECTION_DATA_IDENTICAL_FROM_TO { REJECTION_IDENTICAL_FROM_TO, REJECT_SEVERITY_PERMANENT, ERROR_IDENTICAL_FROM_TO, STRLEN(ERROR_IDENTICAL_FROM_TO), "DENIED_IDENTICAL_SENDER_RECIPIENT", 1, NULL, 0 }
#define FAILURE_TLS 25
#define ERROR_FAILURE_TLS "Failed to negotiate TLS connection."
-#define FAILURE_DATA_TLS { FAILURE_TLS, REJECT_SEVERITY_TLS_FAILURE, ERROR_FAILURE_TLS, STRLEN(ERROR_FAILURE_TLS), "FAILED_TLS", 0 }
+#define FAILURE_DATA_TLS { FAILURE_TLS, REJECT_SEVERITY_TLS_FAILURE, ERROR_FAILURE_TLS, STRLEN(ERROR_FAILURE_TLS), "FAILED_TLS", 0, NULL, 0 }
#define REJECTION_DATA (struct rejection_data []){ \
REJECTION_DATA_RCPT_TO, \
@@ -707,6 +718,8 @@
#define SYSLOG_IDENTIFIER "spamdyke"
#define LOG_MISSING_DATA "(unknown)"
+#define LOG_EMPTY_DATA "(empty)"
+#define LOG_NO_DATA "(none)"
#define LOG_MSG_TLS_NO_ERROR "Operation failed but no error was reported by the SSL/TLS library"
#define LOG_MSG_TLS_ZERO_RETURN "The connection was unexpectedly ended/closed"
#define LOG_MSG_TLS_RECALL "The SSL/TLS library wants a function to be called again to complete after it's been recalled repeatedly. This shouldn't happen."
@@ -989,8 +1002,10 @@
#define LOG_DEBUGX_DNS_COUNTS "EXCESSIVE(%s()@%s:%d): DNS packet ID %d/%d contains %d questions, %d answers"
#define LOG_DEBUGX_DNS_RECEIVED_TCP "EXCESSIVE(%s()@%s:%d): received %d bytes via TCP, %d bytes so far in this response, expecting %d total"
#define LOG_DEBUGX_DNS_EMPTY_DATA "EXCESSIVE(%s()@%s:%d): DNS data contains 0 bytes, ignoring response"
+#define LOG_DEBUGX_DNS_TIMEOUT "EXCESSIVE(%s()@%s:%d): waiting %d secs for DNS reply"
#define LOG_DEBUGX_AUTH_CRAMMD5_CHALLENGE "EXCESSIVE(%s()@%s:%d): created CRAM-MD5 challenge text: %s"
#define LOG_DEBUGX_SOCKET_NONBLOCK "EXCESSIVE(%s()@%s:%d): setting socket to nonblocking mode: %d"
+#define LOG_DEBUGX_CLEAR_INPUT "EXCESSIVE(%s()@%s:%d): discarding %d bytes of cached input"
#define ERROR_CONFIG_NO_COMMAND "ERROR: Missing qmail-smtpd command"
#define ERROR_CONFIG_UNKNOWN_OPTION "ERROR: Unknown or incomplete option: %s"
@@ -1323,21 +1338,41 @@
{
/* These member variables are not accessible from option_list in
* prepare_settings() -- they must be initialized/cleared explicitly
- * in init_option_set() and free_option_set().
+ * in init_option_set().
*/
int prev_filter_action;
int filter_action;
int filter_action_locked;
int filter_grace;
+ /*
+ * Some rejections are transient and some are permanent. Transient rejections
+ * affect the current command (e.g. rejecting a specific recipient) without
+ * affecting the entire connection.
+ *
+ * The *_buf variables are used when a rejection needs modification before
+ * being sent to the client. set_rejection() will copy an entry from the
+ * REJECTION_DATA array into the *_buf variable, make changes as needed, then
+ * assign rejection or transient_rejection to point to the *_buf variable.
+ * Otherwise, rejection or transient_rejection will point directly to the
+ * element in REJECTION_DATA. In no case should rejection or
+ * transient_rejection ever be free()d.
+ */
struct rejection_data *rejection;
struct rejection_data *transient_rejection;
struct rejection_data rejection_buf;
struct rejection_data transient_rejection_buf;
char reject_message_buf[MAX_BUF + 1];
char short_reject_message_buf[MAX_BUF + 1];
+ char reject_reason_buf[MAX_BUF + 1];
char transient_reject_message_buf[MAX_BUF + 1];
char transient_short_reject_message_buf[MAX_BUF + 1];
+ char transient_reject_reason_buf[MAX_BUF + 1];
+
+ /* prev_rejection should never be free()d. It always points to a rejection
+ * (see above) or NULL.
+ */
+ struct rejection_data *prev_rejection;
int strlen_policy_location;
@@ -1429,7 +1464,8 @@
char **nihdns_secondary_server_list;
int nihdns_attempts_primary;
int nihdns_attempts_total;
- int nihdns_timeout_total_secs;
+ int nihdns_timeout_total_secs_parameter;
+ int nihdns_timeout_total_secs_system;
char **nihdns_resolv_conf;
int nihdns_query_type_a;
int nihdns_query_type_mx;
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/tls.c
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/tls.h
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/usage.c
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/spamdyke/usage.h
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/README.txt
^
|
@@ -37,7 +37,7 @@
each, (this is why there are so many). Each directory contains one test and any
extra files it needs. The test script in each directory is named "run.sh".
Those scripts are executed by the master "run" script in this (parent)
-directory. They can't be (easily) run individually.
+directory. They can't be (easily) run directly.
NOTE: Tests with "patched" in their names will only execute correctly on servers
where /var/qmail/bin/qmail-smtpd has been patched to provide TLS and SMTP AUTH
@@ -54,6 +54,21 @@
and need to change the dates on those files (bash doesn't have a way to
calculate arbitrary dates).
+cputime/cputime: A small C program that tracks the CPU usage of another process,
+ similar to the way the "time" utility will track the time a process takes to
+ run. This is used by a few scripts that need to verify spamdyke isn't
+ consuming 100% CPU.
+
+dnsdummy/dnsdummy: A C program that provides a rudimentary DNS server with some
+ interesting features. It will listen on a random port (and print that port
+ number on stdout), it will return responses from other ports (making the
+ replies appear to be spoofed data), it will ignore some requests, it will
+ truncate some data, it will introduce arbitrary delays to some queries.
+ Most importantly, it will automatically exit after a specified number of
+ seconds. It is used by a number of the test scripts that need specific
+ responses or behaviors from a DNS server but don't need the DNS server to run
+ very long or interfere with queries from other processes/machines.
+
exitvalue/exitvalue: A small C program that generates exit values. Used by
a few scripts that test spamdyke's ability to catch different exit values from
SMTP AUTH scripts.
@@ -62,7 +77,7 @@
sendrecv/sendrecv: A rather large and complex C program that imitates a remote
server sending data to spamdyke over the internet. Its primary function is to
- read data from stdin (usually redirected from a text file) and send it slowly
+ read data from stdin (usually redirected from a text file), send it slowly
(one line at a time) and wait for SMTP responses. It can exit when it sees a
desired response. It can kill spamdyke and exit when a timeout expires. It
can send portions of the input data in bursts (as some remote servers do).
@@ -107,12 +122,7 @@
command line utilities. If you're running a non-GNU system (e.g. Solaris),
the scripts won't work correctly. Sorry.
-To use the test scripts, you first must login as root (or "su"). Configure and
-compile the spamdyke binary in the "spamdyke" directory with TLS support,
-debugging output and excessive output. Configure and compile the extra
-utilities in the "utils" directory also. It's not necessary to install any of
-these binaries -- the test scripts will run them directly from the directories
-where they were compiled.
+To use the test scripts, you first must login as root (or "su").
Then you must set some environment variables. If the "run" script is executed
with no arguments, it will output a usage message. If the file
@@ -123,6 +133,7 @@
The variables are:
+TESTSD_MISSING_RDNS_IP - IP address with no rDNS name
TESTSD_UNRESOLVABLE_RDNS_IP - IP address with an rDNS name that does not resolve
TESTSD_IP_IN_CC_RDNS - IP address with an rDNS name that contains the IP and a
country code
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/addsecs/addsecs.c
^
|
@@ -1,6 +1,6 @@
/*
addsecs -- a simple program for printing the date as of X seconds ago
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/cputime/cputime.c
^
|
@@ -1,6 +1,6 @@
/*
cputime -- a program for tracking and printing the CPU usage of a process
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/dnsdummy/dnsdummy.c
^
|
@@ -1,3 +1,20 @@
+/*
+ dnsdummy -- a simple program for simulating a DNS server
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2 as
+ published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
#include <stdio.h>
#include <string.h>
#include <netdb.h>
@@ -19,7 +36,10 @@
#define MAX_BUF 1023
#define MAX_BIND_ATTEMPTS 32
+#define MAX_PRIORITY 16
#define DEFAULT_TIMEOUT_SECS 120
+#define LOOP_SECS 0
+#define LOOP_USECS 500
#define DNS_A 1
#define DNS_MX 15
@@ -29,8 +49,9 @@
#define DNS_TXT 16
/*
- * NOTE: This code performs almost zero buffer length checking. Crafting a
- * query or an input file to cause a buffer overflow would be extremely trivial.
+ * NOTE: This code performs almost zero buffer length checking or input sanity
+ * checking. Crafting a query or an input file to cause a buffer overflow or
+ * other crash would be extremely trivial.
*
* In other words, if you use this program for any production purpose, you're
* asking for trouble and you will very likely get it.
@@ -41,7 +62,7 @@
fprintf(stderr, "USAGE: dnsdummy [ -v[v[v]] ] [ -p PORT ] [ -t TIMEOUT_SECS ] [ -n ] -f FILE\n"
"\n"
"dnsdummy functions is an extremely limited DNS server that responds to UDP\n"
- "queries only. Normally, it will run in the background and automatically exit\n"
+ "and TCP queries. Normally, it will run in the background and automatically exit\n"
"after a set time.\n"
"\n"
"dnsdummy will always print its port number on stdout as it starts up.\n"
@@ -65,32 +86,39 @@
" given.\n"
"\n"
"-t TIMEOUT_SECS\n"
- " Exit after TIMEOUT_SECS seconds. Default: " STRINGIFY(DEFAULT_TIMEOUT_SECS) "\n"
+ " Exit after TIMEOUT_SECS seconds. If this value is less than " STRINGIFY(MAX_PRIORITY - 1) " and any\n"
+ " PRIORITY fields are " STRINGIFY(MAX_PRIORITY - 1) " or greater in the input file, those values will never\n"
+ " be sent. Default: " STRINGIFY(DEFAULT_TIMEOUT_SECS) "\n"
"\n"
"-f FILE\n"
" Read responses from FILE. The file format is very simple.\n"
" Blank lines are ignored. Lines beginning with # are ignored as comments.\n"
" Otherwise, each line should contain:\n"
- " QUERY TYPE FLAG ANSWER\n"
+ " QUERY TYPE FLAG PRIORITY ANSWER\n"
" Where QUERY is the name queried by the remote client, TYPE is the type\n"
- " of query and ANSWER is the response dnsdummy should send. FLAG determines\n"
- " extra behavior dnsdummy should use when responding:\n"
+ " of query and ANSWER is the response dnsdummy should send. PRIORITY determines\n"
+ " the order the answers are sent: 0 is sent first, 1 is sent 1 second later, 2\n"
+ " is sent 2 seconds later, etc. For every QUERY, the list of PRIORITY values\n"
+ " greater than 0 should be unique - if a duplicate PRIORITY is found, only the\n"
+ " last one will be used. PRIORITY must be between 0 and " STRINGIFY(MAX_PRIORITY - 1) ". PRIORITY is\n"
+ " ignored when sending TCP responses. FLAG determines extra behavior\n"
+ " dnsdummy should use when responding:\n"
" NORMAL: send a normal response using the same protocol as the request\n"
" TRUNCATE: set the truncation flag when responding via UDP; the client\n"
" should retry the request via TCP\n"
- " IGNORE: send no response at all (as opposed to NXDOMAIN); the ANSWER\n"
- " field may be left blank\n"
+ " IGNORE: send no response at all (as opposed to NXDOMAIN); the ANSWER and\n"
+ " PRIORITY fields may be left blank\n"
" SPOOF: reply to UDP requests from a different port than the request\n"
" The fields should be separated by whitespace (tabs/spaces). Trailing periods\n"
" should not be used; all names are assumed to reference the root scope.\n"
" \"A\" records must always contain IP addresses.\n"
" Examples:\n"
- " mail.foo.com A NORMAL 11.22.33.44\n"
- " www.foo.com CNAME TRUNCATE foo.com\n"
- " foo.com NS NORMAL ns.foo.com\n"
- " foo.com TXT SPOOF Some text response.\n"
+ " mail.foo.com A NORMAL 0 11.22.33.44\n"
+ " www.foo.com CNAME TRUNCATE 0 foo.com\n"
+ " foo.com NS NORMAL 0 ns.foo.com\n"
+ " foo.com TXT SPOOF 1 Some text response.\n"
" foo.com MX IGNORE\n"
- " 44.33.22.11.foo.com PTR NORMAL www.foo.com\n"
+ " 44.33.22.11.foo.com PTR NORMAL 0 www.foo.com\n"
" If a match is not found, dnsdummy will respond with NXDOMAIN.\n"
);
/********************************************************************************/
@@ -140,7 +168,7 @@
* 3: Found match + truncation flag
* 4: Found match + spoof flag
*/
-int search_file(char *return_answer, int strlen_return_answer, char *target_file, char *target_name, int target_type, int verbose)
+int search_file(char *return_answer, int strlen_return_answer, int *return_priority, char *target_file, char *target_name, int target_type, int verbose)
{
int return_value;
int i;
@@ -149,10 +177,13 @@
char query_name[MAX_BUF + 1];
char query_type[MAX_BUF + 1];
char flag[MAX_BUF + 1];
+ char priority[MAX_BUF + 1];
char answer_name[MAX_BUF + 1];
FILE *input_file;
int line_num;
int strlen_line;
+ int real_priority;
+ int scan_result;
return_value = 0;
input_file = NULL;
@@ -175,7 +206,14 @@
((strlen_line = strlen(input_line)) > 0))
{
answer_name[0] = '\0';
- if (sscanf(input_line, "%" STRINGIFY(MAX_BUF) "[^\r\n\t ]%*[\r\n\t ]%" STRINGIFY(MAX_BUF) "[^\r\n\t ]%*[\r\n\t ]%" STRINGIFY(MAX_BUF) "[^\r\n\t ]%*[\r\n\t ]%" STRINGIFY(MAX_BUF) "[^\r\n]", query_name, query_type, flag, answer_name) >= 3)
+ priority[0] = '\0';
+ real_priority = 0;
+ if (((scan_result = sscanf(input_line, "%" STRINGIFY(MAX_BUF) "[^\r\n\t ]%*[\r\n\t ]%" STRINGIFY(MAX_BUF) "[^\r\n\t ]%*[\r\n\t ]%" STRINGIFY(MAX_BUF) "[^\r\n\t ]%*[\r\n\t ]%" STRINGIFY(MAX_BUF) "[^\r\n\t ]%*[\r\n\t ]%" STRINGIFY(MAX_BUF) "[^\r\n]", query_name, query_type, flag, priority, answer_name)) >= 3) &&
+ (((scan_result == 5) &&
+ (sscanf(priority, "%d", &real_priority) == 1) &&
+ (real_priority >= 0) &&
+ (real_priority < MAX_PRIORITY)) ||
+ (scan_result == 3)))
{
for (i = 0; query_name[i] != '\0'; i++)
query_name[i] = tolower(query_name[i]);
@@ -185,7 +223,7 @@
flag[i] = tolower(flag[i]);
if (verbose >= 2)
- fprintf(stderr, "dnsdummy: read config line: query_name = %s, query_type = %s, flag = %s, answer = %s\n", query_name, query_type, flag, answer_name);
+ fprintf(stderr, "dnsdummy: read config line: query_name = %s, query_type = %s, flag = %s, priority = %d, answer = %s\n", query_name, query_type, flag, real_priority, answer_name);
if (!strcmp(tmp_name, query_name) &&
(((target_type == DNS_A) &&
@@ -211,6 +249,8 @@
memcpy(return_answer, answer_name, MINVAL(255, MINVAL(strlen_return_answer, strlen(answer_name))));
return_answer[MINVAL(255, MINVAL(strlen_return_answer, strlen(answer_name)))] = '\0';
+ *return_priority = real_priority;
+
if (!strcmp(flag, "normal"))
return_value = 2;
else if (!strcmp(flag, "truncate"))
@@ -252,9 +292,13 @@
line_num++;
}
- if ((return_value == 0) &&
- verbose)
- fprintf(stderr, "dnsdummy: no match found\n");
+ if (return_value == 0)
+ {
+ *return_priority = 0;
+
+ if (verbose)
+ fprintf(stderr, "dnsdummy: no match found\n");
+ }
fclose(input_file);
}
@@ -363,6 +407,10 @@
unsigned char answer[MAX_BUF + 1];
char query_name[MAX_BUF + 1];
char answer_name[MAX_BUF + 1];
+ unsigned char saved_answer[MAX_PRIORITY][MAX_BUF + 1];
+ int saved_answer_len[MAX_PRIORITY];
+ int saved_result[MAX_PRIORITY];
+ int num_saved;
int listen_port;
fd_set read_fds;
struct timeval tmp_timeval;
@@ -384,12 +432,15 @@
int search_result;
int do_fork;
int select_value;
+ int priority;
+ int last_received;
max_secs = DEFAULT_TIMEOUT_SECS;
target_port = 0;
verbose = 0;
config_file = NULL;
do_fork = 1;
+ last_received = 0;
while ((opt = getopt(argc, argv, "f:np:t:v")) != -1)
{
@@ -471,10 +522,15 @@
tcp_query_len = 0;
accept_socket = -1;
+ for (i = 0; i < MAX_PRIORITY; i++)
+ saved_answer_len[i] = 0;
+ num_saved = 0;
+
while (!do_fork ||
- (tmp_timeval.tv_sec > 0))
+ (tmp_timeval.tv_sec > 0) ||
+ (tmp_timeval.tv_usec > 0))
{
- if (select(select_value, &read_fds, NULL, NULL, (do_fork) ? &tmp_timeval : NULL) > 0)
+ if (select(select_value, &read_fds, NULL, NULL, &tmp_timeval) > 0)
{
sender_address_len = sizeof(struct sockaddr_in);
@@ -482,6 +538,8 @@
{
if ((query_len = recvfrom(udp_socket, query, MAX_BUF, 0, (struct sockaddr *)&sender_address, (socklen_t *)&sender_address_len)) >= 12)
{
+ last_received = time(NULL);
+
if (verbose)
fprintf(stderr, "dnsdummy: received %d bytes via UDP, ID: %d/%d\n", query_len, query[0], query[1]);
}
@@ -506,6 +564,8 @@
{
if ((query_len = recv(accept_socket, tcp_query + tcp_query_len, MAX_BUF - tcp_query_len, 0)) > 0)
{
+ last_received = time(NULL);
+
if (verbose >= 2)
fprintf(stderr, "dnsdummy: read %d bytes from TCP socket\n", query_len);
@@ -612,7 +672,7 @@
((char *)&tmp_num)[1] = query[tmp_ptr + name_len + 1];
type_num = ntohs(tmp_num);
- if (((search_result = search_file(answer_name, MAX_BUF, config_file, query_name, type_num, verbose)) == 2) ||
+ if (((search_result = search_file(answer_name, MAX_BUF, &priority, config_file, query_name, type_num, verbose)) == 2) ||
((search_result == 3) &&
(tcp_query_len > 0)) ||
(search_result == 4))
@@ -794,39 +854,15 @@
}
else
{
- if (answer_len > 512)
- {
- fprintf(stderr, "DNSDUMMY ERROR: answer is too long for UDP: %d bytes\n", answer_len);
- answer_len = 512;
- answer[2] |= 0x02;
- }
- else if (search_result == 3)
- answer[2] = 0x02;
+ if (saved_answer_len[priority] == 0)
+ num_saved++;
- if (search_result == 4)
- {
- if ((target_socket = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
- {
- fprintf(stderr, "DNSDUMMY ERROR: unable to create new socket for spoofed response: %s\n", strerror(errno));
- target_socket = udp_socket;
- }
- }
- else
- target_socket = udp_socket;
-
- if (sendto(target_socket, answer, answer_len, 0, (struct sockaddr *)&sender_address, sender_address_len) > 0)
- {
- if (verbose)
- fprintf(stderr, "dnsdummy: sent %d bytes to sender via UDP\n", answer_len);
- if (verbose >= 3)
- for (i = 0; i < answer_len; i++)
- fprintf(stderr, "dnsdummy: answer byte %d:\t%d\t%c\n", i, answer[i], answer[i]);
- }
- else
- fprintf(stderr, "DNSDUMMY ERROR: unable to send %d bytes to sender via UDP: %s\n", answer_len, strerror(errno));
+ memcpy(saved_answer[priority], answer, answer_len);
+ saved_answer_len[priority] = answer_len;
+ saved_result[priority] = search_result;
- if (target_socket != udp_socket)
- close(target_socket);
+ if (verbose >= 2)
+ fprintf(stderr, "dnsdummy: saving response in priority slot %d\n", priority);
}
}
@@ -834,6 +870,53 @@
}
}
+ for (i = 0; i <= MINVAL(MAX_PRIORITY - 1, time(NULL) - last_received); i++)
+ if (saved_answer_len[i] > 0)
+ {
+ if (verbose >= 2)
+ fprintf(stderr, "dnsdummy: sending response from priority slot %d\n", i);
+
+ if (saved_answer_len[i] > 512)
+ {
+ fprintf(stderr, "DNSDUMMY ERROR: answer is too long for UDP: %d bytes\n", saved_answer_len[i]);
+ saved_answer_len[i] = 512;
+ saved_answer[i][2] |= 0x02;
+ }
+ else if (saved_result[i] == 3)
+ saved_answer[i][2] = 0x02;
+
+ if (saved_result[i] == 4)
+ {
+ if ((target_socket = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
+ {
+ fprintf(stderr, "DNSDUMMY ERROR: unable to create new socket for spoofed response: %s\n", strerror(errno));
+ target_socket = udp_socket;
+ }
+ }
+ else
+ target_socket = udp_socket;
+
+ if (sendto(target_socket, saved_answer[i], saved_answer_len[i], 0, (struct sockaddr *)&sender_address, sender_address_len) > 0)
+ {
+ if (verbose)
+ fprintf(stderr, "dnsdummy: sent %d bytes to sender via UDP\n", saved_answer_len[i]);
+ if (verbose >= 3)
+ for (i = 0; i < saved_answer_len[i]; i++)
+ fprintf(stderr, "dnsdummy: answer byte %d:\t%d\t%c\n", i, saved_answer[i][i], saved_answer[i][i]);
+ }
+ else
+ fprintf(stderr, "DNSDUMMY ERROR: unable to send %d bytes to sender via UDP: %s\n", saved_answer_len[i], strerror(errno));
+
+ if (target_socket != udp_socket)
+ close(target_socket);
+
+ saved_answer_len[i] = 0;
+ num_saved--;
+
+ if (verbose >= 2)
+ fprintf(stderr, "dnsdummy: %d priority slots still filled\n", num_saved);
+ }
+
FD_ZERO(&read_fds);
FD_SET(udp_socket, &read_fds);
if (accept_socket == -1)
@@ -847,8 +930,20 @@
select_value = MAXVAL(udp_socket, accept_socket) + 1;
}
- tmp_timeval.tv_sec = max_secs - (time(NULL) - start_time);
- tmp_timeval.tv_usec = 0;
+ if (do_fork &&
+ (num_saved == 0))
+ {
+ tmp_timeval.tv_sec = max_secs - (time(NULL) - start_time);
+ tmp_timeval.tv_usec = 0;
+ }
+ else if (!do_fork ||
+ ((time(NULL) - start_time) < max_secs))
+ {
+ tmp_timeval.tv_sec = LOOP_SECS;
+ tmp_timeval.tv_usec = LOOP_USECS;
+ }
+ else
+ break;
}
if (verbose >= 2)
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/exitvalue/exitvalue.c
^
|
@@ -1,6 +1,6 @@
/*
exitvalue - a program for generating exit codes.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/run
^
|
@@ -2,7 +2,7 @@
##
# tests/run -- a script for testing spamdyke
-# Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+# Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -138,6 +138,13 @@
if [ "${continue_processing}" != "false" ]
then
+ if [ -z "${TESTSD_MISSING_RDNS_IP}" ]
+ then
+ echo ERROR: TESTSD_MISSING_RDNS_IP is not set.
+ show_usage=true
+ continue_processing=false
+ fi
+
if [ -z "${TESTSD_UNRESOLVABLE_RDNS_IP}" ]
then
echo ERROR: TESTSD_UNRESOLVABLE_RDNS_IP is not set.
@@ -339,6 +346,13 @@
target=$*
fi
+ rm -f ${TMPDIR}/success.txt
+ rm -f ${TMPDIR}/skipped.txt
+ rm -f ${TMPDIR}/failure.txt
+ touch ${TMPDIR}/success.txt
+ touch ${TMPDIR}/skipped.txt
+ touch ${TMPDIR}/failure.txt
+
for dir in ${target}
do
total_tests=$[${total_tests}+1]
@@ -380,15 +394,18 @@
if [ "${outcome}" == "success" ]
then
echo ... SUCCESS: ${dir}
+ echo ${dir} >> ${TMPDIR}/success.txt
success_count=$[${success_count}+1]
else
if [ "${outcome}" == "skipped" ]
then
echo ... SKIPPED: ${dir}
+ echo ${dir} >> ${TMPDIR}/skipped.txt
skipped_tests="${skipped_tests}${dir} "
skipped_count=$[${skipped_count}+1]
else
echo ... FAILURE: ${dir}
+ echo ${dir} >> ${TMPDIR}/failure.txt
failed_tests="${failed_tests}${dir} "
failed_count=$[${failed_count}+1]
fi
@@ -462,6 +479,7 @@
echo "The following environment variables are needed for various tests (those tests"
echo "will fail if they are not set):"
echo ""
+ echo "TESTSD_MISSING_RDNS_IP - IP address with no rDNS name"
echo "TESTSD_UNRESOLVABLE_RDNS_IP - IP address with an rDNS name that does not resolve"
echo "TESTSD_IP_IN_CC_RDNS - IP address with an rDNS name that contains the IP and a"
echo " country code"
@@ -479,6 +497,7 @@
then
echo ""
echo "Recommendations:"
+ echo "export TESTSD_MISSING_RDNS_IP=`grep DENIED_RDNS_MISSING /var/log/maillog | awk '{ print $12 }' | tail -1`"
echo "export TESTSD_UNRESOLVABLE_RDNS_IP=`grep DENIED_RDNS_RESOLVE /var/log/maillog | awk '{ print $12 }' | tail -1`"
echo "export TESTSD_IP_IN_CC_RDNS=`grep DENIED_IP_IN_CC_RDNS /var/log/maillog | awk '{ print $12 }' | tail -1`"
echo "export TESTSD_IP_IN_RDNS_KEYWORD_IP=`grep DENIED_IP_IN_RDNS /var/log/maillog | awk '{ print $12 }' | tail -1`"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/sendrecv/sendrecv.c
^
|
@@ -1,6 +1,6 @@
/*
sendrecv -- a simple program for piping data to and from spamdyke
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -45,7 +45,8 @@
#define STDOUT_FD 1
#define LINE_TERMINATOR_CR '\r'
#define LINE_TERMINATOR '\n'
-#define LINE_TERMINATOR_STR "\r\n"
+#define LINE_TERMINATOR_STR "\n"
+#define LINE_TERMINATOR_CRLF "\r\n"
#define MAX_BUF 4095
#define MAX_INPUT_BUF 65535
#define MINVAL(a,b) ({ typeof (a) _a = (a); typeof (b) _b = (b); _a < _b ? _a : _b; })
@@ -80,10 +81,28 @@
#define TLS_CORRUPT_COUNT 256
#define TLS_CORRUPT_DATA "foobarbazqux"
+#define REPLACE_TARGET_CR "\\r"
+#define REPLACE_REPLACEMENT_CR "\r"
+#define REPLACE_TARGET_LF "\\n"
+#define REPLACE_REPLACEMENT_LF "\n"
+#define REPLACE_TARGET_NULL "\\0"
+#define REPLACE_REPLACEMENT_NULL "\0"
+#define REPLACE_TARGETS (char *[]){ REPLACE_TARGET_CR, REPLACE_TARGET_LF, REPLACE_TARGET_NULL, NULL }
+#define REPLACE_STRLEN_TARGETS (int []){ STRLEN(REPLACE_TARGET_CR), STRLEN(REPLACE_TARGET_LF), STRLEN(REPLACE_TARGET_NULL) }
+#define REPLACE_REPLACEMENTS (char *[]){ REPLACE_REPLACEMENT_CR, REPLACE_REPLACEMENT_LF, REPLACE_REPLACEMENT_NULL }
+#define REPLACE_STRLEN_REPLACEMENTS (int []){ STRLEN(REPLACE_REPLACEMENT_CR), STRLEN(REPLACE_REPLACEMENT_LF), STRLEN(REPLACE_REPLACEMENT_NULL) }
+
void usage()
{
printf(
- "USAGE: sendrecv [ -s ] [ -S ] [ -b DATA_BURST_BYTES ] [ -B POST_DATA_BURST_BYTES ] [ -c UNCORRUPTED_BYTES_TO_SEND ] [ -d INITIAL_DELAY ] [ -M MAX_DATA_BYTES_TO_SEND ] [ -t TIMEOUT_SECS ] [ -r DESIRED_RESPONSE ] [ -u USERNAME -p PASSWORD ] [ -w WRITE_DELAY_SECS ] [ -W BURST_WRITE_DELAY_SECS ] [ -- ] COMMANDLINE [ ARG1 ARG2 ... ]\n"
+ "USAGE: sendrecv [ -v ] [ -s ] [ -S ] [ -b DATA_BURST_BYTES ] [ -B POST_DATA_BURST_BYTES ] [ -c UNCORRUPTED_BYTES_TO_SEND ] [ -d INITIAL_DELAY ] [ -M MAX_DATA_BYTES_TO_SEND ] [ -t TIMEOUT_SECS ] [ -r DESIRED_RESPONSE ] [ -u USERNAME -p PASSWORD ] [ -w WRITE_DELAY_SECS ] [ -W BURST_WRITE_DELAY_SECS ] [ -- ] COMMANDLINE [ ARG1 ARG2 ... ]\n"
+ "\n"
+ "As the input is being read from stdin, any sequence of \\r will be replaced\n"
+ "with a carriage return and any sequence of \\n will be replaced with a line\n"
+ "feed.\n"
+ "\n"
+ "-v\n"
+ " Be verbose: print (more) comments about what's happening.\n"
"\n"
"-s\n"
" Start SSL at the beginning of the session (SMTPS).\n"
@@ -260,6 +279,89 @@
return;
}
+char *find_bytes(char *haystack, int strlen_haystack, char *needle, int strlen_needle)
+ {
+ char *return_value;
+
+ return_value = NULL;
+
+ if ((strlen_haystack > 0) &&
+ (strlen_needle > 0) &&
+ (strlen_needle <= strlen_haystack))
+ {
+ return_value = haystack - strlen_needle;
+
+ do
+ {
+ return_value = memchr(return_value + strlen_needle, needle[0], strlen_haystack - (return_value - haystack));
+ }
+ while ((return_value != NULL) &&
+ ((return_value - haystack) <= (strlen_haystack - strlen_needle)) &&
+ (memcmp(return_value, needle, strlen_needle) != 0));
+ }
+
+ return(return_value);
+ }
+
+/*
+ * replacement_buf must be as large or larger than input_buf
+ * 0 <= start_index <= end_index
+ * end_index must be less than or equal to the size of input_buf
+ */
+int do_replacements(char *input_buf, int start_index, int end_index, char *replacement_buf)
+ {
+ static char *target_list[] = REPLACE_TARGETS;
+ static int strlen_target[] = REPLACE_STRLEN_TARGETS;
+ static char *replacement_list[] = REPLACE_REPLACEMENTS;
+ static int strlen_replacement[] = REPLACE_STRLEN_REPLACEMENTS;
+ int return_value;
+ int i;
+ int j;
+ char *current_match;
+
+ return_value = end_index;
+ bzero(replacement_buf + start_index, end_index - start_index);
+
+ for (i = 0; target_list[i] != NULL; i++)
+ {
+ current_match = input_buf + start_index;
+ while (((current_match = find_bytes(current_match, (return_value - start_index) - (current_match - (input_buf + start_index)), target_list[i], strlen_target[i])) != NULL) &&
+ (current_match < (input_buf + return_value)))
+ {
+ if (strlen_target[i] != strlen_replacement[i])
+ {
+ memmove(current_match + strlen_replacement[i], current_match + strlen_target[i], ((input_buf + return_value) - current_match) - strlen_target[i]);
+ memmove(replacement_buf + (current_match - input_buf) + strlen_replacement[i], replacement_buf + (current_match - input_buf) + strlen_target[i], ((input_buf + return_value) - current_match) - strlen_target[i]);
+ }
+
+ memcpy(current_match, replacement_list[i], strlen_replacement[i]);
+ for (j = 0; j < strlen_replacement[i]; j++)
+ replacement_buf[(current_match - input_buf) + j] = 1;
+
+ return_value -= strlen_target[i] - strlen_replacement[i];
+ current_match += strlen_replacement[i];
+ }
+ }
+
+ return(return_value);
+ }
+
+char *find_unreplaced(char *input_buf, int strlen_input_buf, char *replaced_buf, char *start_ptr, char *target_str, int strlen_target_str)
+ {
+ char *return_value;
+
+ return_value = start_ptr - 1;
+
+ do
+ {
+ return_value = find_bytes(return_value + 1, strlen_input_buf - (return_value - input_buf), target_str, strlen_target_str);
+ }
+ while ((return_value != NULL) &&
+ (memchr(replaced_buf + (return_value - input_buf), 1, strlen_target_str) != NULL));
+
+ return(return_value);
+ }
+
int main(int argc, char *argv[], char *envp[])
{
int return_value;
@@ -286,6 +388,7 @@
char stdin_buf[MAX_INPUT_BUF + 1];
char *stdin_ptr;
int strlen_stdin_buf;
+ char stdin_replaced_buf[MAX_INPUT_BUF + 1];
char insert_buf[MAX_INPUT_BUF + 1];
int strlen_insert_buf;
time_t last_child_read_time;
@@ -314,6 +417,7 @@
int total_data_bytes;
int tmp_bytes;
int start_tls;
+ int verbose;
opterr = 0;
@@ -339,8 +443,9 @@
total_data_bytes = 0;
start_tls = 1;
start_smtps = 0;
+ verbose = 0;
- while ((opt = getopt(argc, argv, "b:B:c:d:M:p:r:sSt:u:w:W:")) != -1)
+ while ((opt = getopt(argc, argv, "b:B:c:d:M:p:r:sSt:u:vw:W:")) != -1)
{
switch (opt)
{
@@ -395,6 +500,9 @@
case 'u':
username = optarg;
break;
+ case 'v':
+ verbose = 1;
+ break;
case 'w':
if ((sscanf(optarg, "%d", &tmp_int) == 1) &&
(tmp_int >= 0))
@@ -621,8 +729,8 @@
}
strlen_insert_buf = cram_md5(insert_buf, username, password, stdout_buf + STRLEN(CODE_CRAMMD5_CHALLENGE));
- strncpy(insert_buf + strlen_insert_buf, LINE_TERMINATOR_STR, STRLEN(LINE_TERMINATOR_STR));
- strlen_insert_buf += STRLEN(LINE_TERMINATOR_STR);
+ strncpy(insert_buf + strlen_insert_buf, LINE_TERMINATOR_CRLF, STRLEN(LINE_TERMINATOR_CRLF));
+ strlen_insert_buf += STRLEN(LINE_TERMINATOR_CRLF);
insert_buf[strlen_insert_buf] = '\0';
}
}
@@ -663,6 +771,9 @@
strlen_stdin_buf += read_result;
stdin_buf[strlen_stdin_buf] = '\0';
+ strlen_stdin_buf = do_replacements(stdin_buf, strlen_stdin_buf - read_result, strlen_stdin_buf, stdin_replaced_buf);
+ stdin_buf[strlen_stdin_buf] = '\0';
+
if (stdin_ptr == NULL)
stdin_ptr = stdin_buf;
}
@@ -701,19 +812,44 @@
{
if (tls_state == TLS_STATE_ACTIVE)
if (!corrupt_tls)
+ {
+ if (verbose)
+ printf("(writing %d via TLS: %.*s)\n", strlen_insert_buf, strlen_insert_buf, insert_buf);
+
SSL_write(tls_session, insert_buf, strlen_insert_buf);
+ }
else if (corrupt_tls >= 0)
{
if (corrupt_tls > tls_bytes_sent)
+ {
+ if (verbose)
+ printf("(writing %d via TLS: %.*s)\n", MAXVAL(strlen_insert_buf, corrupt_tls - tls_bytes_sent), MAXVAL(strlen_insert_buf, corrupt_tls - tls_bytes_sent), insert_buf);
+
tls_bytes_sent += SSL_write(tls_session, insert_buf, MAXVAL(strlen_insert_buf, corrupt_tls - tls_bytes_sent));
+ }
if (corrupt_tls <= tls_bytes_sent)
+ {
+ if (verbose)
+ printf("(writing %d: %.*s)\n", strlen_insert_buf, strlen_insert_buf, insert_buf);
+
tls_bytes_sent += write(child_stdin_pipe[1], insert_buf, strlen_insert_buf);
+ }
}
else
+ {
+ if (verbose)
+ printf("(writing %d: %.*s)\n", strlen_insert_buf, strlen_insert_buf, insert_buf);
+
write(child_stdin_pipe[1], insert_buf, strlen_insert_buf);
+ }
else
+ {
+ if (verbose)
+ printf("(writing %d: %.*s)\n", strlen_insert_buf, strlen_insert_buf, insert_buf);
+
write(child_stdin_pipe[1], insert_buf, strlen_insert_buf);
+ }
next_readwrite = RW_FROM_CHILD;
strlen_insert_buf = 0;
@@ -724,7 +860,7 @@
if ((inside_data &&
(burst_data > 0) &&
(((burst_post_data == 0) &&
- ((next_terminator = strstr(stdin_ptr, SMTP_DATA_END_MULTILINE)) != NULL)) ||
+ ((next_terminator = find_unreplaced(stdin_buf, strlen_stdin_buf, stdin_replaced_buf, stdin_ptr, SMTP_DATA_END_MULTILINE, STRLEN(SMTP_DATA_END_MULTILINE))) != NULL)) ||
((next_terminator = (stdin_buf + strlen_stdin_buf)) != NULL)) &&
((next_terminator < (stdin_ptr + burst_data + burst_post_data)) ||
((next_terminator = (stdin_ptr + burst_data + burst_post_data)) != NULL))) ||
@@ -733,7 +869,7 @@
((next_terminator = (stdin_buf + strlen_stdin_buf)) != NULL) &&
((next_terminator < (stdin_ptr + burst_post_data)) ||
((next_terminator = (stdin_ptr + burst_post_data)) != NULL))) ||
- ((next_terminator = memchr(stdin_ptr, LINE_TERMINATOR, strlen_stdin_buf - (stdin_ptr - stdin_buf))) != NULL) ||
+ ((next_terminator = find_unreplaced(stdin_buf, strlen_stdin_buf, stdin_replaced_buf, stdin_ptr, LINE_TERMINATOR_STR, STRLEN(LINE_TERMINATOR_STR))) != NULL) ||
(((strlen_stdin_buf >= MAX_INPUT_BUF) &&
(stdin_ptr == stdin_buf)) &&
((next_terminator = (stdin_buf + strlen_stdin_buf)) != NULL)))
@@ -746,7 +882,12 @@
tmp_bytes = (inside_data && (max_data_bytes > 0)) ? (((total_data_bytes + (next_terminator - stdin_ptr)) > max_data_bytes) ? (max_data_bytes - total_data_bytes) : (next_terminator - stdin_ptr)) : (next_terminator - stdin_ptr);
if (inside_data)
total_data_bytes += tmp_bytes;
+
+ if (verbose)
+ printf("(writing %d via TLS: %.*s)\n", tmp_bytes, tmp_bytes, stdin_ptr);
+
SSL_write(tls_session, stdin_ptr, tmp_bytes);
+
if ((max_data_bytes > 0) &&
(total_data_bytes >= max_data_bytes))
{
@@ -762,7 +903,12 @@
tmp_bytes = (inside_data && (max_data_bytes > 0)) ? (((total_data_bytes + MAXVAL(next_terminator - stdin_ptr, corrupt_tls - tls_bytes_sent)) > max_data_bytes) ? (max_data_bytes - total_data_bytes) : MAXVAL(next_terminator - stdin_ptr, corrupt_tls - tls_bytes_sent)) : MAXVAL(next_terminator - stdin_ptr, corrupt_tls - tls_bytes_sent);
if (inside_data)
total_data_bytes += tmp_bytes;
+
+ if (verbose)
+ printf("(writing %d via TLS: %.*s)\n", tmp_bytes, tmp_bytes, stdin_ptr);
+
tls_bytes_sent += SSL_write(tls_session, stdin_ptr, tmp_bytes);
+
if ((max_data_bytes > 0) &&
(total_data_bytes >= max_data_bytes))
{
@@ -777,7 +923,12 @@
tmp_bytes = (inside_data && (max_data_bytes > 0)) ? (((total_data_bytes + (next_terminator - stdin_ptr)) > max_data_bytes) ? (max_data_bytes - total_data_bytes) : (next_terminator - stdin_ptr)) : (next_terminator - stdin_ptr);
if (inside_data)
total_data_bytes += tmp_bytes;
+
+ if (verbose)
+ printf("(writing %d: %.*s)\n", tmp_bytes, tmp_bytes, stdin_ptr);
+
tls_bytes_sent += write(child_stdin_pipe[1], stdin_ptr, tmp_bytes);
+
if ((max_data_bytes > 0) &&
(total_data_bytes >= max_data_bytes))
{
@@ -792,7 +943,12 @@
tmp_bytes = (inside_data && (max_data_bytes > 0)) ? (((total_data_bytes + strlen_stdin_buf) > max_data_bytes) ? (max_data_bytes - total_data_bytes) : strlen_stdin_buf) : strlen_stdin_buf;
if (inside_data)
total_data_bytes += tmp_bytes;
+
+ if (verbose)
+ printf("(writing %d: %.*s)\n", tmp_bytes, tmp_bytes, stdin_ptr);
+
write(child_stdin_pipe[1], stdin_buf, tmp_bytes);
+
if ((max_data_bytes > 0) &&
(total_data_bytes >= max_data_bytes))
{
@@ -806,7 +962,12 @@
tmp_bytes = (inside_data && (max_data_bytes > 0)) ? (((total_data_bytes + (next_terminator - stdin_ptr)) > max_data_bytes) ? (max_data_bytes - total_data_bytes) : (next_terminator - stdin_ptr)) : (next_terminator - stdin_ptr);
if (inside_data)
total_data_bytes += tmp_bytes;
+
+ if (verbose)
+ printf("(writing %d: %.*s)\n", tmp_bytes, tmp_bytes, stdin_ptr);
+
write(child_stdin_pipe[1], stdin_ptr, tmp_bytes);
+
if ((max_data_bytes > 0) &&
(total_data_bytes >= max_data_bytes))
{
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/smtpauth/smtpauth_crammd5.c
^
|
@@ -1,7 +1,7 @@
/*
smtpauth_crammd5 - a program for generated encoded usernames and passwords
for the CRAM-MD5 algorithm of the SMTP AUTH protocol.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/smtpauth/smtpauth_login.c
^
|
@@ -1,7 +1,7 @@
/*
smtpauth_login - a program for generated encoded usernames and passwords
for the LOGIN algorithm of the SMTP AUTH protocol.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/smtpauth/smtpauth_plain.c
^
|
@@ -1,7 +1,7 @@
/*
smtpauth_plain - a program for generated encoded usernames and passwords
for the PLAIN algorithm of the SMTP AUTH protocol.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/smtpdummy/smtpdummy.c
^
|
@@ -1,6 +1,6 @@
/*
smtpdummy -- a simple program for simulating a slow SMTP server
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -44,6 +44,8 @@
#define COMMAND_RCPT "RCPT"
#define RESPONSE_RCPT "250 RCPT received\r\n"
#define RESPONSE_RCPT_REJECT "421 RCPT rejected\r\n"
+#define COMMAND_RSET "RSET"
+#define RESPONSE_RSET "250 RSET received\r\n"
#define COMMAND_DATA "DATA"
#define RESPONSE_DATA "354 DATA received\r\n"
#define COMMAND_DATA_END "."
@@ -195,7 +197,7 @@
strlen_buf += read_result;
start_buf[strlen_buf] = '\0';
- while (((next_terminator = strchr(start_buf, '\n')) != NULL) ||
+ while (((next_terminator = memchr(start_buf, '\n', strlen_buf)) != NULL) ||
(strlen_buf == MAX_BUF))
{
if (next_terminator != NULL)
@@ -252,6 +254,13 @@
else
write(STDOUT_FD, RESPONSE_RCPT, STRLEN(RESPONSE_RCPT));
}
+ else if (((strlen_trim == STRLEN(COMMAND_RSET)) ||
+ ((strlen_trim > STRLEN(COMMAND_RSET)) &&
+ isspace(start_buf[STRLEN(COMMAND_RSET)]))) &&
+ (strncasecmp(start_buf, COMMAND_RSET, STRLEN(COMMAND_RSET)) == 0))
+ {
+ write(STDOUT_FD, RESPONSE_RSET, STRLEN(RESPONSE_RSET));
+ }
else if (((strlen_trim == STRLEN(COMMAND_DATA)) ||
((strlen_trim > STRLEN(COMMAND_DATA)) &&
isspace(start_buf[STRLEN(COMMAND_DATA)]))) &&
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_001-login_success/run.sh
^
|
@@ -1,6 +1,6 @@
# This test authenticates using SMTP AUTH LOGIN and delivers a small message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 $3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_002-login_failure/run.sh
^
|
@@ -1,7 +1,7 @@
# This test fails to authenticate using SMTP AUTH LOGIN and gets an error
# message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 foo.$3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_003-plain_success/run.sh
^
|
@@ -1,6 +1,6 @@
# This test authenticates using SMTP AUTH PLAIN and delivers a small message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_DATA=`${SMTPAUTH_PLAIN_PATH} $2 $3 | tail -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_004-plain_failure/run.sh
^
|
@@ -1,7 +1,7 @@
# This test fails to authenticate using SMTP AUTH PLAIN and gets an error
# message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_DATA=`${SMTPAUTH_PLAIN_PATH} $2 foo.$3 | tail -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_005-vpopmail_crammd5_success/run.sh
^
|
@@ -1,6 +1,6 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_006-vpopmail_crammd5_failure/run.sh
^
|
@@ -1,6 +1,6 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_007-vpopmail_crammd5_hostname/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
# The challenge should contain the local hostname.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_008-unknown_protocol/run.sh
^
|
@@ -1,6 +1,6 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_009-unquoted_command/run.sh
^
|
@@ -1,6 +1,6 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
UNQUOTED_AUTH_CMDLINE=`echo ${AUTH_CMDLINE} | sed -e "s/ /,/g"`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_010-tls_login_success/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH LOGIN after starting TLS and delivers
# a small message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 $3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_011-tls_login_failure/run.sh
^
|
@@ -1,7 +1,7 @@
# This test fails to authenticate using SMTP AUTH LOGIN after starting TLS and
# checks that message delivery is blocked.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 foo.$3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_012-plain_inline_success/run.sh
^
|
@@ -1,6 +1,6 @@
# This test authenticates using SMTP AUTH PLAIN and delivers a small message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_DATA=`${SMTPAUTH_PLAIN_PATH} $2 $3 | tail -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_013-plain_inline_failure/run.sh
^
|
@@ -1,7 +1,7 @@
# This test fails to authenticate using SMTP AUTH PLAIN and gets an error
# message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_DATA=`${SMTPAUTH_PLAIN_PATH} $2 foo.$3 | tail -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_014-login_inline_success/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH LOGIN with the first parameter
# (username) sent inline and delivers a small message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 $3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_015-login_inline_failure/run.sh
^
|
@@ -1,7 +1,7 @@
# This test fails to authenticate using SMTP AUTH LOGIN with the first parameter
# (username) sent inline and gets an error message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 foo.$3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_016-double_auth_bypass_no_rdns/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH LOGIN and delivers a small message.
# It checks to make sure the missing rDNS filter is bypassed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 $3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_017-login_inline_multiple_spaces/run.sh
^
|
@@ -2,7 +2,7 @@
# (username) sent inline and delivers a small message. The AUTH command
# includes multiple spaces between "AUTH", "LOGIN" and the parameter.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 $3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_018-plain_inline_multiple_spaces/run.sh
^
|
@@ -2,7 +2,7 @@
# The AUTH command includes multiple spaces between "AUTH", "PLAIN" and the
# parameter.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_DATA=`${SMTPAUTH_PLAIN_PATH} $2 $3 | tail -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_019-unpatched_vpopmail_crammd5_multiple_spaces/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
# The AUTH command includes multiple spaces between "AUTH" and "CRAM-MD5".
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_020-vpopmail_crammd5_hostname_file/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
# The challenge should contain the local hostname read from a file.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
hostname > ${TMPDIR}/${TEST_NUM}-hostname.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_021-vpopmail_crammd5_hostname_command/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
# The challenge should contain the local hostname, read from a command.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_022-unpatched_qmail_login_malformed_input/run.sh
^
|
@@ -1,7 +1,7 @@
# This test fails to authenticate using SMTP AUTH LOGIN due to malformed input
# and gets an error message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=x
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_023-unpatched_qmail_plain_malformed_input/run.sh
^
|
@@ -1,7 +1,7 @@
# This test fails to authenticate using SMTP AUTH PLAIN due to malformed input
# and gets an error message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_DATA=x
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_024-unpatched_vpopmail_qmail_crammd5_malformed_input/run.sh
^
|
@@ -1,7 +1,7 @@
# This test fails to authenticate using SMTP AUTH CRAM-MD5 due to malformed
# input and gets an error message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_025-patched_login_passthrough/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH LOGIN without giving spamdyke the
# auth command to see if spamdyke will honor the qmail authentication.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 $3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_026-patched_plain_passthrough/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH PLAIN without giving spamdyke the
# auth command to see if spamdyke will honor the qmail authentication.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_DATA=`${SMTPAUTH_PLAIN_PATH} $2 $3 | tail -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_027-patched_crammd5_passthrough/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH CRAM-MD5 without giving spamdyke the
# auth command to see if spamdyke will honor the qmail authentication.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_028-patched_always_hides_encryption/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks to see if spamdyke hides the CRAM-MD5 advertisement
# issued by a patched qmail when "always" is used instead of "always-encrypted".
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
cp input.txt ${TMPDIR}/${TEST_NUM}-input.txt
echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --smtp-auth-level always --smtp-auth-command \"${AUTH_CMDLINE}\" ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_bypass_001-no_rdns/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH LOGIN and delivers a small message.
# It checks to make sure the missing rDNS filter is bypassed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 $3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_bypass_002-graylist/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH LOGIN and delivers a small message.
# It checks to make sure the graylisting filter is bypassed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 $3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_bypass_003-missing_sender_mx/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH LOGIN and delivers a small message.
# It checks to make sure the missing sender MX filter is bypassed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 $3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_bypass_007-sender_blacklist/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH LOGIN and delivers a small message.
# It checks to make sure the sender blacklist filter is bypassed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 $3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_bypass_008-recipient_blacklist/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH LOGIN and delivers a small message.
# It checks to make sure the recipient blacklist filter is bypassed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 $3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_bypass_009-unqualified_recipient/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH LOGIN and delivers a small message.
# It checks to make sure the unqualified recipient filter is bypassed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
TO_ADDRESS=`echo $1 | sed -e "s/@.*//" | awk '{ print tolower($1) }'`
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_bypass_011-max_recipients/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH LOGIN and delivers a small message.
# It checks to make sure the max recipients filter is bypassed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 $3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_bypass_012-earlytalker/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH LOGIN and delivers a small message.
# It checks to make sure the earlytalker filter is bypassed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 $3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_bypass_013-relaying/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH LOGIN and delivers a small message.
# It checks to make sure the relaying filter is bypassed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
echo ":allow" > ${TMPDIR}/${TEST_NUM}-access.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-auth_bypass_014-rbl/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.txt.dnsrbl TXT NORMAL Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.txt.dnsrbl TXT NORMAL 0 Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-blacklist_ip_001-exact_match/run.sh
^
|
@@ -1,5 +1,5 @@
# This test looks for a rejection because the incoming IP address is
-# blacklisted by its entire IP address.
+# blacklisted by its entire IP address and checks the reason is correct.
export TCPREMOTEIP=11.22.33.44
@@ -8,13 +8,22 @@
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -B ${TMPDIR}/${TEST_NUM}-blacklist_ip.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -B ${TMPDIR}/${TEST_NUM}-blacklist_ip.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr -B ${TMPDIR}/${TEST_NUM}-blacklist_ip.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr -B ${TMPDIR}/${TEST_NUM}-blacklist_ip.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "554 Refused. Your IP address is blacklisted." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: ${TMPDIR}/${TEST_NUM}-blacklist_ip.txt:1" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-blacklist_ip_006-ip_entry/run.sh
^
|
@@ -1,18 +1,27 @@
# This test looks for a rejection because the incoming IP address is
-# blacklisted by its entire IP address.
+# blacklisted by its entire IP address and checks the reason is correct.
export TCPREMOTEIP=11.22.33.44
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --ip-blacklist-entry 11.22.33.44 ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --ip-blacklist-entry 11.22.33.44 ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --ip-blacklist-entry 11.22.33.44 ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --ip-blacklist-entry 11.22.33.44 ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "554 Refused. Your IP address is blacklisted." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: 11.22.33.44" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-blacklist_rdns_001-exact_match_dir/run.sh
^
|
@@ -1,22 +1,32 @@
# This test looks for a rejection because the incoming rDNS name is blacklisted
-# by FQDN.
+# by FQDN and the reason code is correct.
export TCPREMOTEIP=${TESTSD_RDNS_IP}
FQDN=`${DNSPTR_PATH} ${TESTSD_RDNS_IP}`
+BLACKLIST_PATH=${TMPDIR}/${TEST_NUM}-blacklist.d/`${DOMAIN2PATH_PATH} ${FQDN}`
mkdir -p ${TMPDIR}/${TEST_NUM}-blacklist.d/`${DOMAIN2PATH_PATH} -d ${FQDN}`
-touch ${TMPDIR}/${TEST_NUM}-blacklist.d/`${DOMAIN2PATH_PATH} ${FQDN}`
+touch ${BLACKLIST_PATH}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -b ${TMPDIR}/${TEST_NUM}-blacklist.d ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -b ${TMPDIR}/${TEST_NUM}-blacklist.d ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr -b ${TMPDIR}/${TEST_NUM}-blacklist.d ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr -b ${TMPDIR}/${TEST_NUM}-blacklist.d ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "554 Refused. Your domain name is blacklisted." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: ${BLACKLIST_PATH}" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-blacklist_rdns_003-exact_match_file/run.sh
^
|
@@ -8,13 +8,22 @@
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --rdns-blacklist-file ${TMPDIR}/${TEST_NUM}-blacklist_rdns.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --rdns-blacklist-file ${TMPDIR}/${TEST_NUM}-blacklist_rdns.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --rdns-blacklist-file ${TMPDIR}/${TEST_NUM}-blacklist_rdns.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --rdns-blacklist-file ${TMPDIR}/${TEST_NUM}-blacklist_rdns.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "554 Refused. Your domain name is blacklisted." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: ${TMPDIR}/${TEST_NUM}-blacklist_rdns.txt:1" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-blacklist_rdns_005-exact_match_entry/run.sh
^
|
@@ -1,18 +1,28 @@
# This test looks for a rejection because the incoming rDNS name is blacklisted
-# by FQDN in an entry.
+# by FQDN in an entry and checks the reason is correct.
export TCPREMOTEIP=${TESTSD_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
+BLACKLIST_ENTRY=`${DNSPTR_PATH} ${TESTSD_RDNS_IP}`
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --rdns-blacklist-entry `${DNSPTR_PATH} ${TESTSD_RDNS_IP}` ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --rdns-blacklist-entry `${DNSPTR_PATH} ${TESTSD_RDNS_IP}` ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --rdns-blacklist-entry ${BLACKLIST_ENTRY} ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --rdns-blacklist-entry ${BLACKLIST_ENTRY} ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "554 Refused. Your domain name is blacklisted." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: ${BLACKLIST_ENTRY}" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-blacklist_recipient_001-exact_match/run.sh
^
|
@@ -1,20 +1,29 @@
# This test looks for a rejection because the recipient email address is
-# blacklisted.
+# blacklisted and checks the reason is correct.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
echo $1 | awk '{ print tolower($1) }' > ${TMPDIR}/${TEST_NUM}-recipient_blacklist.txt
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -S ${TMPDIR}/${TEST_NUM}-recipient_blacklist.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -S ${TMPDIR}/${TEST_NUM}-recipient_blacklist.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr -S ${TMPDIR}/${TEST_NUM}-recipient_blacklist.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr -S ${TMPDIR}/${TEST_NUM}-recipient_blacklist.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "554 Refused. Mail is not being accepted at this address." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: ${TMPDIR}/${TEST_NUM}-recipient_blacklist.txt:1" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-blacklist_recipient_002-domain_name/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the recipient email address is
# blacklisted by domain name.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-blacklist_recipient_003-batv_exact_match/run.sh
^
|
@@ -1,6 +1,6 @@
# This tests if BATV addresses are parsed correctly by the blacklist filter.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-blacklist_recipient_004-batv_domain_name/run.sh
^
|
@@ -1,7 +1,7 @@
# This tests if domain names within BATV addresses are parsed correctly by the
# blacklist filter.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-blacklist_recipient_005-exact_match_entry/run.sh
^
|
@@ -1,18 +1,28 @@
# This test looks for a rejection because the recipient email address is
-# blacklisted.
+# blacklisted and checks the reason is correct.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
+BLACKLIST_ENTRY=`echo $1 | awk '{ print tolower($1) }'`
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --recipient-blacklist-entry `echo $1 | awk '{ print tolower($1) }'` ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --recipient-blacklist-entry `echo $1 | awk '{ print tolower($1) }'` ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --recipient-blacklist-entry ${BLACKLIST_ENTRY} ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --recipient-blacklist-entry ${BLACKLIST_ENTRY} ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "554 Refused. Mail is not being accepted at this address." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: ${BLACKLIST_ENTRY}" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-blacklist_recipient_006-miscased_entry/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the recipient email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-blacklist_sender_001-exact_match/run.sh
^
|
@@ -1,20 +1,29 @@
# This test looks for a rejection because the sender email address is
-# blacklisted.
+# blacklisted and checks the reason is correct.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
echo ${FROM_ADDRESS} > ${TMPDIR}/${TEST_NUM}-sender_blacklist.txt
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -s ${TMPDIR}/${TEST_NUM}-sender_blacklist.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -s ${TMPDIR}/${TEST_NUM}-sender_blacklist.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr -s ${TMPDIR}/${TEST_NUM}-sender_blacklist.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr -s ${TMPDIR}/${TEST_NUM}-sender_blacklist.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "554 Refused. Your sender address has been blacklisted." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: ${TMPDIR}/${TEST_NUM}-sender_blacklist.txt:1" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-blacklist_sender_002-domain_name/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the sender email address is
# blacklisted by domain name.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-blacklist_sender_003-exact_match_entry/run.sh
^
|
@@ -1,18 +1,27 @@
# This test looks for a rejection because the sender email address is
-# blacklisted.
+# blacklisted and checks the reason is correct.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --sender-blacklist-entry ${FROM_ADDRESS} ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --sender-blacklist-entry ${FROM_ADDRESS} ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --sender-blacklist-entry ${FROM_ADDRESS} ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --sender-blacklist-entry ${FROM_ADDRESS} ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "554 Refused. Your sender address has been blacklisted." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: ${FROM_ADDRESS}" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-blacklist_sender_004-miscased_entry/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the sender email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_USERNAME=test-${TEST_NUM}.${RANDOM}.${RANDOM}
FROM_ADDRESS=${FROM_USERNAME}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_002-reject_empty_rdns/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the incoming IP address doesn't have
# an rDNS name.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_004-reject_missing_sender_mx/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for a rejection when the sender's domain has no MX record.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_005-log_level/run.sh
^
|
@@ -1,7 +1,7 @@
# This test delivers a small test message and looks for the correct qmail status
# code and a log message in syslog.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_006-full_log_dir/run.sh
^
|
@@ -1,7 +1,7 @@
# This test delivers a small test message and looks for the correct qmail status
# code. spamdyke should log the entire SMTP conversation to a file.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_007-policy_url/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for the policy text to be appended to the rejection message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_008-connection_timeout_secs/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the remote client takes too long to
# deliver the entire message (absolute timeout).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_009-idle_timeout_secs/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the remote client takes too long to
# issue a command (idle timeout).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_012-max_recipients/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for a rejection when too many recipients are given.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_013-graylist_dir/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist domains that are properly setup
# (activated).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_014-anti_graylist/run.sh
^
|
@@ -2,7 +2,7 @@
# proper graylist directories setup (activated) when the "no-graylist" option is
# used and the domains don't have entries in a "grayblacklist" file.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_015-graylist_min_secs/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist redeliveries when the minimum time
# has not passed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_016-graylist_max_secs/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist deliveries when an old graylist
# entry exists but the maximum age has passed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
CURRENT_TIME=`date "+%s"`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_023-smtp_auth_command/run.sh
^
|
@@ -1,6 +1,6 @@
# This test authenticates using SMTP AUTH LOGIN and delivers a small message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_024-smtp_auth_command_encryption/run.sh
^
|
@@ -1,6 +1,6 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_025-greeting_delay_secs/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the remote server sends data before
# the SMTP greeting banner is received (earlytalker).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_026-check_dnsrbl/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.txt.dnsrbl TXT NORMAL Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.txt.dnsrbl TXT NORMAL 0 Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
@@ -16,7 +16,7 @@
echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --config-dir ${TMPDIR}/${TEST_NUM}-config.d ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --config-dir ${TMPDIR}/${TEST_NUM}-config.d ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
-output=`grep "554 Test DNSRBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your IP address is listed in the RBL at txt.dnsrbl: Test DNSRBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
outcome="success"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_027-check_dns_whitelist/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.txt.dnsrwl TXT NORMAL Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.txt.dnsrwl TXT NORMAL 0 Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_028-check_rhsbl/run.sh
^
|
@@ -3,8 +3,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.txt.rhsbl TXT NORMAL Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.txt.rhsbl TXT NORMAL 0 Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
@@ -17,7 +17,7 @@
echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --config-dir ${TMPDIR}/${TEST_NUM}-config.d ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --config-dir ${TMPDIR}/${TEST_NUM}-config.d ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
-output=`grep "554 Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your domain name is listed in the RHSBL at txt.rhsbl: Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
outcome="success"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_029-check_rhs_whitelist/run.sh
^
|
@@ -3,8 +3,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.txt.rhsbl TXT NORMAL Test RHSWL match." >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.txt.rhsbl TXT NORMAL 0 Test RHSWL match." >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_036-ip_whitelist_file/run.sh
^
|
@@ -1,8 +1,8 @@
# This test looks for success because the incoming IP address is whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo 0.0.0.0 > ${TMPDIR}/${TEST_NUM}-whitelist_ip.txt
+echo ${TESTSD_MISSING_RDNS_IP} > ${TMPDIR}/${TEST_NUM}-whitelist_ip.txt
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_037-sender_blacklist_file/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the sender email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_038-sender_whitelist_file/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the whole sender address has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
echo ${FROM_ADDRESS} > ${TMPDIR}/${TEST_NUM}-whitelist_sender.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_039-recipient_blacklist_file/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the recipient email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_040-recipient_whitelist_file/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the whole recipient address has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
echo $1 > ${TMPDIR}/${TEST_NUM}-whitelist_recipient.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_041-hostname/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
# The challenge should contain the local hostname.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_042-hostname_file/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
# The challenge should contain the local hostname read from a file.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
hostname > ${TMPDIR}/${TEST_NUM}-hostname.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_043-hostname_command/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
# The challenge should contain the local hostname, read from a command.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_052-reject_empty_rdns_no_value/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the incoming IP address doesn't have
# an rDNS name. The config directive is given without a value.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_054-reject_missing_sender_mx_no_value/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the sender's domain has no MX record.
# The config directive is given without a value.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_055-stderr_logs/run.sh
^
|
@@ -1,7 +1,7 @@
# This test delivers a small test message and looks for the correct qmail status
# code and a log message on stderr.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_058-filter_level/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and no SMTP AUTH. The message should be
# rejected.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_065-ip_whitelist_entry/run.sh
^
|
@@ -1,12 +1,12 @@
# This test looks for success because the incoming IP address is whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
mkdir -p ${TMPDIR}/${TEST_NUM}-config.d/_sender_/com
echo reject-empty-rdns >> ${TMPDIR}/${TEST_NUM}-config.d/_sender_/com/example
-echo ip-whitelist-entry=0.0.0.0 >> ${TMPDIR}/${TEST_NUM}-config.d/_sender_/com/example
+echo ip-whitelist-entry=${TESTSD_MISSING_RDNS_IP} >> ${TMPDIR}/${TEST_NUM}-config.d/_sender_/com/example
cat input.txt | sed -e "s/TEST_NUM/${TEST_NUM}/g" -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --config-dir ${TMPDIR}/${TEST_NUM}-config.d ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_069-recipient_blacklist_entry/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the recipient email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_070-recipient_whitelist_entry/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the whole recipient address has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_072-rejection_text_dns_blacklist/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.a.dnsrbl A NORMAL 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.a.dnsrbl A NORMAL 0 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_073-rejection_text_earlytalker/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the remote server sends data before
# the SMTP greeting banner is received (earlytalker).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_074-rejection_text_empty_rdns/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the incoming IP address doesn't have
# an rDNS name.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_075-rejection_text_graylist/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist domains that are properly setup
# (activated).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_079-rejection_text_local_recipient/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the recipient address is not qualified
# (no domain name given).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_080-rejection_text_max_recipients/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for a rejection when too many recipients are given.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_081-rejection_text_missing_sender_mx/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for a rejection when the sender's domain has no MX record.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_083-rejection_text_recipient_blacklist/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the recipient email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_084-rejection_text_reject_all/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and no SMTP AUTH. The message should be
# rejected.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_086-rejection_text_rhs_blacklist/run.sh
^
|
@@ -1,9 +1,9 @@
# This test looks for a rejection because the incoming sender address is on a
# RHSBL that uses A records.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo "example.com.a.rhsbl A NORMAL 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.a.rhsbl A NORMAL 0 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_087-rejection_text_sender_blacklist/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the sender email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_088-rejection_text_smtp_auth_required/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and no SMTP AUTH. The message should be
# rejected.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_089-rejection_text_timeout/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the remote client takes too long to
# deliver the entire message (absolute timeout).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_092-rhs_blacklist_file/run.sh
^
|
@@ -3,8 +3,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.txt.rhsbl TXT NORMAL Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.txt.rhsbl TXT NORMAL 0 Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
@@ -19,7 +19,7 @@
echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --config-dir ${TMPDIR}/${TEST_NUM}-config.d ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --config-dir ${TMPDIR}/${TEST_NUM}-config.d ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
-output=`grep "554 Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your domain name is listed in the RHSBL at txt.rhsbl: Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
outcome="success"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_093-rhs_whitelist_file/run.sh
^
|
@@ -3,8 +3,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.txt.rhsbl TXT NORMAL Test RHSWL match." >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.txt.rhsbl TXT NORMAL 0 Test RHSWL match." >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_094-run_as_user/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a startup error because the configuration file can't be
# read after the user has been changed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
@@ -11,7 +11,7 @@
echo ip-whitelist-file=${TMPDIR}/${TEST_NUM}-whitelist_ip.txt >> ${TMPDIR}/${TEST_NUM}-config.d/_sender_/com/example
echo log-target=stderr >> ${TMPDIR}/${TEST_NUM}-config.d/_sender_/com/example
-echo 0.0.0.0 > ${TMPDIR}/${TEST_NUM}-whitelist_ip.txt
+echo ${TESTSD_MISSING_RDNS_IP} > ${TMPDIR}/${TEST_NUM}-whitelist_ip.txt
chmod 600 ${TMPDIR}/${TEST_NUM}-whitelist_ip.txt
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_095-sender_blacklist_entry/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the sender email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_096-sender_whitelist_entry/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the whole sender address has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_098-dns_blacklist_entry/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.txt.dnsrbl TXT NORMAL Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.txt.dnsrbl TXT NORMAL 0 Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
@@ -16,7 +16,7 @@
echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --config-dir ${TMPDIR}/${TEST_NUM}-config.d ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --config-dir ${TMPDIR}/${TEST_NUM}-config.d ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
-output=`grep "554 Test DNSRBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your IP address is listed in the RBL at txt.dnsrbl: Test DNSRBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
outcome="success"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_099-unset_single_string_not_set/run.sh
^
|
@@ -1,7 +1,7 @@
# This test tries to unset a string singleton that wasn't set. Nothing should
# happen.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_100-unset_single_string_match/run.sh
^
|
@@ -1,7 +1,7 @@
# This test sets the policy URL, then unsets it to check exact matches on
# singleton strings.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_101-unset_single_string_mismatch/run.sh
^
|
@@ -1,7 +1,7 @@
# This test sets the policy URL, then tries to unset it to check that mismatches
# have no effect.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_102-clear_single_string_not_set/run.sh
^
|
@@ -1,7 +1,7 @@
# This test tries to clear a string singleton that wasn't set. Nothing should
# happen.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_103-clear_single_string_match/run.sh
^
|
@@ -1,6 +1,6 @@
# This test sets the policy URL, then clears it.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_112-greeting_delay_secs_error/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the remote server sends data before
# the SMTP greeting banner is received (earlytalker).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_113-rejection_text_zero_recipients/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the recipient is blacklisted
# and rejected by spamdyke but the remote client sends DATA anyway.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_114-rejection_text_auth_unknown/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the remote server requests
# an unsupported authentication method.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_116-rejection_text_auth_failure/run.sh
^
|
@@ -1,7 +1,7 @@
# This test fails to authenticate using SMTP AUTH LOGIN and gets an error
# message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 foo.$3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_117-reject_identical_sender_recipient/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for a rejection when the sender's domain has no MX record.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_118-reject_identical_sender_recipient_no_value/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the sender and recipient addresses are
# the same. The config directive is given without a value.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_119-rejection_text_identical_sender_recipient/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the sender and recipient addresses are
# the same.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_121-dns_tcp/run.sh
^
|
@@ -5,7 +5,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR TRUNCATE foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR TRUNCATE 0 foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_dir_122-dns_spoof/run.sh
^
|
@@ -5,7 +5,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR SPOOF foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR SPOOF 0 foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_002-reject_empty_rdns/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the incoming IP address doesn't have
# an rDNS name.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_004-reject_missing_sender_mx/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for a rejection when the sender's domain has no MX record.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_005-log_level/run.sh
^
|
@@ -1,7 +1,7 @@
# This test delivers a small test message and looks for the correct qmail status
# code and a log message in syslog.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_006-full_log_dir/run.sh
^
|
@@ -1,7 +1,7 @@
# This test delivers a small test message and looks for the correct qmail status
# code. spamdyke should log the entire SMTP conversation to a file.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_007-policy_url/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for the policy text to be appended to the rejection message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_008-connection_timeout_secs/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the remote client takes too long to
# deliver the entire message (absolute timeout).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_009-idle_timeout_secs/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the remote client takes too long to
# issue a command (idle timeout).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_012-max_recipients/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for a rejection when too many recipients are given.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_013-graylist_dir/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist domains that are properly setup
# (activated).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_014-anti_graylist/run.sh
^
|
@@ -2,7 +2,7 @@
# proper graylist directories setup (activated) when the "no-graylist" option is
# used and the domains don't have entries in a "grayblacklist" file.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_015-graylist_min_secs/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist redeliveries when the minimum time
# has not passed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_016-graylist_max_secs/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist deliveries when an old graylist
# entry exists but the maximum age has passed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
CURRENT_TIME=`date "+%s"`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_023-smtp_auth_command/run.sh
^
|
@@ -1,6 +1,6 @@
# This test authenticates using SMTP AUTH LOGIN and delivers a small message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 $3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_024-vpopmail_smtp_auth_command_encryption/run.sh
^
|
@@ -1,6 +1,6 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_025-greeting_delay_secs/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the remote server sends data before
# the SMTP greeting banner is received (earlytalker).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_026-check_dnsrbl/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.txt.dnsrbl TXT NORMAL Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.txt.dnsrbl TXT NORMAL 0 Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
@@ -15,7 +15,7 @@
echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -f ${TMPDIR}/${TEST_NUM}-config.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -f ${TMPDIR}/${TEST_NUM}-config.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
-output=`grep "554 Test DNSRBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your IP address is listed in the RBL at txt.dnsrbl: Test DNSRBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
outcome="success"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_027-check_dns_whitelist/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.txt.dnsrwl TXT NORMAL Test DNSRWL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.txt.dnsrwl TXT NORMAL 0 Test DNSRWL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_028-check_rhsbl/run.sh
^
|
@@ -3,8 +3,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.txt.rhsbl TXT NORMAL Test RHSBL match." >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.txt.rhsbl TXT NORMAL 0 Test RHSBL match." >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
@@ -16,7 +16,7 @@
echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -f ${TMPDIR}/${TEST_NUM}-config.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -f ${TMPDIR}/${TEST_NUM}-config.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
-output=`grep "554 Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your domain name is listed in the RHSBL at txt.rhsbl: Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
outcome="success"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_029-check_rhs_whitelist/run.sh
^
|
@@ -3,8 +3,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.txt.rhsbl TXT NORMAL Test RHSWL match." >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.txt.rhsbl TXT NORMAL 0 Test RHSWL match." >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_036-ip_whitelist_file/run.sh
^
|
@@ -1,8 +1,8 @@
# This test looks for success because the incoming IP address is whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo 0.0.0.0 > ${TMPDIR}/${TEST_NUM}-whitelist_ip.txt
+echo ${TESTSD_MISSING_RDNS_IP} > ${TMPDIR}/${TEST_NUM}-whitelist_ip.txt
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_037-sender_blacklist_file/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the sender email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_038-sender_whitelist_file/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the whole sender address has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
echo ${FROM_ADDRESS} > ${TMPDIR}/${TEST_NUM}-whitelist_sender.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_039-recipient_blacklist_file/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the recipient email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_040-recipient_whitelist_file/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the whole recipient address has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
echo $1 > ${TMPDIR}/${TEST_NUM}-whitelist_recipient.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_041-vpopmail_hostname/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
# The challenge should contain the local hostname.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_042-vpopmail_hostname_file/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
# The challenge should contain the local hostname read from a file.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
hostname > ${TMPDIR}/${TEST_NUM}-hostname.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_043-vpopmail_hostname_command/run.sh
^
|
@@ -1,7 +1,7 @@
# This test authenticates using SMTP AUTH CRAM-MD5 and delivers a small message.
# The challenge should contain the local hostname, read from a command.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_052-reject_empty_rdns_no_value/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the incoming IP address doesn't have
# an rDNS name. The config directive is given without a value.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_054-reject_missing_sender_mx_no_value/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the sender's domain has no MX record.
# The config directive is given without a value.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_055-stderr_logs/run.sh
^
|
@@ -1,7 +1,7 @@
# This test delivers a small test message and looks for the correct qmail status
# code and a log message on stderr.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_058-filter_level/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and no SMTP AUTH. The message should be
# rejected.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_065-ip_whitelist_entry/run.sh
^
|
@@ -1,11 +1,11 @@
# This test looks for success because the incoming IP address is whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
echo reject-empty-rdns >> ${TMPDIR}/${TEST_NUM}-config.txt
-echo ip-whitelist-entry=0.0.0.0 >> ${TMPDIR}/${TEST_NUM}-config.txt
+echo ip-whitelist-entry=${TESTSD_MISSING_RDNS_IP} >> ${TMPDIR}/${TEST_NUM}-config.txt
cat input.txt | sed -e "s/TEST_NUM/${TEST_NUM}/g" -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} -f ${TMPDIR}/${TEST_NUM}-config.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_069-recipient_blacklist_entry/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the recipient email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_070-recipient_whitelist_entry/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the whole recipient address has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_072-rejection_text_dns_blacklist/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.a.dnsrbl A NORMAL 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.a.dnsrbl A NORMAL 0 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_073-rejection_text_earlytalker/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the remote server sends data before
# the SMTP greeting banner is received (earlytalker).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_074-rejection_text_empty_rdns/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the incoming IP address doesn't have
# an rDNS name.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_075-rejection_text_graylist/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist domains that are properly setup
# (activated).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_079-rejection_text_local_recipient/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the recipient address is not qualified
# (no domain name given).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_080-rejection_text_max_recipients/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for a rejection when too many recipients are given.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_081-rejection_text_missing_sender_mx/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for a rejection when the sender's domain has no MX record.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_083-rejection_text_recipient_blacklist/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the recipient email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_084-rejection_text_reject_all/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and no SMTP AUTH. The message should be
# rejected.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_086-rejection_text_rhs_blacklist/run.sh
^
|
@@ -1,9 +1,9 @@
# This test looks for a rejection because the incoming sender address is on a
# RHSBL that uses A records.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo "example.com.a.rhsbl A NORMAL 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.a.rhsbl A NORMAL 0 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_087-rejection_text_sender_blacklist/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the sender email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_088-rejection_text_smtp_auth_required/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and no SMTP AUTH. The message should be
# rejected.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_089-rejection_text_timeout/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the remote client takes too long to
# deliver the entire message (absolute timeout).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_092-rhs_blacklist_file/run.sh
^
|
@@ -3,8 +3,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.txt.rhsbl TXT NORMAL Test RHSBL match." >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.txt.rhsbl TXT NORMAL 0 Test RHSBL match." >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
@@ -18,7 +18,7 @@
echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -f ${TMPDIR}/${TEST_NUM}-config.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -f ${TMPDIR}/${TEST_NUM}-config.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
-output=`grep "554 Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your domain name is listed in the RHSBL at txt.rhsbl: Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
outcome="success"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_093-rhs_whitelist_file/run.sh
^
|
@@ -3,8 +3,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.txt.rhsbl TXT NORMAL Test RHSWL match." >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.txt.rhsbl TXT NORMAL 0 Test RHSWL match." >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_094-run_as_user/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a startup error because the configuration file can't be
# read after the user has been changed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
@@ -10,7 +10,7 @@
echo ip-whitelist-file=${TMPDIR}/${TEST_NUM}-whitelist_ip.txt >> ${TMPDIR}/${TEST_NUM}-config.txt
echo log-target=stderr >> ${TMPDIR}/${TEST_NUM}-config.txt
-echo 0.0.0.0 > ${TMPDIR}/${TEST_NUM}-whitelist_ip.txt
+echo ${TESTSD_MISSING_RDNS_IP} > ${TMPDIR}/${TEST_NUM}-whitelist_ip.txt
chmod 600 ${TMPDIR}/${TEST_NUM}-whitelist_ip.txt
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_095-sender_blacklist_entry/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the sender email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_096-sender_whitelist_entry/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the whole sender address has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_098-dns_blacklist_entry/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.txt.dnsrbl TXT NORMAL Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.txt.dnsrbl TXT NORMAL 0 Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
@@ -15,7 +15,7 @@
echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -f ${TMPDIR}/${TEST_NUM}-config.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -f ${TMPDIR}/${TEST_NUM}-config.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
-output=`grep "554 Test DNSRBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your IP address is listed in the RBL at txt.dnsrbl: Test DNSRBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
outcome="success"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_099-unset_single_string_not_set/run.sh
^
|
@@ -1,7 +1,7 @@
# This test tries to unset a string singleton that wasn't set. Nothing should
# happen.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_100-unset_single_string_match/run.sh
^
|
@@ -1,7 +1,7 @@
# This test sets the policy URL, then unsets it to check exact matches on
# singleton strings.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_101-unset_single_string_mismatch/run.sh
^
|
@@ -1,7 +1,7 @@
# This test sets the policy URL, then tries to unset it to check that mismatches
# have no effect.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_102-clear_single_string_not_set/run.sh
^
|
@@ -1,7 +1,7 @@
# This test tries to clear a string singleton that wasn't set. Nothing should
# happen.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_103-clear_single_string_match/run.sh
^
|
@@ -1,6 +1,6 @@
# This test sets the policy URL, then clears it.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_114-rejection_text_zero_recipients/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the recipient is blacklisted
# and rejected by spamdyke but the remote client sends DATA anyway.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_115-rejection_text_auth_unknown/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the remote server requests
# an unsupported authentication method.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_117-rejection_text_auth_failure/run.sh
^
|
@@ -1,7 +1,7 @@
# This test fails to authenticate using SMTP AUTH LOGIN and gets an error
# message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 foo.$3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_118-reject_identical_sender_recipient/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the sender and recipient addresses are
# the same.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_119-reject_identical_sender_recipient_no_value/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the sender and recipient addresses are
# the same. The config directive is given without a value.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_120-rejection_text_identical_sender_recipient/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the sender and recipient addresses are
# the same.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_122-dns_tcp/run.sh
^
|
@@ -5,7 +5,7 @@
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
-echo "44.33.22.11.in-addr.arpa PTR TRUNCATE foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR TRUNCATE 0 foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_123-dns_spoof/run.sh
^
|
@@ -5,7 +5,7 @@
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
-echo "44.33.22.11.in-addr.arpa PTR SPOOF foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR SPOOF 0 foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 60 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_125-dns_query_type_a/run.sh
^
|
@@ -3,9 +3,9 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "foo.example.com CNAME NORMAL bar.example.com" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "bar.example.com A NORMAL 11.22.33.44" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "foo.example.com CNAME NORMAL 0 bar.example.com" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "bar.example.com A NORMAL 0 11.22.33.44" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_126-dns_query_type_mx/run.sh
^
|
@@ -4,7 +4,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "example.com MX NORMAL 11.22.33.44" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com MX NORMAL 0 11.22.33.44" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_127-dns_query_type_ptr/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_file_128-dns_query_type_rbl/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.test.rwl TXT NORMAL Some text." > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.test.rwl TXT NORMAL 0 Some text." > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
@@ -12,8 +12,8 @@
echo "dns-query-type-rbl=a" > ${TMPDIR}/${TEST_NUM}-config.txt
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry 0.0.0.0/0 -f ${TMPDIR}/${TEST_NUM}-config.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry 0.0.0.0/0 -f ${TMPDIR}/${TEST_NUM}-config.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry ${TESTSD_MISSING_RDNS_IP}/0 -f ${TMPDIR}/${TEST_NUM}-config.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry ${TESTSD_MISSING_RDNS_IP}/0 -f ${TMPDIR}/${TEST_NUM}-config.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
output=`grep "554 Refused. Your IP address is blacklisted." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_test_052-unpatched_unresponsive_smtp_auth/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to authenticate using an SMTP AUTH command that is
# unresponsive and won't exit.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 foo.$3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-config_test_053-unpatched_vpopmail_unresponsive_hostname/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to authenticate using CRAM-MD5 with a hostname command that
# is unresponsive and won't exit.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_038-dns_tcp_none/run.sh
^
|
@@ -5,7 +5,7 @@
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
-echo "44.33.22.11.in-addr.arpa PTR TRUNCATE foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR TRUNCATE 0 foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_039-dns_tcp_normal/run.sh
^
|
@@ -5,7 +5,7 @@
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
-echo "44.33.22.11.in-addr.arpa PTR TRUNCATE foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR TRUNCATE 0 foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_040-dns_spoof_accept_all/run.sh
^
|
@@ -5,7 +5,7 @@
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
-echo "44.33.22.11.in-addr.arpa PTR SPOOF foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR SPOOF 0 foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_041-dns_spoof_accept_same_ip/run.sh
^
|
@@ -5,7 +5,7 @@
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
-echo "44.33.22.11.in-addr.arpa PTR SPOOF foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR SPOOF 0 foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_042-dns_spoof_reject/run.sh
^
|
@@ -5,7 +5,7 @@
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
-echo "44.33.22.11.in-addr.arpa PTR SPOOF foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR SPOOF 0 foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 120 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_043-dns_spoof_accept_same_port/run.sh
^
|
@@ -6,7 +6,7 @@
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
-echo "44.33.22.11.in-addr.arpa PTR SPOOF foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR SPOOF 0 foo.bar" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 120 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_044-query_type_a_a/run.sh
^
|
@@ -3,9 +3,9 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "foo.example.com CNAME NORMAL bar.example.com" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "bar.example.com A NORMAL 11.22.33.44" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "foo.example.com CNAME NORMAL 0 bar.example.com" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "bar.example.com A NORMAL 0 11.22.33.44" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_045-query_type_a_cname/run.sh
^
|
@@ -3,9 +3,9 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "foo.example.com CNAME NORMAL bar.example.com" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "bar.example.com A NORMAL 11.22.33.44" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "foo.example.com CNAME NORMAL 0 bar.example.com" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "bar.example.com A NORMAL 0 11.22.33.44" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_046-query_type_mx_a/run.sh
^
|
@@ -4,7 +4,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "example.com MX NORMAL 11.22.33.44" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com MX NORMAL 0 11.22.33.44" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_047-query_type_mx_cname/run.sh
^
|
@@ -4,8 +4,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "example.com CNAME NORMAL mail.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "mail.example.com A NORMAL 11.22.33.44" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com CNAME NORMAL 0 mail.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "mail.example.com A NORMAL 0 11.22.33.44" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_048-query_type_mx_mx/run.sh
^
|
@@ -4,7 +4,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "example.com A NORMAL 11.22.33.44" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com A NORMAL 0 11.22.33.44" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_049-query_type_ptr_cname/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_050-query_type_ptr_ptr/run.sh
^
|
@@ -3,8 +3,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa CNAME NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "foo.example.com PTR NORMAL bar.example.com" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa CNAME NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "foo.example.com PTR NORMAL 0 bar.example.com" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_051-query_type_rbl_a/run.sh
^
|
@@ -3,15 +3,15 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.test.rwl TXT NORMAL Some text." > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.test.rwl TXT NORMAL 0 Some text." > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry 0.0.0.0/0 --dns-query-type-rbl a ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry 0.0.0.0/0 --dns-query-type-rbl a ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry ${TESTSD_MISSING_RDNS_IP}/0 --dns-query-type-rbl a ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry ${TESTSD_MISSING_RDNS_IP}/0 --dns-query-type-rbl a ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
output=`grep "554 Refused. Your IP address is blacklisted." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_052-query_type_rbl_cname/run.sh
^
|
@@ -3,15 +3,15 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.test.rwl A NORMAL 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.test.rwl A NORMAL 0 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry 0.0.0.0/0 --dns-query-type-rbl cname ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry 0.0.0.0/0 --dns-query-type-rbl cname ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry ${TESTSD_MISSING_RDNS_IP}/0 --dns-query-type-rbl cname ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry ${TESTSD_MISSING_RDNS_IP}/0 --dns-query-type-rbl cname ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
output=`grep "554 Refused. Your IP address is blacklisted." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-dns_053-query_type_rbl_txt/run.sh
^
|
@@ -3,15 +3,15 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.test.rwl A NORMAL 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.test.rwl A NORMAL 0 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry 0.0.0.0/0 --dns-query-type-rbl txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry 0.0.0.0/0 --dns-query-type-rbl txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry ${TESTSD_MISSING_RDNS_IP}/0 --dns-query-type-rbl txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-whitelist-entry test.rwl --ip-blacklist-entry ${TESTSD_MISSING_RDNS_IP}/0 --dns-query-type-rbl txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
output=`grep "554 Refused. Your IP address is blacklisted." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-env_003-no_ip/run.sh
^
|
@@ -1,5 +1,5 @@
# This test delivers a small test message without setting a remote IP address
-# and checks to make sure spamdyke defaults to 0.0.0.0.
+# and checks to make sure spamdyke defaults to 0.0.0.0
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-filter_level_001-allow_all_no_auth_no_rdns_no_flags/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and no SMTP AUTH. The message should be
# accepted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-filter_level_002-allow_all_auth_no_rdns_no_flags/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and SMTP AUTH. The message should be
# accepted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_DATA=`${SMTPAUTH_PLAIN_PATH} $2 $3 | tail -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-filter_level_003-allow_all_no_auth_no_rdns_flags/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, the missing rDNS filter and no SMTP AUTH. The message should be
# accepted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-filter_level_004-allow_all_auth_no_rdns_flags/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, the missing rDNS filter and SMTP AUTH. The message should be
# accepted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_DATA=`${SMTPAUTH_PLAIN_PATH} $2 $3 | tail -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-filter_level_005-normal_no_auth_no_rdns_no_flags/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and no SMTP AUTH. The message should be
# accepted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-filter_level_006-normal_auth_no_rdns_no_flags/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and SMTP AUTH. The message should be
# accepted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_DATA=`${SMTPAUTH_PLAIN_PATH} $2 $3 | tail -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-filter_level_007-normal_no_auth_no_rdns_flags/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, the missing rDNS filter and no SMTP AUTH. The message should be
# rejected.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-filter_level_009-normal_auth_no_rdns_flags/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, the missing rDNS filter and SMTP AUTH. The message should be
# accepted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_DATA=`${SMTPAUTH_PLAIN_PATH} $2 $3 | tail -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-filter_level_010-require_auth_no_auth_no_rdns_no_flags/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and no SMTP AUTH. The message should be
# rejected.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-filter_level_011-require_auth_auth_no_rdns_no_flags/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and SMTP AUTH. The message should be
# accepted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_DATA=`${SMTPAUTH_PLAIN_PATH} $2 $3 | tail -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-filter_level_012-require_auth_no_auth_no_rdns_flags/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, the missing rDNS filter and no SMTP AUTH. The message should be
# rejected.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-filter_level_013-require_auth_auth_no_rdns_flags/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, the missing rDNS filter and SMTP AUTH. The message should be
# accepted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_DATA=`${SMTPAUTH_PLAIN_PATH} $2 $3 | tail -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-filter_level_014-reject_all_no_auth_no_rdns_no_flags/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and no SMTP AUTH. The message should be
# rejected.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-filter_level_015-reject_all_auth_no_rdns_no_flags/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and SMTP AUTH. The message should be
# rejected.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_DATA=`${SMTPAUTH_PLAIN_PATH} $2 $3 | tail -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-filter_level_016-reject_all_no_auth_no_rdns_flags/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, the missing rDNS filter and no SMTP AUTH. The message should be
# rejected.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_001-graylist_level_always_skip_unactivated_domain/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will skip graylisting for domains that don't have
# proper graylist directories setup (unactivated).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_002-graylist_level_always_activated_domain/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist domains that are properly setup
# (activated).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_003-redelivery/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will allow a message to be delivered after
# graylisting has previously occurred.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_USERNAME=test-${TEST_NUM}.${RANDOM}.${RANDOM}
FROM_ADDRESS=${FROM_USERNAME}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_004-minimum_age_failure/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist redeliveries when the minimum time
# has not passed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_USERNAME=test-${TEST_NUM}.${RANDOM}.${RANDOM}
FROM_ADDRESS=${FROM_USERNAME}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_005-minimum_age_success/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will allow redeliveries when the minimum time
# has passed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_USERNAME=test-${TEST_NUM}.${RANDOM}.${RANDOM}
FROM_ADDRESS=${FROM_USERNAME}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_006-maximum_age_failure/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist deliveries when an old graylist
# entry exists but the maximum age has passed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_USERNAME=test-${TEST_NUM}.${RANDOM}.${RANDOM}
FROM_ADDRESS=${FROM_USERNAME}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_007-maximum_age_success/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will allow redeliveries when the maximum time
# has not passed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_USERNAME=test-${TEST_NUM}.${RANDOM}.${RANDOM}
FROM_ADDRESS=${FROM_USERNAME}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_010-graylist_level_only_activated_domain/run.sh
^
|
@@ -2,7 +2,7 @@
# proper graylist directories setup (activated) when the "no-graylist" option is
# used and the domains don't have entries in a "grayblacklist" file.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_015-graylist_level_always_multiple_directories/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist domains that are properly setup
# (activated) with multiple graylist directories.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_016-graylist_level_always_create_dir_unactivated_domain/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist domains that are not activated;
# no domain directory exists.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_017-graylist_level_always_create_dir_activated_domain/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist domains that are properly setup
# (activated).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_018-graylist_level_only_create_dir_unlisted_domain/run.sh
^
|
@@ -2,7 +2,7 @@
# graylist-level is "only-create-dir" and the domains don't have entries in an
# exception file.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_020-graylist_level_always_create_dir_multiple_graylist_dir_domain_exists/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist domains that have domain directories
# with multiple graylist directories.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_021-graylist_level_always_create_dir_multiple_graylist_dir_no_domain_folder/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist domains that have no domain directories
# with multiple graylist directories.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_022-graylist_level_none/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will skip graylisting when graylist-level is
# "none".
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_023-graylist_level_none_flags/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will skip graylisting when graylist-level is
# "none".
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_024-convert_structure_redelivery_success/run.sh
^
|
@@ -3,7 +3,7 @@
# stored in the 3.x directory structure, this test should move it to the 4.x
# directory structure.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_USERNAME=test-${TEST_NUM}.${RANDOM}.${RANDOM}
FROM_ADDRESS=${FROM_USERNAME}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_025-convert_structure_maximum_age_failure/run.sh
^
|
@@ -2,7 +2,7 @@
# entry exists but the maximum age has passed. The old entry is in 3.x
# directory structure, spamdyke should convert it to the 4.x structure.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_USERNAME=test-${TEST_NUM}.${RANDOM}.${RANDOM}
FROM_ADDRESS=${FROM_USERNAME}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_026-convert_structure_move_failure_delete_failure/run.sh
^
|
@@ -6,7 +6,7 @@
if [ "${UID}" == "0" ]
then
- export TCPREMOTEIP=0.0.0.0
+ export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_USERNAME=test-${TEST_NUM}.${RANDOM}.${RANDOM}
FROM_ADDRESS=${FROM_USERNAME}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_027-graylist_level_always_create_dir_nonlocal_domain/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist non-local domains that are not
# activated; no domain directory exists. It should not.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-graylist_029-graylist_level_always_create_dir_local_domain/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist local domains that are not
# activated; no domain directory exists.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_001-logged_mail_delivery/run.sh
^
|
@@ -1,7 +1,7 @@
# This test delivers a small test message and looks for the correct qmail status
# code and a log message in syslog.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_002-full_logging/run.sh
^
|
@@ -2,7 +2,7 @@
# code. spamdyke should log the entire SMTP conversation to a file. The log
# should also contain debugging statements.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
CHILD_CMD=`echo ${QMAIL_CMDLINE} | sed -e "s/ .*//"`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_003-logged_child_rejection/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to solicit a recipient rejection from qmail and checks
# syslog to see if spamdyke logged the rejection.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
TO_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_004-whitelisted_server/run.sh
^
|
@@ -1,9 +1,9 @@
# This test delivers a small test message from a whitelisted server and looks
# for the correct qmail status code and a log message in syslog.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo 0.0.0.0 > ${TMPDIR}/${TEST_NUM}-whitelist_ip.txt
+echo ${TESTSD_MISSING_RDNS_IP} > ${TMPDIR}/${TEST_NUM}-whitelist_ip.txt
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_005-patched_auth_login_passthrough/run.sh
^
|
@@ -2,7 +2,7 @@
# auth command to see if spamdyke will honor the qmail authentication and log
# the authenticated username.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 $3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_006-patched_auth_plain_passthrough/run.sh
^
|
@@ -2,7 +2,7 @@
# auth command to see if spamdyke will honor the qmail authentication and
# log the authenticated username.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_DATA=`${SMTPAUTH_PLAIN_PATH} $2 $3 | tail -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_007-patched_auth_crammd5_passthrough/run.sh
^
|
@@ -2,7 +2,7 @@
# auth command to see if spamdyke will honor the qmail authentication and log
# the authenticated username.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_008-message_size/run.sh
^
|
@@ -1,7 +1,7 @@
# This test delivers a small test message with a SIZE parameter and looks for
# the correct "From" address in syslog.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_009-stderr_logs/run.sh
^
|
@@ -1,7 +1,7 @@
# This test delivers a small test message and looks for the correct qmail status
# code and a log message on stderr.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_010-auth_success/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks for the correct log message after authenticating with AUTH
# LOGIN using the "exitvalue" command to simulate a successful login.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_011-auth_failure_bad_username_password/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# an invalid username or password.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_012-auth_failure_misuse/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# "misuse", which usually means no input or no additional command was given.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_013-auth_failure_vchkpw_unknown_user/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# unknown username or auth failure.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_014-auth_failure_vchkpw_env_user/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# an inability to set the USER environment variable.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_015-auth_failure_vchkpw_env_home/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# an inability to set the HOME environment variable.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_016-auth_failure_vchkpw_env_shell/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# an inability to set the SHELL environment variable.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_017-auth_failure_vchkpw_env_vpopuser/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# an inability to set the VPOPUSER environment variable.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_018-auth_failure_bad_input/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# bad/missing input on file descriptor 3.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_019-auth_failure_vchkpw_null_user/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# an empty username.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_020-auth_failure_vchkpw_null_password/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# an empty password.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_021-auth_failure_vchkpw_home_dir/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# a failure to create the virtual user's home directory.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_022-auth_failure_vchkpw_no_password/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# the virtual user having no password.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_023-auth_failure_vchkpw_bad_chars/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# an unparsable email address.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_024-auth_failure_vchkpw_unknown_system_user/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# a failed username lookup in the system password file.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_025-auth_failure_vchkpw_unknown_system_shadow/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# a failed username lookup in the system shadow file.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_026-auth_failure_vchkpw_system_user/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# a failed authentication attempt using the system password file.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_027-auth_failure_temporary_error/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# a temporary error.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_028-auth_failure_unknown_error/run.sh
^
|
@@ -2,7 +2,7 @@
# LOGIN using the "exitvalue" command to simulate an unsuccessful login due to
# an unknown error.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} ${TEST_NUM}-username ${TEST_NUM}-password | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_029-patched_tls_passthrough_logged/run.sh
^
|
@@ -1,7 +1,7 @@
# This test delivers a small test message while TLS passthrough is active and
# looks for a log message in syslog.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_030-full_logging_errors/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for errors to be logged to the full log as well as
# stderr.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
TO_DOMAIN=`echo $1 | sed -e "s/[^@]*@//" | awk '{ print tolower($1) }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-log_031-multiple_log_target/run.sh
^
|
@@ -1,7 +1,7 @@
# This test delivers a small test message and looks for the correct qmail status
# code and a log message in both syslog and stderr.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-protocol_001-simple_mail_delivery/run.sh
^
|
@@ -2,7 +2,7 @@
# code. spamdyke should not filter this at all -- it should actually start
# qmail and exit without scanning the transaction.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-protocol_002-max_recipients/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for a rejection when too many recipients are given.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-protocol_003-absolute_timeout/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the remote client takes too long to
# deliver the entire message (absolute timeout).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-protocol_004-idle_timeout/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the remote client takes too long to
# deliver the entire message (absolute timeout).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-protocol_005-policy_text/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for the policy text to be appended to the rejection message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-protocol_006-disconnection/run.sh
^
|
@@ -1,7 +1,7 @@
# This test delivers a small test message without waiting for qmail's responses
# and looks for the correct qmail status code in the logs.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-protocol_007-fix_bare_carriage_return/run.sh
^
|
@@ -2,7 +2,7 @@
# code. spamdyke should translate the bare carriage returns in the input into
# CRLF sequences.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-protocol_008-reject_earlytalkers/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the remote server sends data before
# the SMTP greeting banner is received (earlytalker).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-protocol_009-reject_missing_sender_mx/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for a rejection when the sender's domain has no MX record.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-protocol_010-unqualified_recipient/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the recipient address is not qualified
# (no domain name given).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-protocol_011-long_lines/run.sh
^
|
@@ -1,7 +1,7 @@
# This test delivers a test message with very long lines (>4K) and looks for
# the correct qmail status code.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-protocol_012-policy_text_dynamic_url/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for the policy text to be appended to the rejection message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-protocol_013-identical_sender_recipient/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the sender and recipient addresses are
# the same.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --reject-identical-sender-recipient ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_001-dnsrbl_with_txt/run.sh
^
|
@@ -1,22 +1,32 @@
# This test looks for a rejection because the incoming IP address is on a
-# DNS RBL that uses TXT records.
+# DNS RBL that uses TXT records. It checks the client response and the
+# reason code.
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.txt.dnsrbl TXT NORMAL Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.txt.dnsrbl TXT NORMAL 0 Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -x txt.dnsrbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -x txt.dnsrbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --dns-server-ip ${NAMESERVER_IP} -x txt.dnsrbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --dns-server-ip ${NAMESERVER_IP} -x txt.dnsrbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
-output=`grep "554 Test DNSRBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your IP address is listed in the RBL at txt.dnsrbl: Test DNSRBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: txt.dnsrbl" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_002-dnsrbl_without_txt/run.sh
^
|
@@ -1,22 +1,32 @@
# This test looks for a rejection because the incoming IP address is on a
-# DNS RBL that uses A records (not TXT).
+# DNS RBL that uses A records (not TXT). It checks the client response text
+# and the reason code.
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.a.dnsrbl A NORMAL 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.a.dnsrbl A NORMAL 0 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
export NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -x a.dnsrbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -x a.dnsrbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --dns-server-ip ${NAMESERVER_IP} -x a.dnsrbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --dns-server-ip ${NAMESERVER_IP} -x a.dnsrbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "554 Refused. Your IP address is listed in the RBL at a.dnsrbl" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: a.dnsrbl" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_003-rhsbl_sender_with_txt/run.sh
^
|
@@ -1,22 +1,32 @@
# This test looks for a rejection because the incoming sender address is on a
-# RHSBL that uses TXT records.
+# RHSBL that uses TXT records. It checks the client response text and the reason
+# code.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo "example.com.txt.rhsbl TXT NORMAL Test RHSBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.txt.rhsbl TXT NORMAL 0 Test RHSBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -X txt.rhsbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -X txt.rhsbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --dns-server-ip ${NAMESERVER_IP} -X txt.rhsbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --dns-server-ip ${NAMESERVER_IP} -X txt.rhsbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
-output=`grep "554 Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your domain name is listed in the RHSBL at txt.rhsbl: Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: txt.rhsbl" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_004-rhsbl_sender_without_txt/run.sh
^
|
@@ -1,22 +1,32 @@
# This test looks for a rejection because the incoming sender address is on a
-# RHSBL that uses A records.
+# RHSBL that uses A records. It checks the client response text and the reason
+# code.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo "example.com.a.rhsbl A NORMAL 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.a.rhsbl A NORMAL 0 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -X a.rhsbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -X a.rhsbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --dns-server-ip ${NAMESERVER_IP} -X a.rhsbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --dns-server-ip ${NAMESERVER_IP} -X a.rhsbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "554 Refused. Your domain name is listed in the RHSBL at a.rhsbl" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: a.rhsbl" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_005-rhsbl_origin_with_txt/run.sh
^
|
@@ -1,23 +1,33 @@
# This test looks for a rejection because the incoming rDNS name is on a
-# RHSBL that uses TXT records.
+# RHSBL that uses TXT records. It checks the client response text and the
+# reason code.
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.txt.rhsbl TXT NORMAL Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.txt.rhsbl TXT NORMAL 0 Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.bar
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -X txt.rhsbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -X txt.rhsbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --dns-server-ip ${NAMESERVER_IP} -X txt.rhsbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --dns-server-ip ${NAMESERVER_IP} -X txt.rhsbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
-output=`grep "554 Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your domain name is listed in the RHSBL at txt.rhsbl: Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: txt.rhsbl" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_006-rhsbl_origin_without_txt/run.sh
^
|
@@ -1,23 +1,33 @@
# This test looks for a rejection because the incoming sender address is on a
-# RHSBL that uses A records.
+# RHSBL that uses A records. It checks the client response text and the reason
+# code.
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.remote" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "foo.remote.rhsbl.a A NORMAL 127.0.0.1" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.remote" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "foo.remote.rhsbl.a A NORMAL 0 127.0.0.1" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -X rhsbl.a ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} -X rhsbl.a ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --dns-server-ip ${NAMESERVER_IP} -X rhsbl.a ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --dns-server-ip ${NAMESERVER_IP} -X rhsbl.a ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "554 Refused. Your domain name is listed in the RHSBL at rhsbl.a" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: rhsbl.a" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_007-dnsrbl_chained_with_txt/run.sh
^
|
@@ -4,39 +4,39 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.chained.txt CNAME NORMAL 1.44.33.22.11.chained.txt" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "1.44.33.22.11.chained.txt CNAME NORMAL 2.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "2.44.33.22.11.chained.txt CNAME NORMAL 3.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "3.44.33.22.11.chained.txt CNAME NORMAL 4.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "4.44.33.22.11.chained.txt CNAME NORMAL 5.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "5.44.33.22.11.chained.txt CNAME NORMAL 6.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "6.44.33.22.11.chained.txt CNAME NORMAL 7.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "7.44.33.22.11.chained.txt CNAME NORMAL 8.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "8.44.33.22.11.chained.txt CNAME NORMAL 9.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "9.44.33.22.11.chained.txt CNAME NORMAL 10.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "10.44.33.22.11.chained.txt CNAME NORMAL 11.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "11.44.33.22.11.chained.txt CNAME NORMAL 12.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "12.44.33.22.11.chained.txt CNAME NORMAL 13.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "13.44.33.22.11.chained.txt CNAME NORMAL 14.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "14.44.33.22.11.chained.txt CNAME NORMAL 15.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "15.44.33.22.11.chained.txt CNAME NORMAL 16.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "16.44.33.22.11.chained.txt CNAME NORMAL 17.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "17.44.33.22.11.chained.txt CNAME NORMAL 18.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "18.44.33.22.11.chained.txt CNAME NORMAL 19.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "19.44.33.22.11.chained.txt CNAME NORMAL 20.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "20.44.33.22.11.chained.txt CNAME NORMAL 21.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "21.44.33.22.11.chained.txt CNAME NORMAL 22.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "22.44.33.22.11.chained.txt CNAME NORMAL 23.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "23.44.33.22.11.chained.txt CNAME NORMAL 24.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "24.44.33.22.11.chained.txt CNAME NORMAL 25.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "25.44.33.22.11.chained.txt CNAME NORMAL 26.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "26.44.33.22.11.chained.txt CNAME NORMAL 27.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "27.44.33.22.11.chained.txt CNAME NORMAL 28.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "28.44.33.22.11.chained.txt CNAME NORMAL 29.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "29.44.33.22.11.chained.txt CNAME NORMAL 30.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "30.44.33.22.11.chained.txt CNAME NORMAL 31.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "31.44.33.22.11.chained.txt CNAME NORMAL 32.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "32.44.33.22.11.chained.txt TXT NORMAL Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.chained.txt CNAME NORMAL 0 1.44.33.22.11.chained.txt" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "1.44.33.22.11.chained.txt CNAME NORMAL 0 2.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "2.44.33.22.11.chained.txt CNAME NORMAL 0 3.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "3.44.33.22.11.chained.txt CNAME NORMAL 0 4.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "4.44.33.22.11.chained.txt CNAME NORMAL 0 5.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "5.44.33.22.11.chained.txt CNAME NORMAL 0 6.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "6.44.33.22.11.chained.txt CNAME NORMAL 0 7.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "7.44.33.22.11.chained.txt CNAME NORMAL 0 8.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "8.44.33.22.11.chained.txt CNAME NORMAL 0 9.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "9.44.33.22.11.chained.txt CNAME NORMAL 0 10.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "10.44.33.22.11.chained.txt CNAME NORMAL 0 11.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "11.44.33.22.11.chained.txt CNAME NORMAL 0 12.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "12.44.33.22.11.chained.txt CNAME NORMAL 0 13.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "13.44.33.22.11.chained.txt CNAME NORMAL 0 14.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "14.44.33.22.11.chained.txt CNAME NORMAL 0 15.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "15.44.33.22.11.chained.txt CNAME NORMAL 0 16.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "16.44.33.22.11.chained.txt CNAME NORMAL 0 17.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "17.44.33.22.11.chained.txt CNAME NORMAL 0 18.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "18.44.33.22.11.chained.txt CNAME NORMAL 0 19.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "19.44.33.22.11.chained.txt CNAME NORMAL 0 20.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "20.44.33.22.11.chained.txt CNAME NORMAL 0 21.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "21.44.33.22.11.chained.txt CNAME NORMAL 0 22.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "22.44.33.22.11.chained.txt CNAME NORMAL 0 23.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "23.44.33.22.11.chained.txt CNAME NORMAL 0 24.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "24.44.33.22.11.chained.txt CNAME NORMAL 0 25.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "25.44.33.22.11.chained.txt CNAME NORMAL 0 26.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "26.44.33.22.11.chained.txt CNAME NORMAL 0 27.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "27.44.33.22.11.chained.txt CNAME NORMAL 0 28.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "28.44.33.22.11.chained.txt CNAME NORMAL 0 29.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "29.44.33.22.11.chained.txt CNAME NORMAL 0 30.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "30.44.33.22.11.chained.txt CNAME NORMAL 0 31.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "31.44.33.22.11.chained.txt CNAME NORMAL 0 32.44.33.22.11.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "32.44.33.22.11.chained.txt TXT NORMAL 0 Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 180 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_008-dnsrbl_chained_without_txt/run.sh
^
|
@@ -4,39 +4,39 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.chained.a CNAME NORMAL 1.44.33.22.11.chained.a" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "1.44.33.22.11.chained.a CNAME NORMAL 2.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "2.44.33.22.11.chained.a CNAME NORMAL 3.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "3.44.33.22.11.chained.a CNAME NORMAL 4.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "4.44.33.22.11.chained.a CNAME NORMAL 5.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "5.44.33.22.11.chained.a CNAME NORMAL 6.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "6.44.33.22.11.chained.a CNAME NORMAL 7.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "7.44.33.22.11.chained.a CNAME NORMAL 8.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "8.44.33.22.11.chained.a CNAME NORMAL 9.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "9.44.33.22.11.chained.a CNAME NORMAL 10.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "10.44.33.22.11.chained.a CNAME NORMAL 11.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "11.44.33.22.11.chained.a CNAME NORMAL 12.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "12.44.33.22.11.chained.a CNAME NORMAL 13.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "13.44.33.22.11.chained.a CNAME NORMAL 14.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "14.44.33.22.11.chained.a CNAME NORMAL 15.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "15.44.33.22.11.chained.a CNAME NORMAL 16.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "16.44.33.22.11.chained.a CNAME NORMAL 17.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "17.44.33.22.11.chained.a CNAME NORMAL 18.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "18.44.33.22.11.chained.a CNAME NORMAL 19.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "19.44.33.22.11.chained.a CNAME NORMAL 20.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "20.44.33.22.11.chained.a CNAME NORMAL 21.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "21.44.33.22.11.chained.a CNAME NORMAL 22.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "22.44.33.22.11.chained.a CNAME NORMAL 23.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "23.44.33.22.11.chained.a CNAME NORMAL 24.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "24.44.33.22.11.chained.a CNAME NORMAL 25.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "25.44.33.22.11.chained.a CNAME NORMAL 26.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "26.44.33.22.11.chained.a CNAME NORMAL 27.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "27.44.33.22.11.chained.a CNAME NORMAL 28.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "28.44.33.22.11.chained.a CNAME NORMAL 29.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "29.44.33.22.11.chained.a CNAME NORMAL 30.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "30.44.33.22.11.chained.a CNAME NORMAL 31.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "31.44.33.22.11.chained.a CNAME NORMAL 32.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "32.44.33.22.11.chained.a TXT NORMAL Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.chained.a CNAME NORMAL 0 1.44.33.22.11.chained.a" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "1.44.33.22.11.chained.a CNAME NORMAL 0 2.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "2.44.33.22.11.chained.a CNAME NORMAL 0 3.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "3.44.33.22.11.chained.a CNAME NORMAL 0 4.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "4.44.33.22.11.chained.a CNAME NORMAL 0 5.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "5.44.33.22.11.chained.a CNAME NORMAL 0 6.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "6.44.33.22.11.chained.a CNAME NORMAL 0 7.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "7.44.33.22.11.chained.a CNAME NORMAL 0 8.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "8.44.33.22.11.chained.a CNAME NORMAL 0 9.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "9.44.33.22.11.chained.a CNAME NORMAL 0 10.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "10.44.33.22.11.chained.a CNAME NORMAL 0 11.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "11.44.33.22.11.chained.a CNAME NORMAL 0 12.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "12.44.33.22.11.chained.a CNAME NORMAL 0 13.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "13.44.33.22.11.chained.a CNAME NORMAL 0 14.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "14.44.33.22.11.chained.a CNAME NORMAL 0 15.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "15.44.33.22.11.chained.a CNAME NORMAL 0 16.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "16.44.33.22.11.chained.a CNAME NORMAL 0 17.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "17.44.33.22.11.chained.a CNAME NORMAL 0 18.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "18.44.33.22.11.chained.a CNAME NORMAL 0 19.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "19.44.33.22.11.chained.a CNAME NORMAL 0 20.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "20.44.33.22.11.chained.a CNAME NORMAL 0 21.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "21.44.33.22.11.chained.a CNAME NORMAL 0 22.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "22.44.33.22.11.chained.a CNAME NORMAL 0 23.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "23.44.33.22.11.chained.a CNAME NORMAL 0 24.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "24.44.33.22.11.chained.a CNAME NORMAL 0 25.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "25.44.33.22.11.chained.a CNAME NORMAL 0 26.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "26.44.33.22.11.chained.a CNAME NORMAL 0 27.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "27.44.33.22.11.chained.a CNAME NORMAL 0 28.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "28.44.33.22.11.chained.a CNAME NORMAL 0 29.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "29.44.33.22.11.chained.a CNAME NORMAL 0 30.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "30.44.33.22.11.chained.a CNAME NORMAL 0 31.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "31.44.33.22.11.chained.a CNAME NORMAL 0 32.44.33.22.11.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "32.44.33.22.11.chained.a TXT NORMAL 0 Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 180 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_009-dnsrbl_circular/run.sh
^
|
@@ -3,8 +3,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.circular.dnsrbl CNAME NORMAL 1.44.33.22.11.circular.dnsrbl" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "1.44.33.22.11.circular.dnsrbl CNAME NORMAL 44.33.22.11.circular.dnsrbl" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.circular.dnsrbl CNAME NORMAL 0 1.44.33.22.11.circular.dnsrbl" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "1.44.33.22.11.circular.dnsrbl CNAME NORMAL 0 44.33.22.11.circular.dnsrbl" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_010-rhsbl_sender_chained_with_txt/run.sh
^
|
@@ -2,41 +2,41 @@
# on a RHSBL that uses TXT records but the records are chained with CNAMEs and
# exceed the lookup limit.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo "example.com.chained.txt CNAME NORMAL 1.example.com.chained.txt" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "1.example.com.chained.txt CNAME NORMAL 2.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "2.example.com.chained.txt CNAME NORMAL 3.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "3.example.com.chained.txt CNAME NORMAL 4.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "4.example.com.chained.txt CNAME NORMAL 5.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "5.example.com.chained.txt CNAME NORMAL 6.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "6.example.com.chained.txt CNAME NORMAL 7.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "7.example.com.chained.txt CNAME NORMAL 8.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "8.example.com.chained.txt CNAME NORMAL 9.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "9.example.com.chained.txt CNAME NORMAL 10.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "10.example.com.chained.txt CNAME NORMAL 11.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "11.example.com.chained.txt CNAME NORMAL 12.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "12.example.com.chained.txt CNAME NORMAL 13.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "13.example.com.chained.txt CNAME NORMAL 14.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "14.example.com.chained.txt CNAME NORMAL 15.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "15.example.com.chained.txt CNAME NORMAL 16.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "16.example.com.chained.txt CNAME NORMAL 17.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "17.example.com.chained.txt CNAME NORMAL 18.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "18.example.com.chained.txt CNAME NORMAL 19.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "19.example.com.chained.txt CNAME NORMAL 20.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "20.example.com.chained.txt CNAME NORMAL 21.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "21.example.com.chained.txt CNAME NORMAL 22.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "22.example.com.chained.txt CNAME NORMAL 23.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "23.example.com.chained.txt CNAME NORMAL 24.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "24.example.com.chained.txt CNAME NORMAL 25.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "25.example.com.chained.txt CNAME NORMAL 26.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "26.example.com.chained.txt CNAME NORMAL 27.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "27.example.com.chained.txt CNAME NORMAL 28.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "28.example.com.chained.txt CNAME NORMAL 29.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "29.example.com.chained.txt CNAME NORMAL 30.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "30.example.com.chained.txt CNAME NORMAL 31.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "31.example.com.chained.txt CNAME NORMAL 32.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "32.example.com.chained.txt TXT NORMAL Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.chained.txt CNAME NORMAL 0 1.example.com.chained.txt" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "1.example.com.chained.txt CNAME NORMAL 0 2.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "2.example.com.chained.txt CNAME NORMAL 0 3.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "3.example.com.chained.txt CNAME NORMAL 0 4.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "4.example.com.chained.txt CNAME NORMAL 0 5.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "5.example.com.chained.txt CNAME NORMAL 0 6.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "6.example.com.chained.txt CNAME NORMAL 0 7.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "7.example.com.chained.txt CNAME NORMAL 0 8.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "8.example.com.chained.txt CNAME NORMAL 0 9.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "9.example.com.chained.txt CNAME NORMAL 0 10.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "10.example.com.chained.txt CNAME NORMAL 0 11.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "11.example.com.chained.txt CNAME NORMAL 0 12.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "12.example.com.chained.txt CNAME NORMAL 0 13.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "13.example.com.chained.txt CNAME NORMAL 0 14.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "14.example.com.chained.txt CNAME NORMAL 0 15.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "15.example.com.chained.txt CNAME NORMAL 0 16.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "16.example.com.chained.txt CNAME NORMAL 0 17.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "17.example.com.chained.txt CNAME NORMAL 0 18.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "18.example.com.chained.txt CNAME NORMAL 0 19.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "19.example.com.chained.txt CNAME NORMAL 0 20.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "20.example.com.chained.txt CNAME NORMAL 0 21.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "21.example.com.chained.txt CNAME NORMAL 0 22.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "22.example.com.chained.txt CNAME NORMAL 0 23.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "23.example.com.chained.txt CNAME NORMAL 0 24.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "24.example.com.chained.txt CNAME NORMAL 0 25.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "25.example.com.chained.txt CNAME NORMAL 0 26.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "26.example.com.chained.txt CNAME NORMAL 0 27.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "27.example.com.chained.txt CNAME NORMAL 0 28.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "28.example.com.chained.txt CNAME NORMAL 0 29.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "29.example.com.chained.txt CNAME NORMAL 0 30.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "30.example.com.chained.txt CNAME NORMAL 0 31.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "31.example.com.chained.txt CNAME NORMAL 0 32.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "32.example.com.chained.txt TXT NORMAL 0 Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 180 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_011-rhsbl_sender_chained_without_txt/run.sh
^
|
@@ -2,41 +2,41 @@
# on a RHSBL that uses A records but the records are chained with CNAMEs and
# exceed the lookup limit.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo "example.com.chained.a CNAME NORMAL 1.example.com.chained.a" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "1.example.com.chained.a CNAME NORMAL 2.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "2.example.com.chained.a CNAME NORMAL 3.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "3.example.com.chained.a CNAME NORMAL 4.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "4.example.com.chained.a CNAME NORMAL 5.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "5.example.com.chained.a CNAME NORMAL 6.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "6.example.com.chained.a CNAME NORMAL 7.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "7.example.com.chained.a CNAME NORMAL 8.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "8.example.com.chained.a CNAME NORMAL 9.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "9.example.com.chained.a CNAME NORMAL 10.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "10.example.com.chained.a CNAME NORMAL 11.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "11.example.com.chained.a CNAME NORMAL 12.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "12.example.com.chained.a CNAME NORMAL 13.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "13.example.com.chained.a CNAME NORMAL 14.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "14.example.com.chained.a CNAME NORMAL 15.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "15.example.com.chained.a CNAME NORMAL 16.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "16.example.com.chained.a CNAME NORMAL 17.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "17.example.com.chained.a CNAME NORMAL 18.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "18.example.com.chained.a CNAME NORMAL 19.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "19.example.com.chained.a CNAME NORMAL 20.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "20.example.com.chained.a CNAME NORMAL 21.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "21.example.com.chained.a CNAME NORMAL 22.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "22.example.com.chained.a CNAME NORMAL 23.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "23.example.com.chained.a CNAME NORMAL 24.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "24.example.com.chained.a CNAME NORMAL 25.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "25.example.com.chained.a CNAME NORMAL 26.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "26.example.com.chained.a CNAME NORMAL 27.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "27.example.com.chained.a CNAME NORMAL 28.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "28.example.com.chained.a CNAME NORMAL 29.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "29.example.com.chained.a CNAME NORMAL 30.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "30.example.com.chained.a CNAME NORMAL 31.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "31.example.com.chained.a CNAME NORMAL 32.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "32.example.com.chained.a A NORMAL 127.0.0.1" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.chained.a CNAME NORMAL 0 1.example.com.chained.a" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "1.example.com.chained.a CNAME NORMAL 0 2.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "2.example.com.chained.a CNAME NORMAL 0 3.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "3.example.com.chained.a CNAME NORMAL 0 4.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "4.example.com.chained.a CNAME NORMAL 0 5.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "5.example.com.chained.a CNAME NORMAL 0 6.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "6.example.com.chained.a CNAME NORMAL 0 7.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "7.example.com.chained.a CNAME NORMAL 0 8.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "8.example.com.chained.a CNAME NORMAL 0 9.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "9.example.com.chained.a CNAME NORMAL 0 10.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "10.example.com.chained.a CNAME NORMAL 0 11.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "11.example.com.chained.a CNAME NORMAL 0 12.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "12.example.com.chained.a CNAME NORMAL 0 13.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "13.example.com.chained.a CNAME NORMAL 0 14.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "14.example.com.chained.a CNAME NORMAL 0 15.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "15.example.com.chained.a CNAME NORMAL 0 16.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "16.example.com.chained.a CNAME NORMAL 0 17.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "17.example.com.chained.a CNAME NORMAL 0 18.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "18.example.com.chained.a CNAME NORMAL 0 19.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "19.example.com.chained.a CNAME NORMAL 0 20.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "20.example.com.chained.a CNAME NORMAL 0 21.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "21.example.com.chained.a CNAME NORMAL 0 22.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "22.example.com.chained.a CNAME NORMAL 0 23.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "23.example.com.chained.a CNAME NORMAL 0 24.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "24.example.com.chained.a CNAME NORMAL 0 25.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "25.example.com.chained.a CNAME NORMAL 0 26.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "26.example.com.chained.a CNAME NORMAL 0 27.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "27.example.com.chained.a CNAME NORMAL 0 28.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "28.example.com.chained.a CNAME NORMAL 0 29.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "29.example.com.chained.a CNAME NORMAL 0 30.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "30.example.com.chained.a CNAME NORMAL 0 31.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "31.example.com.chained.a CNAME NORMAL 0 32.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "32.example.com.chained.a A NORMAL 0 127.0.0.1" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 180 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_012-rhsbl_sender_circular/run.sh
^
|
@@ -1,10 +1,10 @@
# This test looks for a success message because the incoming sender address is
# on a RHSBL but the records are chained with CNAMEs and circular.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo "example.com.circular CNAME NORMAL 1.example.com.circular" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "1.example.com.circular CNAME NORMAL example.com.circular" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.circular CNAME NORMAL 0 1.example.com.circular" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "1.example.com.circular CNAME NORMAL 0 example.com.circular" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_013-rhsbl_origin_chained_with_txt/run.sh
^
|
@@ -4,40 +4,40 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.chained.txt CNAME NORMAL 1.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "1.example.com.chained.txt CNAME NORMAL 2.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "2.example.com.chained.txt CNAME NORMAL 3.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "3.example.com.chained.txt CNAME NORMAL 4.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "4.example.com.chained.txt CNAME NORMAL 5.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "5.example.com.chained.txt CNAME NORMAL 6.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "6.example.com.chained.txt CNAME NORMAL 7.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "7.example.com.chained.txt CNAME NORMAL 8.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "8.example.com.chained.txt CNAME NORMAL 9.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "9.example.com.chained.txt CNAME NORMAL 10.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "10.example.com.chained.txt CNAME NORMAL 11.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "11.example.com.chained.txt CNAME NORMAL 12.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "12.example.com.chained.txt CNAME NORMAL 13.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "13.example.com.chained.txt CNAME NORMAL 14.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "14.example.com.chained.txt CNAME NORMAL 15.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "15.example.com.chained.txt CNAME NORMAL 16.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "16.example.com.chained.txt CNAME NORMAL 17.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "17.example.com.chained.txt CNAME NORMAL 18.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "18.example.com.chained.txt CNAME NORMAL 19.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "19.example.com.chained.txt CNAME NORMAL 20.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "20.example.com.chained.txt CNAME NORMAL 21.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "21.example.com.chained.txt CNAME NORMAL 22.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "22.example.com.chained.txt CNAME NORMAL 23.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "23.example.com.chained.txt CNAME NORMAL 24.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "24.example.com.chained.txt CNAME NORMAL 25.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "25.example.com.chained.txt CNAME NORMAL 26.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "26.example.com.chained.txt CNAME NORMAL 27.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "27.example.com.chained.txt CNAME NORMAL 28.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "28.example.com.chained.txt CNAME NORMAL 29.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "29.example.com.chained.txt CNAME NORMAL 30.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "30.example.com.chained.txt CNAME NORMAL 31.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "31.example.com.chained.txt CNAME NORMAL 32.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "32.example.com.chained.txt TXT NORMAL Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.chained.txt CNAME NORMAL 0 1.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "1.example.com.chained.txt CNAME NORMAL 0 2.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "2.example.com.chained.txt CNAME NORMAL 0 3.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "3.example.com.chained.txt CNAME NORMAL 0 4.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "4.example.com.chained.txt CNAME NORMAL 0 5.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "5.example.com.chained.txt CNAME NORMAL 0 6.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "6.example.com.chained.txt CNAME NORMAL 0 7.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "7.example.com.chained.txt CNAME NORMAL 0 8.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "8.example.com.chained.txt CNAME NORMAL 0 9.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "9.example.com.chained.txt CNAME NORMAL 0 10.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "10.example.com.chained.txt CNAME NORMAL 0 11.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "11.example.com.chained.txt CNAME NORMAL 0 12.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "12.example.com.chained.txt CNAME NORMAL 0 13.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "13.example.com.chained.txt CNAME NORMAL 0 14.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "14.example.com.chained.txt CNAME NORMAL 0 15.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "15.example.com.chained.txt CNAME NORMAL 0 16.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "16.example.com.chained.txt CNAME NORMAL 0 17.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "17.example.com.chained.txt CNAME NORMAL 0 18.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "18.example.com.chained.txt CNAME NORMAL 0 19.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "19.example.com.chained.txt CNAME NORMAL 0 20.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "20.example.com.chained.txt CNAME NORMAL 0 21.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "21.example.com.chained.txt CNAME NORMAL 0 22.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "22.example.com.chained.txt CNAME NORMAL 0 23.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "23.example.com.chained.txt CNAME NORMAL 0 24.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "24.example.com.chained.txt CNAME NORMAL 0 25.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "25.example.com.chained.txt CNAME NORMAL 0 26.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "26.example.com.chained.txt CNAME NORMAL 0 27.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "27.example.com.chained.txt CNAME NORMAL 0 28.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "28.example.com.chained.txt CNAME NORMAL 0 29.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "29.example.com.chained.txt CNAME NORMAL 0 30.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "30.example.com.chained.txt CNAME NORMAL 0 31.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "31.example.com.chained.txt CNAME NORMAL 0 32.example.com.chained.txt" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "32.example.com.chained.txt TXT NORMAL 0 Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 180 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_014-rhsbl_origin_chained_without_txt/run.sh
^
|
@@ -4,40 +4,40 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.chained.a CNAME NORMAL 1.example.com.chained.a" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "1.example.com.chained.a CNAME NORMAL 2.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "2.example.com.chained.a CNAME NORMAL 3.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "3.example.com.chained.a CNAME NORMAL 4.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "4.example.com.chained.a CNAME NORMAL 5.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "5.example.com.chained.a CNAME NORMAL 6.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "6.example.com.chained.a CNAME NORMAL 7.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "7.example.com.chained.a CNAME NORMAL 8.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "8.example.com.chained.a CNAME NORMAL 9.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "9.example.com.chained.a CNAME NORMAL 10.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "10.example.com.chained.a CNAME NORMAL 11.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "11.example.com.chained.a CNAME NORMAL 12.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "12.example.com.chained.a CNAME NORMAL 13.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "13.example.com.chained.a CNAME NORMAL 14.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "14.example.com.chained.a CNAME NORMAL 15.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "15.example.com.chained.a CNAME NORMAL 16.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "16.example.com.chained.a CNAME NORMAL 17.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "17.example.com.chained.a CNAME NORMAL 18.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "18.example.com.chained.a CNAME NORMAL 19.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "19.example.com.chained.a CNAME NORMAL 20.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "20.example.com.chained.a CNAME NORMAL 21.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "21.example.com.chained.a CNAME NORMAL 22.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "22.example.com.chained.a CNAME NORMAL 23.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "23.example.com.chained.a CNAME NORMAL 24.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "24.example.com.chained.a CNAME NORMAL 25.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "25.example.com.chained.a CNAME NORMAL 26.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "26.example.com.chained.a CNAME NORMAL 27.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "27.example.com.chained.a CNAME NORMAL 28.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "28.example.com.chained.a CNAME NORMAL 29.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "29.example.com.chained.a CNAME NORMAL 30.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "30.example.com.chained.a CNAME NORMAL 31.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "31.example.com.chained.a CNAME NORMAL 32.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "32.example.com.chained.a A NORMAL 127.0.0.1" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.chained.a CNAME NORMAL 0 1.example.com.chained.a" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "1.example.com.chained.a CNAME NORMAL 0 2.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "2.example.com.chained.a CNAME NORMAL 0 3.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "3.example.com.chained.a CNAME NORMAL 0 4.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "4.example.com.chained.a CNAME NORMAL 0 5.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "5.example.com.chained.a CNAME NORMAL 0 6.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "6.example.com.chained.a CNAME NORMAL 0 7.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "7.example.com.chained.a CNAME NORMAL 0 8.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "8.example.com.chained.a CNAME NORMAL 0 9.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "9.example.com.chained.a CNAME NORMAL 0 10.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "10.example.com.chained.a CNAME NORMAL 0 11.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "11.example.com.chained.a CNAME NORMAL 0 12.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "12.example.com.chained.a CNAME NORMAL 0 13.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "13.example.com.chained.a CNAME NORMAL 0 14.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "14.example.com.chained.a CNAME NORMAL 0 15.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "15.example.com.chained.a CNAME NORMAL 0 16.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "16.example.com.chained.a CNAME NORMAL 0 17.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "17.example.com.chained.a CNAME NORMAL 0 18.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "18.example.com.chained.a CNAME NORMAL 0 19.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "19.example.com.chained.a CNAME NORMAL 0 20.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "20.example.com.chained.a CNAME NORMAL 0 21.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "21.example.com.chained.a CNAME NORMAL 0 22.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "22.example.com.chained.a CNAME NORMAL 0 23.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "23.example.com.chained.a CNAME NORMAL 0 24.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "24.example.com.chained.a CNAME NORMAL 0 25.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "25.example.com.chained.a CNAME NORMAL 0 26.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "26.example.com.chained.a CNAME NORMAL 0 27.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "27.example.com.chained.a CNAME NORMAL 0 28.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "28.example.com.chained.a CNAME NORMAL 0 29.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "29.example.com.chained.a CNAME NORMAL 0 30.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "30.example.com.chained.a CNAME NORMAL 0 31.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "31.example.com.chained.a CNAME NORMAL 0 32.example.com.chained.a" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "32.example.com.chained.a A NORMAL 0 127.0.0.1" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 180 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_016-dnsrbl_from_file/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.txt.dnsrbl TXT NORMAL Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.txt.dnsrbl TXT NORMAL 0 Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
@@ -15,7 +15,7 @@
echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-blacklist-file ${TMPDIR}/${TEST_NUM}-rbl.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --dns-blacklist-file ${TMPDIR}/${TEST_NUM}-rbl.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
-output=`grep "554 Test DNSRBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your IP address is listed in the RBL at txt.dnsrbl: Test DNSRBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
outcome="success"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rbl_017-rhsbl_from_file/run.sh
^
|
@@ -3,8 +3,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.txt.rhsbl TXT NORMAL Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.txt.rhsbl TXT NORMAL 0 Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
@@ -16,7 +16,7 @@
echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --rhs-blacklist-file ${TMPDIR}/${TEST_NUM}-rhsbl.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --dns-server-ip ${NAMESERVER_IP} --rhs-blacklist-file ${TMPDIR}/${TEST_NUM}-rhsbl.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
-output=`grep "554 Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your domain name is listed in the RHSBL at txt.rhsbl: Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
outcome="success"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rdns_001-no_rdns/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the incoming IP address doesn't have
# an rDNS name.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rdns_004-ip_in_rdns_single_keyword/run.sh
^
|
@@ -1,5 +1,5 @@
# This test looks for a rejection because the incoming IP address' rDNS name
-# contains the IP address and a banned keyword
+# contains the IP address and a banned keyword and checks the reason is correct.
export TCPREMOTEIP=$TESTSD_IP_IN_RDNS_KEYWORD_IP
echo ${TESTSD_IP_IN_RDNS_KEYWORD} > ${TMPDIR}/${TEST_NUM}-rdns_keywords.txt
@@ -7,13 +7,22 @@
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -k ${TMPDIR}/${TEST_NUM}-rdns_keywords.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -k ${TMPDIR}/${TEST_NUM}-rdns_keywords.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr -k ${TMPDIR}/${TEST_NUM}-rdns_keywords.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr -k ${TMPDIR}/${TEST_NUM}-rdns_keywords.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "554 Refused. Your reverse DNS entry contains your IP address and a banned keyword." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: ${TMPDIR}/${TEST_NUM}-rdns_keywords.txt:1" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rdns_007-ip_in_rdns_single_keyword_entry/run.sh
^
|
@@ -1,18 +1,28 @@
# This test looks for a rejection because the incoming IP address' rDNS name
-# contains the IP address and a banned keyword
+# contains the IP address and a banned keyword and checks the reason is correct.
export TCPREMOTEIP=$TESTSD_IP_IN_RDNS_KEYWORD_IP
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
+CONVERTED_KEYWORD=`echo ${TESTSD_IP_IN_RDNS_KEYWORD} | sed -e "s/ /_/g"`
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --ip-in-rdns-keyword-blacklist-entry "${TESTSD_IP_IN_RDNS_KEYWORD}" ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --ip-in-rdns-keyword-blacklist-entry "${TESTSD_IP_IN_RDNS_KEYWORD}" ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --ip-in-rdns-keyword-blacklist-entry "${TESTSD_IP_IN_RDNS_KEYWORD}" ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --ip-in-rdns-keyword-blacklist-entry "${TESTSD_IP_IN_RDNS_KEYWORD}" ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "554 Refused. Your reverse DNS entry contains your IP address and a banned keyword." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: ${CONVERTED_KEYWORD}" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_002-mail_from_no_delimiter_multiple_spaces/run.sh
^
|
@@ -2,15 +2,15 @@
# The MAIL FROM command is sent without the sender's email address being
# correctly delimited by <> characters and with multiple spaces.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
touch ${TMPDIR}/${TEST_NUM}-local_domains.txt
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 421 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx --local-domains-file ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 421 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx --local-domains-file ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 90 -r 421 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx --local-domains-file ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
+${SENDRECV_PATH} -t 90 -r 421 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx --local-domains-file ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
output=`grep "421 Refused. The domain of your sender address has no mail exchanger (MX)." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_003-crossed_timeouts/run.sh
^
|
@@ -3,7 +3,7 @@
# not set, however, so this makes sure the idle timeout is setting the
# correct variable.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_004-improper_helo_rejection/run.sh
^
|
@@ -2,15 +2,15 @@
# even though it's at the wrong place. spamdyke should respond with a 250
# and the rejection message anyway.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
touch ${TMPDIR}/${TEST_NUM}-local_domains.txt
cat input.txt | sed -e "s/TEST_NUM/${TEST_NUM}/g" -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 90 -r 221 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
+${SENDRECV_PATH} -t 90 -r 221 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
output=`grep "250 Refused. The domain of your sender address has no mail exchanger (MX)." ${TMPDIR}/${TEST_NUM}-output.txt | wc -l | awk '{ print $1 }'`
if [ "${output}" == "2" ]
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_005-improper_ehlo_rejection/run.sh
^
|
@@ -2,15 +2,15 @@
# even though it's at the wrong place. spamdyke should respond with a 250
# and the rejection message anyway.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
touch ${TMPDIR}/${TEST_NUM}-local_domains.txt
cat input.txt | sed -e "s/TEST_NUM/${TEST_NUM}/g" -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 90 -r 221 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
+${SENDRECV_PATH} -t 90 -r 221 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
output=`grep "250 Refused. The domain of your sender address has no mail exchanger (MX)." ${TMPDIR}/${TEST_NUM}-output.txt | wc -l | awk '{ print $1 }'`
if [ "${output}" == "2" ]
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_006-improper_starttls_rejection/run.sh
^
|
@@ -2,15 +2,15 @@
# even though it's at the wrong place. spamdyke should respond with a 421
# and the rejection message anyway.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
touch ${TMPDIR}/${TEST_NUM}-local_domains.txt
cat input.txt | sed -e "s/TEST_NUM/${TEST_NUM}/g" -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 90 -r 221 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
+${SENDRECV_PATH} -t 90 -r 221 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
output=`grep "421 Refused. The domain of your sender address has no mail exchanger (MX)." ${TMPDIR}/${TEST_NUM}-output.txt | awk '{ print $1 }'`
if [ ! -z "${output}" ]
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_007-auth_bypass_relaying_empty_access/run.sh
^
|
@@ -2,7 +2,7 @@
# It checks to make sure the relaying filter is bypassed, even when the access
# file is empty.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
touch ${TMPDIR}/${TEST_NUM}-access.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_008-unlogged_delivery/run.sh
^
|
@@ -1,15 +1,15 @@
# This test delivers a small test message all in one burst, without waiting
# for response codes and looks for a log message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TEST_NUM/${TEST_NUM}/g" -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -d 0 -w 0 -- ${SPAMDYKE_PATH} -linfo --log-target stderr ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
-${SENDRECV_PATH} -d 0 -w 0 -- ${SPAMDYKE_PATH} -linfo --log-target stderr ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
+echo "${SENDRECV_PATH} -t 90 -d 0 -w 0 -r 221 -- ${SPAMDYKE_PATH} -linfo --log-target stderr ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 90 -d 0 -w 0 -r 221 -- ${SPAMDYKE_PATH} -linfo --log-target stderr ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
-output=`grep -i "ALLOWED from: ${FROM_ADDRESS} to: $1 origin_ip: 0.0.0.0 origin_rdns: (unknown) auth: (unknown)" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep -i "ALLOWED from: ${FROM_ADDRESS} to: $1 origin_ip: ${TESTSD_MISSING_RDNS_IP} origin_rdns: (unknown) auth: (unknown)" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
outcome="success"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_009-bursted_message_data/run.sh
^
|
@@ -44,8 +44,8 @@
done
cat input_6.txt >> ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -b 1024 -w 1 -t 30 -r 221 -- ${SPAMDYKE_PATH} -L ${TMPDIR}/${TEST_NUM}-logs --tls-certificate-file ${CERTDIR}/combined_no_passphrase/server.pem ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -b 1024 -w 1 -t 30 -r 221 -- ${SPAMDYKE_PATH} -L ${TMPDIR}/${TEST_NUM}-logs --tls-certificate-file ${CERTDIR}/combined_no_passphrase/server.pem ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -b 1024 -w 1 -t 90 -r 221 -- ${SPAMDYKE_PATH} -L ${TMPDIR}/${TEST_NUM}-logs --tls-certificate-file ${CERTDIR}/combined_no_passphrase/server.pem ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
+${SENDRECV_PATH} -b 1024 -w 1 -t 90 -r 221 -- ${SPAMDYKE_PATH} -L ${TMPDIR}/${TEST_NUM}-logs --tls-certificate-file ${CERTDIR}/combined_no_passphrase/server.pem ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
output=`grep -E "250 ok [0-9]* qp [0-9]*" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_010-dnsrbl_long_text/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=88.229.90.167
-echo "167.90.229.88.txt.dnsrbl TXT NORMAL Latest spam received via gollum.manitu.net at Wed, 02 Jan 2008 11:58:35 +0100, see http://www.dnsbl.manitu.net/lookup.php?value=88.229.90.167" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "167.90.229.88.txt.dnsrbl TXT NORMAL 0 Latest spam received via gollum.manitu.net at Wed, 02 Jan 2008 11:58:35 +0100, see http://www.dnsbl.manitu.net/lookup.php?value=88.229.90.167" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
@@ -11,7 +11,7 @@
echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -lexcessive --dns-server-ip ${NAMESERVER_IP} -x txt.dnsrbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -lexcessive --dns-server-ip ${NAMESERVER_IP} -x txt.dnsrbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
-output=`grep "554 Latest spam received via gollum.manitu.net" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your IP address is listed in the RBL at txt.dnsrbl: Latest spam received via gollum.manitu.net at Wed, 02 Jan 2008 11:58:35 +0100, see http://www.dnsbl.manitu.net/lookup.php?value=88.229.90.167" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
outcome="success"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_012-closing_socket_repeated_data/run.sh
^
|
@@ -9,7 +9,7 @@
i=0
while [ ${i} -lt 1000 ]
do
- echo -n "00000000000000000000000000000000000000000000000000" >> ${TMPDIR}/${TEST_NUM}-input.txt
+ echo "00000000000000000000000000000000000000000000000000" >> ${TMPDIR}/${TEST_NUM}-input.txt
i=$[${i}+1]
done
echo "00000000000000000000000000000000000000000000000000" >> ${TMPDIR}/${TEST_NUM}-input.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_014-blacklist_wildcard_failure/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for success when the blacklisted domain name does
# not quite match the sender's domain name.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_018-recipient_whitelisted_recipient_blacklisted/run.sh
^
|
@@ -2,7 +2,7 @@
# whitelisted and the other is blacklisted. The first should be accepted, the
# second should be blocked.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
TO_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_019-recipient_whitelist_allows_only_one/run.sh
^
|
@@ -2,7 +2,7 @@
# whitelisted and the other is not. The first should be accepted, the
# second should be graylisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
TO_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_020-empty_sender_size/run.sh
^
|
@@ -1,7 +1,7 @@
# This test delivers a small test message from an empty sender with a SIZE
# parameter and looks to see if spamdyke correctly finds an empty address.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
cat input.txt | sed -e "s/TEST_NUM/${TEST_NUM}/g" -e "s/TARGET_EMAIL/$1/g" > ${TMPDIR}/${TEST_NUM}-input.txt
echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} -linfo --log-target stderr ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_021-config_file_earlytalker_config_dir/run.sh
^
|
@@ -1,7 +1,7 @@
# This test delivers a small test message from an empty sender with a SIZE
# parameter and looks to see if spamdyke correctly finds an empty address.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_022-multiple_string_array_error/run.sh
^
|
@@ -3,7 +3,7 @@
# should not return an internal error that prevents the empty rDNS test from
# running.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_023-graylist_convert_null_sender/run.sh
^
|
@@ -4,7 +4,7 @@
# directory structure. The sender address is empty, so the old entry is
# "_none" and the new one should be "_none"/"_none".
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_USERNAME=test-${TEST_NUM}.${RANDOM}.${RANDOM}
FROM_ADDRESS=${FROM_USERNAME}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_024-graylist_infinite_convert_null_sender/run.sh
^
|
@@ -3,7 +3,7 @@
# stored in the 4.x directory structure, this test should not move it.
# The sender address is empty, so the entry is "_none"/"_none".
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_USERNAME=test-${TEST_NUM}.${RANDOM}.${RANDOM}
FROM_ADDRESS=${FROM_USERNAME}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_026-rhsbl_filter_message_corruption/run.sh
^
|
@@ -3,8 +3,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.txt.rhsbl TXT NORMAL Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.txt.rhsbl TXT NORMAL 0 Test RHSBL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
@@ -14,7 +14,7 @@
echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --log-target stderr -lverbose --dns-server-ip ${NAMESERVER_IP} -X nonexistent1.rhsbl -X nonexistent2.rhsbl -X nonexistent3.rhsbl -X txt.rhsbl -X nonexistent4.rhsbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --log-target stderr -lverbose --dns-server-ip ${NAMESERVER_IP} -X nonexistent1.rhsbl -X nonexistent2.rhsbl -X nonexistent3.rhsbl -X txt.rhsbl -X nonexistent4.rhsbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
-output=`grep "554 Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your domain name is listed in the RHSBL at txt.rhsbl: Test RHSBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
output=`grep "FILTER_RHSBL_MATCH domain: foo.example.com rhsbl: txt.rhsbl" ${TMPDIR}/${TEST_NUM}-output.txt`
|
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_027-null_characters_in_message_data/input.txt
^
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_027-null_characters_in_message_data/run.sh
^
|
@@ -1,14 +1,15 @@
# This test delivers a small test message and looks for the correct qmail status
# code. spamdyke should not filter this at all -- it should actually start
-# qmail and exit without scanning the transaction.
+# qmail and exit without scanning the transaction. The message data contains
+# NULL characters, which spamdyke should pass through to qmail unmolested.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TEST_NUM/${TEST_NUM}/g" -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} -T 10 ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} -T 10 ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 60 -r 221 -- ${SPAMDYKE_PATH} -T 10 ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
+${SENDRECV_PATH} -t 60 -r 221 -- ${SPAMDYKE_PATH} -T 10 ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
output=`grep -E "250 ok [0-9]* qp [0-9]*" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_028-auth_level_always_continuation_character/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks to see if spamdyke hides the AUTH advertisement from a patched
# qmail and correctly replaces it with its own AUTH advertisement.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
cp input.txt ${TMPDIR}/${TEST_NUM}-input.txt
echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --smtp-auth-level always --smtp-auth-command \"${AUTH_CMDLINE}\" ${SMTPDUMMY_PATH} -a < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_029-graylist_invalid_sender/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will correctly create graylist folders and files
# when the sender address is invalid but contains no additional parameters.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=@foo.com
TO_USERNAME=test-${TEST_NUM}.${RANDOM}.${RANDOM}
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_030-graylist_invalid_sender_with_size/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will correctly create graylist folders and files
# when the sender address is invalid and contains an additional SIZE parameter.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=@
TO_USERNAME=test-${TEST_NUM}.${RANDOM}.${RANDOM}
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_031-graylist_invalid_sender_no_domain/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will correctly create graylist folders and files
# when the sender address is invalid and contains an additional SIZE parameter.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=sender@
TO_USERNAME=test-${TEST_NUM}.${RANDOM}.${RANDOM}
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_032-load_file_segfault/run.sh
^
|
@@ -8,8 +8,8 @@
echo txt.dnsrbl > ${TMPDIR}/${TEST_NUM}-rbl.txt
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --dns-blacklist-entry a.example.com --dns-blacklist-entry b.example.com --dns-blacklist-entry c.example.com --dns-blacklist-entry d.example.com --dns-blacklist-entry e.example.com --dns-blacklist-entry f.example.com --dns-blacklist-entry g.example.com --dns-blacklist-entry h.example.com --dns-blacklist-entry i.example.com --dns-blacklist-entry j.example.com --dns-blacklist-file ${TMPDIR}/${TEST_NUM}-rbl.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --dns-blacklist-entry a.example.com --dns-blacklist-entry b.example.com --dns-blacklist-entry c.example.com --dns-blacklist-entry d.example.com --dns-blacklist-entry e.example.com --dns-blacklist-entry f.example.com --dns-blacklist-entry g.example.com --dns-blacklist-entry h.example.com --dns-blacklist-entry i.example.com --dns-blacklist-entry j.example.com --dns-blacklist-file ${TMPDIR}/${TEST_NUM}-rbl.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 90 -r 221 -- ${SPAMDYKE_PATH} --dns-blacklist-entry a.example.com --dns-blacklist-entry b.example.com --dns-blacklist-entry c.example.com --dns-blacklist-entry d.example.com --dns-blacklist-entry e.example.com --dns-blacklist-entry f.example.com --dns-blacklist-entry g.example.com --dns-blacklist-entry h.example.com --dns-blacklist-entry i.example.com --dns-blacklist-entry j.example.com --dns-blacklist-file ${TMPDIR}/${TEST_NUM}-rbl.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
+${SENDRECV_PATH} -t 90 -r 221 -- ${SPAMDYKE_PATH} --dns-blacklist-entry a.example.com --dns-blacklist-entry b.example.com --dns-blacklist-entry c.example.com --dns-blacklist-entry d.example.com --dns-blacklist-entry e.example.com --dns-blacklist-entry f.example.com --dns-blacklist-entry g.example.com --dns-blacklist-entry h.example.com --dns-blacklist-entry i.example.com --dns-blacklist-entry j.example.com --dns-blacklist-file ${TMPDIR}/${TEST_NUM}-rbl.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
output=`grep -E "^221 " ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_034-multiple_rbl_verbose_logging/run.sh
^
|
@@ -5,7 +5,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.txt.dnsrbl TXT NORMAL Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.txt.dnsrbl TXT NORMAL 0 Test DNSRBL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
@@ -15,7 +15,7 @@
echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --log-target stderr -lverbose --dns-server-ip ${NAMESERVER_IP} -x txt.nonexistant1.dnsrbl -x txt.nonexistant2.dnsrbl -x txt.nonexistant3.dnsrbl -x txt.nonexistant4.dnsrbl -x txt.nonexistant5.dnsrbl -x txt.nonexistant6.dnsrbl -x txt.nonexistant7.dnsrbl -x txt.nonexistant8.dnsrbl -x txt.nonexistant9.dnsrbl -x txt.nonexistant10.dnsrbl -x txt.dnsrbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --log-target stderr -lverbose --dns-server-ip ${NAMESERVER_IP} -x txt.nonexistant1.dnsrbl -x txt.nonexistant2.dnsrbl -x txt.nonexistant3.dnsrbl -x txt.nonexistant4.dnsrbl -x txt.nonexistant5.dnsrbl -x txt.nonexistant6.dnsrbl -x txt.nonexistant7.dnsrbl -x txt.nonexistant8.dnsrbl -x txt.nonexistant9.dnsrbl -x txt.nonexistant10.dnsrbl -x txt.dnsrbl ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
-output=`grep "554 Test DNSRBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
+output=`grep "554 Refused. Your IP address is listed in the RBL at txt.dnsrbl: Test DNSRBL match" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
output=`grep "FILTER_RBL_MATCH ip: 11.22.33.44 rbl: txt.dnsrbl" ${TMPDIR}/${TEST_NUM}-output.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_035-slow_remote_100_cpu/run.sh
^
|
@@ -2,7 +2,7 @@
# remote server. The "time" utility is used to determine if spamdyke uses
# 100% CPU or if it waits patiently.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_036-excessive_full_logging_to_stderr/run.sh
^
|
@@ -2,7 +2,7 @@
# logging and full logging, then looks for EXCESSIVE messages on stderr before
# the configuration file has been fully read.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
mkdir -p ${TMPDIR}/${TEST_NUM}-log.d
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_037-blacklist_misplaced_wildcard/run.sh
^
|
@@ -3,7 +3,7 @@
# domain name embedded in the username, which could confuse the address
# parser.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_042-starttls_hang/run.sh
^
|
@@ -1,7 +1,7 @@
# This test starts TLS without sending any data to test if spamdyke will
# timeout or wait forever for SSL data.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
cp input.txt ${TMPDIR}/${TEST_NUM}-input.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_044-symbol_address_start/run.sh
^
|
@@ -2,7 +2,7 @@
# with a non-alphanumeric character and checks to see if spamdyke parses
# it properly.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS="|test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_045-mx_contains_valid_ip/run.sh
^
|
@@ -2,9 +2,9 @@
# that contains an IP address instead of a name. This is illegal but some
# people do it.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo "ip.mx MX NORMAL 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "ip.mx MX NORMAL 0 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_046-mx_contains_invalid_ip/run.sh
^
|
@@ -1,9 +1,9 @@
# This test looks for a rejection when the sender's domain has an MX record
# that contains an invalid IP address (octets out of range).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo "ip.mx MX NORMAL 666.777.888.999" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "ip.mx MX NORMAL 0 666.777.888.999" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-regression_057-multiple_values_become_default/run.sh
^
|
@@ -1,7 +1,7 @@
# This test sets the "log-target" option to nothing and checks to make sure it
# stays that way without reverting to default.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
echo "log-target=!!!" > ${TMPDIR}/${TEST_NUM}-config.txt
|
[-]
[+]
|
Added |
spamdyke-4.2.1.tar.bz2/tests/test-regression_061-false_missing_sender_mx
^
|
+(directory)
|
[-]
[+]
|
Added |
spamdyke-4.2.1.tar.bz2/tests/test-regression_061-false_missing_sender_mx/input.txt
^
|
@@ -0,0 +1,4 @@
+helo me
+mail from:<FROM_ADDRESS>
+rcpt to:<TARGET_EMAIL>
+quit
|
[-]
[+]
|
Added |
spamdyke-4.2.1.tar.bz2/tests/test-regression_061-false_missing_sender_mx/run.sh
^
|
@@ -0,0 +1,30 @@
+# This test looks for a false positive from the sender MX filter when
+# the sender's MX record has both an MX and an A record associated
+# with it and the MX response is returned first.
+
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
+
+FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
+
+echo "foo.example.com MX NORMAL 0 bar.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "bar.example.com MX NORMAL 0 bar.example.com" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "bar.example.com A NORMAL 1 11.22.33.44" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+
+NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
+
+touch ${TMPDIR}/${TEST_NUM}-local_domains.txt
+
+cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
+echo "${SENDRECV_PATH} -t 30 -r 421 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx --local-domains-file ${TMPDIR}/${TEST_NUM}-local_domains.txt --dns-server-ip ${NAMESERVER_IP} ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
+${SENDRECV_PATH} -t 30 -r 421 -- ${SPAMDYKE_PATH} --reject-missing-sender-mx --local-domains-file ${TMPDIR}/${TEST_NUM}-local_domains.txt --dns-server-ip ${NAMESERVER_IP} ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+
+output=`grep "421 Refused. The domain of your sender address has no mail exchanger (MX)." ${TMPDIR}/${TEST_NUM}-output.txt`
+if [ -z "${output}" ]
+then
+ outcome="success"
+else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+fi
|
[-]
[+]
|
Added |
spamdyke-4.2.1.tar.bz2/tests/test-regression_062-resolv_conf_timeout_overrides_config
^
|
+(directory)
|
[-]
[+]
|
Added |
spamdyke-4.2.1.tar.bz2/tests/test-regression_062-resolv_conf_timeout_overrides_config/input.txt
^
|
@@ -0,0 +1 @@
+quit
|
[-]
[+]
|
Added |
spamdyke-4.2.1.tar.bz2/tests/test-regression_062-resolv_conf_timeout_overrides_config/resolv_conf.txt
^
|
@@ -0,0 +1,2 @@
+nameserver NAMESERVER_IP
+timeout TIMEOUT
|
[-]
[+]
|
Added |
spamdyke-4.2.1.tar.bz2/tests/test-regression_062-resolv_conf_timeout_overrides_config/run.sh
^
|
@@ -0,0 +1,50 @@
+# This test creates a resolv.conf file to set the nameserver and total timeout
+# to a known value. It then starts spamdyke with the dns-timeout-secs parameter
+# to see which one takes precedence -- the spamdyke parameter should win.
+
+export TCPREMOTEIP=11.22.33.44
+export NAMESERVER_IP=127.0.0.1:52
+export RESOLV_CONF_TIMEOUT=27
+export CONFIG_TIMEOUT=3
+
+cat resolv_conf.txt | sed -e "s/NAMESERVER_IP/${NAMESERVER_IP}/g" -e "s/TIMEOUT/${RESOLV_CONF_TIMEOUT}/g" > ${TMPDIR}/${TEST_NUM}-resolv.conf
+
+cp input.txt ${TMPDIR}/${TEST_NUM}-input.txt
+echo "time ${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} -lexcessive --log-target stderr --dns-resolv-conf ${TMPDIR}/${TEST_NUM}-resolv.conf --dns-timeout-secs ${CONFIG_TIMEOUT} ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+start_time=`date +%s`
+time ${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} -lexcessive --log-target stderr --dns-resolv-conf ${TMPDIR}/${TEST_NUM}-resolv.conf --dns-timeout-secs ${CONFIG_TIMEOUT} ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
+end_time=`date +%s`
+
+overtime=true
+if [ "$[${end_time}-${start_time}]" = "${CONFIG_TIMEOUT}" ]
+then
+ overtime=false
+elif [ "$[${end_time}-${start_time}]" = "$[${CONFIG_TIMEOUT}+1]" ]
+then
+ overtime=false
+fi
+
+if [ "${overtime}" == "false" ]
+then
+ output=`grep "for 44.33.22.11.in-addr.arpa(PTR) to DNS server ${NAMESERVER_IP} (attempt 3)" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Total time was $[${end_time}-${start_time}], should have been ${CONFIG_TIMEOUT}
+ echo CONTENTS OF ${TMPDIR}/${TEST_NUM}-resolv.conf:
+ cat ${TMPDIR}/${TEST_NUM}-resolv.conf
+ echo OUTPUT IN tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
+else
+ echo Total time was $[${end_time}-${start_time}], should have been ${CONFIG_TIMEOUT}
+ echo CONTENTS OF /etc/resolv.conf:
+ cat /etc/resolv.conf
+ echo OUTPUT IN tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+fi
|
[-]
[+]
|
Added |
spamdyke-4.2.1.tar.bz2/tests/test-regression_063-recipient_whitelist_allows_only_one_2
^
|
+(directory)
|
[-]
[+]
|
Added |
spamdyke-4.2.1.tar.bz2/tests/test-regression_063-recipient_whitelist_allows_only_one_2/input.txt
^
|
@@ -0,0 +1,5 @@
+helo me
+mail from:<FROM_ADDRESS>
+rcpt to:<TARGET_EMAIL1>
+rcpt to:<TARGET_EMAIL2>
+quit
|
[-]
[+]
|
Added |
spamdyke-4.2.1.tar.bz2/tests/test-regression_063-recipient_whitelist_allows_only_one_2/run.sh
^
|
@@ -0,0 +1,47 @@
+# This test delivers a small test message to two recipients, the first is
+# whitelisted and the other is not. The first should be accepted, the
+# second should be graylisted. This test is nearly identical to
+# regression #19 but uses the missing RDNS filter instead of the graylist
+# filter.
+
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
+
+FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
+TO_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
+
+echo $1 > ${TMPDIR}/${TEST_NUM}-recipient_whitelist.txt
+
+mkdir -p ${TMPDIR}/${TEST_NUM}-graylist.d/example.com
+
+cat input.txt | sed -e "s/TEST_NUM/${TEST_NUM}/g" -e "s/TARGET_EMAIL1/$1/g" -e "s/TARGET_EMAIL2/${TO_ADDRESS}/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
+echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --recipient-whitelist-file -r --local-domains-entry ${RANDOM}.net ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --recipient-whitelist-file ${TMPDIR}/${TEST_NUM}-recipient_whitelist.txt -r --local-domains-entry ${RANDOM}.net ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
+
+output=`grep -i "ALLOWED from: ${FROM_ADDRESS} to: $1" ${TMPDIR}/${TEST_NUM}-output.txt`
+if [ ! -z "${output}" ]
+then
+ output=`grep "DENIED_RDNS_MISSING from: ${FROM_ADDRESS} to: ${TO_ADDRESS}" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ output=`grep "421 Refused. You have no reverse DNS entry." ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo OUTPUT IN tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
+ else
+ echo OUTPUT IN tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
+else
+ echo OUTPUT IN tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+fi
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_002-dns_blacklist/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.a.dnsrbl A NORMAL 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.a.dnsrbl A NORMAL 0 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_003-earlytalker/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the remote server sends data before
# the SMTP greeting banner is received (earlytalker).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_004-empty_rdns/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the incoming IP address doesn't have
# an rDNS name.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_005-graylist/run.sh
^
|
@@ -1,7 +1,7 @@
# This test checks if spamdyke will graylist domains that are properly setup
# (activated).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_009-local_recipient/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the recipient address is not qualified
# (no domain name given).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_010-max_recipients/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for a rejection when too many recipients are given.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_011-missing_sender_mx/run.sh
^
|
@@ -1,6 +1,6 @@
# This test looks for a rejection when the sender's domain has no MX record.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_013-recipient_blacklist/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the recipient email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_014-reject_all/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and no SMTP AUTH. The message should be
# rejected.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_016-rhs_blacklist/run.sh
^
|
@@ -1,9 +1,9 @@
# This test looks for a rejection because the incoming sender address is on a
# RHSBL that uses A records.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo "foo.bar.a.rhsbl A NORMAL 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "foo.bar.a.rhsbl A NORMAL 0 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_017-sender_blacklist/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the sender email address is
# blacklisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_018-smtp_auth_required/run.sh
^
|
@@ -2,7 +2,7 @@
# no rDNS, no other filters run and no SMTP AUTH. The message should be
# rejected.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_019-timeout/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the remote client takes too long to
# deliver the entire message (absolute timeout).
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_021-zero_recipients/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the recipient is blacklisted
# and rejected by spamdyke but the remote client sends DATA anyway.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_022-auth_unknown/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection because the remote server requests
# an unsupported authentication method.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_024-auth_failure/run.sh
^
|
@@ -1,7 +1,7 @@
# This test fails to authenticate using SMTP AUTH LOGIN and gets an error
# message.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
AUTH_USERNAME=`${SMTPAUTH_LOGIN_PATH} $2 foo.$3 | tail -3 | head -1 | awk '{ print $2 }'`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-rejection_text_025-identical_sender_recipient/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a rejection when the sender and recipient addresses are
# the same.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@foo.example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-relay_003-auth_failure_relaying_denied/run.sh
^
|
@@ -1,7 +1,7 @@
# This test fails to authenticate using SMTP AUTH LOGIN and tries to relay a
# small message. It should be blocked.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
echo ":allow" > ${TMPDIR}/${TEST_NUM}-access.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-relay_004-no_auth_relaying_denied/run.sh
^
|
@@ -1,7 +1,7 @@
# This test does not authenticate using SMTP AUTH LOGIN and tries to relay a
# small message. It should be blocked.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
echo ":allow" > ${TMPDIR}/${TEST_NUM}-access.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-relay_005-access_denied/run.sh
^
|
@@ -1,5 +1,5 @@
# This test looks for a rejection when the remote server is not allowed to
-# connect.
+# connect and checks the reason is correct.
export TCPREMOTEIP=10.64.128.255
@@ -11,13 +11,22 @@
touch ${TMPDIR}/${TEST_NUM}-local_domains.txt
cat input.txt | sed -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --access-file ${TMPDIR}/${TEST_NUM}-access.txt -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} --access-file ${TMPDIR}/${TEST_NUM}-access.txt -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --access-file ${TMPDIR}/${TEST_NUM}-access.txt -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+${SENDRECV_PATH} -t 30 -r 554 -- ${SPAMDYKE_PATH} -linfo --log-target stderr --access-file ${TMPDIR}/${TEST_NUM}-access.txt -d ${TMPDIR}/${TEST_NUM}-local_domains.txt ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "554 Refused. Access is denied." ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
then
- outcome="success"
+ output=`grep "reason: ${TMPDIR}/${TEST_NUM}-access.txt:1" ${TMPDIR}/${TEST_NUM}-output.txt`
+ if [ ! -z "${output}" ]
+ then
+ outcome="success"
+ else
+ echo Filter failure - tmp/${TEST_NUM}-output.txt:
+ cat ${TMPDIR}/${TEST_NUM}-output.txt
+
+ outcome="failure"
+ fi
else
echo Filter failure - tmp/${TEST_NUM}-output.txt:
cat ${TMPDIR}/${TEST_NUM}-output.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-relay_006-no_auth_relaying_permitted/run.sh
^
|
@@ -1,7 +1,7 @@
# This test does not authenticate using SMTP AUTH and tries to relay a
# small message. It should be allowed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
echo ":allow,RELAYCLIENT=\"\"" > ${TMPDIR}/${TEST_NUM}-access.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-relay_007-relayclient_envvar_relaying_permitted/run.sh
^
|
@@ -1,7 +1,7 @@
# This test does not authenticate using SMTP AUTH and tries to relay a
# small message. It should be allowed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
export RELAYCLIENT=""
echo ":allow" > ${TMPDIR}/${TEST_NUM}-access.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-usage_005-integer_range_maximum/run.sh
^
|
@@ -1,7 +1,7 @@
# This test runs spamdyke with an integer value above its maximum and checks the
# error message.
-echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --dns-max-retries-total 4000000000 ${QMAIL_CMDLINE} > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
+echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --dns-max-retries-total 4${TESTSD_MISSING_RDNS_IP}00 ${QMAIL_CMDLINE} > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1"
${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} --dns-max-retries-total 4000000000 ${QMAIL_CMDLINE} > ${TMPDIR}/${TEST_NUM}-output.txt 2>&1
output=`grep "ERROR: Illegal value for option dns-max-retries-total: 4000000000 (must be between 1 and 2147483647)" ${TMPDIR}/${TEST_NUM}-output.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-usage_011-run_as_user/run.sh
^
|
@@ -1,7 +1,7 @@
# This test looks for a startup error because the configuration file can't be
# read after the user has been changed.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_ip_001-exact_match/run.sh
^
|
@@ -1,8 +1,8 @@
# This test looks for success because the incoming IP address is whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo 0.0.0.0 > ${TMPDIR}/${TEST_NUM}-whitelist_ip.txt
+echo ${TESTSD_MISSING_RDNS_IP} > ${TMPDIR}/${TEST_NUM}-whitelist_ip.txt
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_ip_002-dns_with_txt/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.txt.dnsrwl TXT NORMAL Test DNSRWL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.txt.dnsrwl TXT NORMAL 0 Test DNSRWL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_ip_003-dns_without_txt/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.a.dnsrwl A NORMAL 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.a.dnsrwl A NORMAL 0 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_ip_004-dns_from_file/run.sh
^
|
@@ -3,7 +3,7 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.txt.dnsrwl TXT NORMAL Test DNSRWL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.txt.dnsrwl TXT NORMAL 0 Test DNSRWL match" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_ip_005-ip_entry/run.sh
^
|
@@ -1,12 +1,12 @@
# This test looks for success because the incoming IP address is whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
cat input.txt | sed -e "s/TEST_NUM/${TEST_NUM}/g" -e "s/TARGET_EMAIL/$1/g" -e "s/FROM_ADDRESS/${FROM_ADDRESS}/g" > ${TMPDIR}/${TEST_NUM}-input.txt
-echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} -r --ip-whitelist-entry 0.0.0.0 ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
-${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} -r --ip-whitelist-entry 0.0.0.0 ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
+echo "${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} -r --ip-whitelist-entry ${TESTSD_MISSING_RDNS_IP} ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt"
+${SENDRECV_PATH} -t 30 -r 221 -- ${SPAMDYKE_PATH} -r --ip-whitelist-entry ${TESTSD_MISSING_RDNS_IP} ${QMAIL_CMDLINE} < ${TMPDIR}/${TEST_NUM}-input.txt > ${TMPDIR}/${TEST_NUM}-output.txt
output=`grep -E "250 ok [0-9]* qp [0-9]*" ${TMPDIR}/${TEST_NUM}-output.txt`
if [ ! -z "${output}" ]
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_rdns_005-rhswl_with_txt/run.sh
^
|
@@ -3,8 +3,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.txt.rhswl TXT NORMAL Test RHSWL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.txt.rhswl TXT NORMAL 0 Test RHSWL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_rdns_006-rhswl_without_txt/run.sh
^
|
@@ -3,8 +3,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.a.rhswl A NORMAL 127.0.0.1" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.a.rhswl A NORMAL 0 127.0.0.1" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_rdns_007-rhswl_from_file/run.sh
^
|
@@ -3,8 +3,8 @@
export TCPREMOTEIP=11.22.33.44
-echo "44.33.22.11.in-addr.arpa PTR NORMAL foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
-echo "example.com.txt.rhswl TXT NORMAL Test RHSWL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "44.33.22.11.in-addr.arpa PTR NORMAL 0 foo.example.com" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.txt.rhswl TXT NORMAL 0 Test RHSWL match" >> ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_recipient_001-exact_match/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the whole recipient address has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
echo $1 > ${TMPDIR}/${TEST_NUM}-whitelist_recipient.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_recipient_002-domain_name/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the recipient domain name has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
echo @`echo $1 | sed -e "s/[^@]*@//"` > ${TMPDIR}/${TEST_NUM}-whitelist_recipient.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_recipient_003-exact_match_entry/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the whole recipient address has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_recipient_004-miscased_entry/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the whole recipient address has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_sender_001-exact_match/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the whole sender address has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
echo ${FROM_ADDRESS} > ${TMPDIR}/${TEST_NUM}-whitelist_sender.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_sender_002-domain_name/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the sender domain name has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
echo @example.com > ${TMPDIR}/${TEST_NUM}-whitelist_sender.txt
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_sender_003-rhswl_with_txt/run.sh
^
|
@@ -1,9 +1,9 @@
# This test attempts to deliver a message when the sender domain name has
# been whitelisted on a RHSWL that uses TXT records.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo "example.com.txt.rhswl TXT NORMAL Test RHSWL text" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.txt.rhswl TXT NORMAL 0 Test RHSWL text" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_sender_004-rhswl_without_txt/run.sh
^
|
@@ -1,9 +1,9 @@
# This test attempts to deliver a message when the sender domain name has
# been whitelisted on a RHSWL that does not use TXT records.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
-echo "example.com.a.rhswl A NORMAL 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
+echo "example.com.a.rhswl A NORMAL 0 127.0.0.1" > ${TMPDIR}/${TEST_NUM}-dns_config.txt
NAMESERVER_IP=127.0.0.1:`${DNSDUMMY_PATH} -t 30 -f ${TMPDIR}/${TEST_NUM}-dns_config.txt`
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_sender_005-exact_match_entry/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the whole sender address has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_ADDRESS=test-${TEST_NUM}.${RANDOM}.${RANDOM}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/tests/test-whitelist_sender_006-miscased_entry/run.sh
^
|
@@ -1,7 +1,7 @@
# This test attempts to deliver a message when the whole sender address has
# been whitelisted.
-export TCPREMOTEIP=0.0.0.0
+export TCPREMOTEIP=${TESTSD_MISSING_RDNS_IP}
FROM_USERNAME=test-${TEST_NUM}.${RANDOM}.${RANDOM}
FROM_ADDRESS=${FROM_USERNAME}@example.com
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/Makefile.in
^
|
@@ -1,7 +1,7 @@
# @configure_input@
################################################################################
# spamdyke -- a filter for stopping spam at connection time.
-# Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+# Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/config.h.in
^
|
@@ -1,6 +1,6 @@
/*
spamdyke -- a filter for stopping spam at connection time.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/configure
^
|
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for spamdyke 4.2.0.
+# Generated by GNU Autoconf 2.61 for spamdyke 4.2.1.
#
# Report bugs to <samc (at) silence (dot) org>.
#
@@ -574,8 +574,8 @@
# Identity of this package.
PACKAGE_NAME='spamdyke'
PACKAGE_TARNAME='-spamdyke-'
-PACKAGE_VERSION='4.2.0'
-PACKAGE_STRING='spamdyke 4.2.0'
+PACKAGE_VERSION='4.2.1'
+PACKAGE_STRING='spamdyke 4.2.1'
PACKAGE_BUGREPORT='samc (at) silence (dot) org'
ac_unique_file="dnsa.c"
@@ -1177,7 +1177,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures spamdyke 4.2.0 to adapt to many kinds of systems.
+\`configure' configures spamdyke 4.2.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1238,7 +1238,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of spamdyke 4.2.0:";;
+ short | recursive ) echo "Configuration of spamdyke 4.2.1:";;
esac
cat <<\_ACEOF
@@ -1321,7 +1321,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-spamdyke configure 4.2.0
+spamdyke configure 4.2.1
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1335,7 +1335,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by spamdyke $as_me 4.2.0, which was
+It was created by spamdyke $as_me 4.2.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -4361,7 +4361,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by spamdyke $as_me 4.2.0, which was
+This file was extended by spamdyke $as_me 4.2.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4410,7 +4410,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-spamdyke config.status 4.2.0
+spamdyke config.status 4.2.1
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/configure.ac
^
|
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
################################################################################
# spamdyke -- a filter for stopping spam at connection time.
-# Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+# Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -17,7 +17,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
AC_PREREQ(2.59)
-AC_INIT([[spamdyke]], [[4.2.0]], [[samc (at) silence (dot) org]])
+AC_INIT([[spamdyke]], [[4.2.1]], [[samc (at) silence (dot) org]])
AC_CONFIG_SRCDIR([dnsa.c])
AC_CONFIG_HEADER([config.h])
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/dnsa.c
^
|
@@ -1,6 +1,6 @@
/*
dnsa -- an example of making DNS A queries by sending UDP packets
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -324,6 +324,7 @@
int num_answers;
struct previous_action current_lookup;
struct previous_action *tmp_lookup;
+ HEADER *tmp_header;
return_value = 0;
@@ -339,7 +340,8 @@
answer_ptr = answer + sizeof(HEADER);
// Skip the questions
- num_questions = ntohs((unsigned short)((HEADER *)&answer)->qdcount);
+ tmp_header = (HEADER *)&answer;
+ num_questions = ntohs((unsigned short)tmp_header->qdcount);
for (i = 0; i < num_questions; i++)
if ((size = dn_skipname(answer_ptr, answer + answer_length)) >= 0)
answer_ptr += size + QFIXEDSZ;
@@ -348,7 +350,7 @@
if (i == num_questions)
{
- num_answers = ntohs((unsigned short)((HEADER *)&answer)->ancount);
+ num_answers = ntohs((unsigned short)tmp_header->ancount);
answer_start = answer_ptr;
for (i = 0; (i < num_answers) && !return_value; i++)
@@ -421,7 +423,7 @@
void usage()
{
printf(
- PACKAGE_NAME " " PACKAGE_VERSION " (C)2011 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
+ PACKAGE_NAME " " PACKAGE_VERSION " (C)2012 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
"http://www.spamdyke.org/\n"
"\n"
"USAGE: dnsa [ -v ] FQDN [ FQDN ... ]\n"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/dnsany.c
^
|
@@ -1,6 +1,6 @@
/*
dnsany -- an example of making DNS queries by sending UDP packets
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -332,6 +332,7 @@
int exit_loop;
struct previous_action current_lookup;
struct previous_action *tmp_lookup;
+ HEADER *tmp_header;
memset(answer, 0, PACKETSZ);
@@ -345,7 +346,8 @@
answer_ptr = answer + sizeof(HEADER);
// Skip the questions
- num_questions = ntohs((unsigned short)((HEADER *)&answer)->qdcount);
+ tmp_header = (HEADER *)&answer;
+ num_questions = ntohs((unsigned short)tmp_header->qdcount);
for (i = 0; i < num_questions; i++)
if ((size = dn_skipname(answer_ptr, answer + answer_length)) >= 0)
answer_ptr += size + QFIXEDSZ;
@@ -354,7 +356,7 @@
if (i == num_questions)
{
- num_answers = ntohs((unsigned short)((HEADER *)&answer)->ancount);
+ num_answers = ntohs((unsigned short)tmp_header->ancount);
num_cnames = 0;
answer_start = answer_ptr;
@@ -534,7 +536,7 @@
void usage()
{
printf(
- PACKAGE_NAME " " PACKAGE_VERSION " (C)2011 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
+ PACKAGE_NAME " " PACKAGE_VERSION " (C)2012 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
"http://www.spamdyke.org/\n"
"\n"
"USAGE: dnsany [ -v ] FQDN [ FQDN ... ]\n"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/dnsany_libc.c
^
|
@@ -1,6 +1,6 @@
/*
dnsany -- an example of making DNS queries using libc
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -160,6 +160,7 @@
int exit_loop;
struct previous_action current_lookup;
struct previous_action *tmp_lookup;
+ HEADER *tmp_header;
memset(answer, 0, PACKETSZ);
@@ -173,7 +174,8 @@
answer_ptr = answer + sizeof(HEADER);
// Skip the questions
- num_questions = ntohs((unsigned short)((HEADER *)&answer)->qdcount);
+ tmp_header = (HEADER *)&answer;
+ num_questions = ntohs((unsigned short)tmp_header->qdcount);
for (i = 0; i < num_questions; i++)
if ((size = dn_skipname(answer_ptr, answer + answer_length)) >= 0)
answer_ptr += size + QFIXEDSZ;
@@ -182,7 +184,7 @@
if (i == num_questions)
{
- num_answers = ntohs((unsigned short)((HEADER *)&answer)->ancount);
+ num_answers = ntohs((unsigned short)tmp_header->ancount);
num_cnames = 0;
answer_start = answer_ptr;
@@ -362,7 +364,7 @@
void usage()
{
printf(
- PACKAGE_NAME " " PACKAGE_VERSION " (C)2011 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
+ PACKAGE_NAME " " PACKAGE_VERSION " (C)2012 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
"http://www.spamdyke.org/\n"
"\n"
"USAGE: dnsany_libc [ -v ] FQDN [ FQDN ... ]\n"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/dnscname.c
^
|
@@ -1,6 +1,6 @@
/*
dnsns -- an example of making DNS CNAME queries by sending UDP packets
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -321,6 +321,7 @@
int type;
int num_questions;
int num_answers;
+ HEADER *tmp_header;
return_value = 0;
@@ -336,7 +337,8 @@
answer_ptr = answer + sizeof(HEADER);
// Skip the questions
- num_questions = ntohs((unsigned short)((HEADER *)&answer)->qdcount);
+ tmp_header = (HEADER *)&answer;
+ num_questions = ntohs((unsigned short)tmp_header->qdcount);
for (i = 0; i < num_questions; i++)
if ((size = dn_skipname(answer_ptr, answer + answer_length)) >= 0)
answer_ptr += size + QFIXEDSZ;
@@ -345,7 +347,7 @@
if (i == num_questions)
{
- num_answers = ntohs((unsigned short)((HEADER *)&answer)->ancount);
+ num_answers = ntohs((unsigned short)tmp_header->ancount);
answer_start = answer_ptr;
for (i = 0; i < num_answers; i++)
@@ -400,7 +402,7 @@
void usage()
{
printf(
- PACKAGE_NAME " " PACKAGE_VERSION " (C)2011 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
+ PACKAGE_NAME " " PACKAGE_VERSION " (C)2012 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
"http://www.spamdyke.org/\n"
"\n"
"USAGE: dnscname [ -v ] FQDN [ FQDN ... ]\n"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/dnsmx.c
^
|
@@ -1,6 +1,6 @@
/*
dnsmx -- an example of making DNS MX queries by sending UDP packets
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -325,6 +325,7 @@
int preference;
struct previous_action current_lookup;
struct previous_action *tmp_lookup;
+ HEADER *tmp_header;
return_value = 0;
@@ -340,7 +341,8 @@
answer_ptr = answer + sizeof(HEADER);
// Skip the questions
- num_questions = ntohs((unsigned short)((HEADER *)&answer)->qdcount);
+ tmp_header = (HEADER *)&answer;
+ num_questions = ntohs((unsigned short)tmp_header->qdcount);
for (i = 0; i < num_questions; i++)
if ((size = dn_skipname(answer_ptr, answer + answer_length)) >= 0)
answer_ptr += size + QFIXEDSZ;
@@ -349,7 +351,7 @@
if (i == num_questions)
{
- num_answers = ntohs((unsigned short)((HEADER *)&answer)->ancount);
+ num_answers = ntohs((unsigned short)tmp_header->ancount);
answer_start = answer_ptr;
for (i = 0; (i < num_answers) && !return_value; i++)
@@ -431,7 +433,7 @@
void usage()
{
printf(
- PACKAGE_NAME " " PACKAGE_VERSION " (C)2011 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
+ PACKAGE_NAME " " PACKAGE_VERSION " (C)2012 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
"http://www.spamdyke.org/\n"
"\n"
"USAGE: dnsmx [ -v ] FQDN [ FQDN ... ]\n"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/dnsns.c
^
|
@@ -1,6 +1,6 @@
/*
dnsns -- an example of making DNS NS queries by sending UDP packets
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -324,6 +324,7 @@
int num_answers;
struct previous_action current_lookup;
struct previous_action *tmp_lookup;
+ HEADER *tmp_header;
return_value = 0;
@@ -339,7 +340,8 @@
answer_ptr = answer + sizeof(HEADER);
// Skip the questions
- num_questions = ntohs((unsigned short)((HEADER *)&answer)->qdcount);
+ tmp_header = (HEADER *)&answer;
+ num_questions = ntohs((unsigned short)tmp_header->qdcount);
for (i = 0; i < num_questions; i++)
if ((size = dn_skipname(answer_ptr, answer + answer_length)) >= 0)
answer_ptr += size + QFIXEDSZ;
@@ -348,7 +350,7 @@
if (i == num_questions)
{
- num_answers = ntohs((unsigned short)((HEADER *)&answer)->ancount);
+ num_answers = ntohs((unsigned short)tmp_header->ancount);
answer_start = answer_ptr;
for (i = 0; (i < num_answers) && !return_value; i++)
@@ -429,7 +431,7 @@
void usage()
{
printf(
- PACKAGE_NAME " " PACKAGE_VERSION " (C)2011 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
+ PACKAGE_NAME " " PACKAGE_VERSION " (C)2012 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
"http://www.spamdyke.org/\n"
"\n"
"USAGE: dnsns [ -v ] FQDN [ FQDN ... ]\n"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/dnsptr.c
^
|
@@ -1,6 +1,6 @@
/*
dnsptr -- an example of making DNS PTR queries by sending UDP packets
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -325,6 +325,7 @@
int num_answers;
struct previous_action current_lookup;
struct previous_action *tmp_lookup;
+ HEADER *tmp_header;
return_value = 0;
@@ -340,7 +341,8 @@
answer_ptr = answer + sizeof(HEADER);
// Skip the questions
- num_questions = ntohs((unsigned short)((HEADER *)&answer)->qdcount);
+ tmp_header = (HEADER *)&answer;
+ num_questions = ntohs((unsigned short)tmp_header->qdcount);
for (i = 0; i < num_questions; i++)
if ((size = dn_skipname(answer_ptr, answer + answer_length)) >= 0)
answer_ptr += size + QFIXEDSZ;
@@ -349,7 +351,7 @@
if (i == num_questions)
{
- num_answers = ntohs((unsigned short)((HEADER *)&answer)->ancount);
+ num_answers = ntohs((unsigned short)tmp_header->ancount);
answer_start = answer_ptr;
for (i = 0; (i < num_answers) && !return_value; i++)
@@ -445,7 +447,7 @@
void usage()
{
printf(
- PACKAGE_NAME " " PACKAGE_VERSION " (C)2011 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
+ PACKAGE_NAME " " PACKAGE_VERSION " (C)2012 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
"http://www.spamdyke.org/\n"
"\n"
"USAGE: dnsptr [ -v ] IP | FQDN [ IP ... ] [ FQDN ... ]\n"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/dnssoa.c
^
|
@@ -1,6 +1,6 @@
/*
dnssoa -- an example of making DNS SOA queries by sending UDP packets
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -329,6 +329,7 @@
long ttl;
struct previous_action current_lookup;
struct previous_action *tmp_lookup;
+ HEADER *tmp_header;
return_value = 0;
@@ -344,7 +345,8 @@
answer_ptr = answer + sizeof(HEADER);
// Skip the questions
- num_questions = ntohs((unsigned short)((HEADER *)&answer)->qdcount);
+ tmp_header = (HEADER *)&answer;
+ num_questions = ntohs((unsigned short)tmp_header->qdcount);
for (i = 0; i < num_questions; i++)
if ((size = dn_skipname(answer_ptr, answer + answer_length)) >= 0)
answer_ptr += size + QFIXEDSZ;
@@ -353,7 +355,7 @@
if (i == num_questions)
{
- num_answers = ntohs((unsigned short)((HEADER *)&answer)->ancount);
+ num_answers = ntohs((unsigned short)tmp_header->ancount);
answer_start = answer_ptr;
for (i = 0; (i < num_answers) && !return_value; i++)
@@ -460,7 +462,7 @@
void usage()
{
printf(
- PACKAGE_NAME " " PACKAGE_VERSION " (C)2011 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
+ PACKAGE_NAME " " PACKAGE_VERSION " (C)2012 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
"http://www.spamdyke.org/\n"
"\n"
"USAGE: dnssoa [ -v ] FQDN [ FQDN ... ]\n"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/dnstxt.c
^
|
@@ -1,6 +1,6 @@
/*
dnstxt -- an example of making DNS TXT queries by sending UDP packets
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -323,6 +323,7 @@
int num_answers;
struct previous_action current_lookup;
struct previous_action *tmp_lookup;
+ HEADER *tmp_header;
return_value = 0;
@@ -339,7 +340,8 @@
answer_ptr = answer + sizeof(HEADER);
// Skip the questions
- num_questions = ntohs((unsigned short)((HEADER *)&answer)->qdcount);
+ tmp_header = (HEADER *)&answer;
+ num_questions = ntohs((unsigned short)tmp_header->qdcount);
for (i = 0; i < num_questions; i++)
if ((size = dn_skipname(answer_ptr, answer + answer_length)) >= 0)
answer_ptr += size + QFIXEDSZ;
@@ -348,7 +350,7 @@
if (i == num_questions)
{
- num_answers = ntohs((unsigned short)((HEADER *)&answer)->ancount);
+ num_answers = ntohs((unsigned short)tmp_header->ancount);
answer_start = answer_ptr;
for (i = 0; (i < num_answers) && !return_value; i++)
@@ -433,7 +435,7 @@
void usage()
{
printf(
- PACKAGE_NAME " " PACKAGE_VERSION " (C)2011 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
+ PACKAGE_NAME " " PACKAGE_VERSION " (C)2012 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
"http://www.spamdyke.org/\n"
"\n"
"USAGE: dnstxt [ -v ] FQDN [ FQDN ... ]\n"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/domain2path.c
^
|
@@ -1,6 +1,6 @@
/*
domain2path -- a utility for translating domain names to file paths.
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -33,7 +33,7 @@
if ((argc == 1) ||
(strcmp(argv[1], "-h") == 0))
printf(
- PACKAGE_NAME " " PACKAGE_VERSION " (C)2011 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
+ PACKAGE_NAME " " PACKAGE_VERSION " (C)2012 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
"http://www.spamdyke.org/\n"
"\n"
"USAGE: domain2path [ -d ] DOMAIN_NAME\n"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/domainsplit.c
^
|
@@ -1,6 +1,6 @@
/*
domainsplit -- a utility to find the base domain name of an FQDN
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -34,7 +34,7 @@
if ((argc == 2) &&
(strcmp(argv[1], "-h") == 0))
printf(
- PACKAGE_NAME " " PACKAGE_VERSION " (C)2011 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
+ PACKAGE_NAME " " PACKAGE_VERSION " (C)2012 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
"http://www.spamdyke.org/\n"
"\n"
"USAGE: domainsplit [FQDN [FQDN] ...]\n"
|
[-]
[+]
|
Changed |
spamdyke-4.2.1.tar.bz2/utils/timefilter.c
^
|
@@ -1,6 +1,6 @@
/*
timefilter -- a utility for printing log messages from a given time range
- Copyright (C) 2011 Sam Clippinger (samc (at) silence (dot) org)
+ Copyright (C) 2012 Sam Clippinger (samc (at) silence (dot) org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -24,7 +24,7 @@
char *month_list[] = { "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec" };
time_t now;
-struct tm *today;
+struct tm today;
unsigned long long get_tai(char *target_string)
{
@@ -82,24 +82,24 @@
if (tmp_tm->tm_year == 0)
{
- if ((tmp_tm->tm_mon > today->tm_mon) ||
- ((tmp_tm->tm_mon == today->tm_mon) &&
- (tmp_tm->tm_mday > today->tm_mday)) ||
- ((tmp_tm->tm_mon == today->tm_mon) &&
- (tmp_tm->tm_mday == today->tm_mday) &&
- (tmp_tm->tm_hour > today->tm_hour)) ||
- ((tmp_tm->tm_mon == today->tm_mon) &&
- (tmp_tm->tm_mday == today->tm_mday) &&
- (tmp_tm->tm_hour == today->tm_hour) &&
- (tmp_tm->tm_min > today->tm_min)) ||
- ((tmp_tm->tm_mon == today->tm_mon) &&
- (tmp_tm->tm_mday == today->tm_mday) &&
- (tmp_tm->tm_hour == today->tm_hour) &&
- (tmp_tm->tm_min == today->tm_min) &&
- (tmp_tm->tm_sec > today->tm_sec)))
- tmp_tm->tm_year = today->tm_year - 1;
+ if ((tmp_tm->tm_mon > today.tm_mon) ||
+ ((tmp_tm->tm_mon == today.tm_mon) &&
+ (tmp_tm->tm_mday > today.tm_mday)) ||
+ ((tmp_tm->tm_mon == today.tm_mon) &&
+ (tmp_tm->tm_mday == today.tm_mday) &&
+ (tmp_tm->tm_hour > today.tm_hour)) ||
+ ((tmp_tm->tm_mon == today.tm_mon) &&
+ (tmp_tm->tm_mday == today.tm_mday) &&
+ (tmp_tm->tm_hour == today.tm_hour) &&
+ (tmp_tm->tm_min > today.tm_min)) ||
+ ((tmp_tm->tm_mon == today.tm_mon) &&
+ (tmp_tm->tm_mday == today.tm_mday) &&
+ (tmp_tm->tm_hour == today.tm_hour) &&
+ (tmp_tm->tm_min == today.tm_min) &&
+ (tmp_tm->tm_sec > today.tm_sec)))
+ tmp_tm->tm_year = today.tm_year - 1;
else
- tmp_tm->tm_year = today->tm_year;
+ tmp_tm->tm_year = today.tm_year;
}
else
tmp_tm->tm_year -= 1900;
@@ -116,7 +116,7 @@
void usage()
{
printf(
- PACKAGE_NAME " " PACKAGE_VERSION " (C)2011 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
+ PACKAGE_NAME " " PACKAGE_VERSION " (C)2012 Sam Clippinger, " PACKAGE_BUGREPORT "\n"
"http://www.spamdyke.org/\n"
"\n"
"USAGE: timefilter START_SECS_AGO END_SECS_AGO\n"
@@ -151,20 +151,23 @@
unsigned long long start_time;
unsigned long long end_time;
unsigned long long tmp_time;
+ struct tm *tmp_tm;
if (argc == 3)
{
now = time(NULL);
- today = localtime(&now);
+ tmp_tm = localtime(&now);
+ memcpy(&today, tmp_tm, sizeof(struct tm));
start_time = now - atoi(argv[1]);
end_time = now - atoi(argv[2]);
- if (today->tm_isdst &&
+ if (today.tm_isdst &&
((argv[1][0] == '+') ||
(argv[2][0] == '+')))
{
now += 3600;
- today = localtime(&now);
+ tmp_tm = localtime(&now);
+ memcpy(&today, tmp_tm, sizeof(struct tm));
start_time += 3600;
end_time += 3600;
}
|