Commit Graph

89 Commits

Author SHA1 Message Date
Priyadi Iman Nurcahyo
bef79d3b7d Fix test for munge_subject_threshold 2014-05-15 14:45:33 +00:00
Matt Simerson
a19b7de787 updated DMARC plugin tests
disabled for now, b/c they tested methods which no longer exist in new plugin
2013-12-18 00:09:10 -05:00
Matt Simerson
c652d4c9e4 dmarc test: comments in the public list was
allowing certain org domain searches to fail (plus.google.com, b/c a google.com email address was in the public list). Now I anchor the searches to the start of the line. This test also catches edge cases like co.uk, which isn't listed, but a wildcard *.uk is.
2013-08-05 15:05:37 -07:00
Matt Simerson
fc3117fe60 fix dmarc plugin tests 2013-08-05 15:05:14 -07:00
Matt Simerson
db8ec50c3a new plugin: dmarc 2013-08-05 15:05:14 -07:00
Matt Simerson
8b548e392d test fixes for badmailfrom,headers plugins 2013-08-05 15:05:13 -07:00
Matt Simerson
a2bba68af6 several adjustments for tests 2013-08-05 15:05:10 -07:00
Matt Simerson
85cead39f8 SPF: removed test for removed is_in_relayclients() 2013-08-05 15:05:09 -07:00
Matt Simerson
1a7615ca7e dnsbl test: don't cry about test failures that
depend on working network & DNS.
2013-08-05 15:05:09 -07:00
Matt Simerson
8d52a3f548 dnsbl: fixed plugin test failure 2013-08-05 15:05:09 -07:00
Matt Simerson
47151f165b resolveable_fromhost: updated tests 2013-08-05 15:01:51 -07:00
Matt Simerson
208dfc3a21 rename require_resolvable_fromhost to resolvable_fromhost 2013-08-05 15:01:51 -07:00
Matt Simerson
e4d50a27d9 dnsbl test: remove hook_disconnect test 2013-08-05 15:01:50 -07:00
Matt Simerson
cf9b10a52f badmailfromto: fixed tests (rename cleanups) 2013-08-05 15:01:50 -07:00
Matt Simerson
f7c5f49946 rcpt_ok: shorten test messages 2013-08-05 15:01:50 -07:00
Matt Simerson
14767f9b18 updated SPF tests 2013-08-05 15:01:50 -07:00
Matt Simerson
b245d30e9e dnsbl: process DNS queries immediately
rather than deferring until RCPT. This greatly improves efficiency, since most connections will get marked naughty much sooner, having run fewer tests.
2013-08-05 15:01:49 -07:00
Matt Simerson
a259fec536 badrcptto: dropped check_ prefix from name 2013-08-05 15:01:49 -07:00
Matt Simerson
5ea1eb0f4c badrcptto: log tweaks, better regex detection 2013-08-05 15:01:49 -07:00
Matt Simerson
35b9b32895 relay: logging tweak 2013-08-05 15:01:49 -07:00
Matt Simerson
4a3452f486 p0f: POD & log message updates 2013-08-05 15:01:48 -07:00
Matt Simerson
964eab3b2b dspam: changed to only train on error
per suggestions by the dspam author
2013-08-05 15:01:48 -07:00
Matt Simerson
08256232a8 clamdscan: make sure headers exist before operating on them 2013-08-05 15:01:48 -07:00
Matt Simerson
47488650b3 badmailfrom rename fixups 2013-08-05 15:01:48 -07:00
Matt Simerson
1fff417405 rename check_badmailfrom -> badmailfrom 2013-08-05 15:01:48 -07:00
Matt Simerson
e4133127d5 badmailfrom: remove rcpt hook (uses naughty instead) 2013-08-05 15:01:48 -07:00
Matt Simerson
e2c84987f3 helo: refine plugin tests 2013-08-05 15:01:48 -07:00
Matt Simerson
97fda310ee headers: plugin tests, deprecate check_basicheaders 2013-08-05 15:01:48 -07:00
Matt Simerson
d460dc86e3 spamassassin: add explicit default reject_type
consolidate the two data_post methods into one (more linear, simpler)
more informative log message
add new headers to top of headers (not bottom (consistent MTA behavior))
2013-08-05 15:01:48 -07:00
Matt Simerson
eba0a10132 badmailfrom: removed tests for rcpt_handler
and shorten test response messages in badmailfromto
2013-08-05 15:01:48 -07:00
Matt Simerson
7ff2d050f3 initial import - based on my qpsmtpd fork
which will merge into the main branch fairly easily
2013-08-05 15:01:47 -07:00
Matt Simerson
4e2ae484a2 Merge pull request #15 from msimerson/early
consolidated chunks of code duplicated 4x into log_and_deny and log_and_...
2013-08-05 12:33:42 -07:00
Matt Simerson
fd646b0d27 Merge pull request #29 from msimerson/helo
Helo
2013-08-05 12:30:59 -07:00
Matt Simerson
44db1fecf6 helo: loosen up matching DNS requirements
added X-HELO header to message
added timeout option
quieted down debug logging
2012-06-13 17:49:25 -04:00
Matt Simerson
74ae957936 helo: new plugin
helo - validate a HELO message delivered from a connecting host.

Includes the following tests:

	is_in_badhelo
	invalid_localhost
	is_plain_ip
	is_address_literal [N.N.N.N]
	is_forged_literal
	is_not_fqdn
	no_forward_dns
	no_reverse_dns
	no_matching_dns
2012-06-11 22:27:01 -04:00
Matt Simerson
55b5f34365 auth_vpopmail_sql test, eval 'use DBI' before testing 2012-06-04 03:34:47 -04:00
Matt Simerson
8795d4fd6e relay: use IETF IP testing addresses 2012-06-04 03:34:47 -04:00
Matt Simerson
974f1a95e8 new relay plugin, with tests!
replaces functionality of previous 3 relay plugins
2012-06-04 03:34:47 -04:00
Matt Simerson
57a0e4ba7b updated plugins to use QP::Plugins::is_immune 2012-06-04 03:26:16 -04:00
Matt Simerson
2a371a2c6e consolidated chunks of code duplicated 4x into log_and_deny and log_and_pass
in apr_*_handler subs, return DECLINED when connection is not available to read (like during tests)

added 23 tests

deprecate action argument
	'action log' did nothing, better logging controls available with loglevel
	'action deny'  ->  reject 1
	'action denysoft' =>  reject 1 reject_type temp

POD
use head2 for config options (instead of over, item, back)
added loglevel section
updated for replacement of action with reject options
2012-06-04 03:23:14 -04:00
Ask Bjørn Hansen
0e2384cceb Make all plugins use $self->connection rather than $self->qp->connection
Merge remote-tracking branch 'msimerson/connect'

Conflicts:
	plugins/async/require_resolvable_fromhost
	plugins/require_resolvable_fromhost
2012-06-03 23:53:43 -07:00
Matt Simerson
0a16621f02 connection consistency
-  $self->qp->connection->notes
+  $self->connection->notes

and all tests pass.
2012-06-02 00:46:33 -04:00
Matt Simerson
2f49cafcd6 resolvable_fromhost: refactored, added: POD, tests, reject, reject_type 2012-05-23 23:39:43 -04:00
Ask Bjørn Hansen
9e239fd83d Merge pull request #16 from msimerson/geoip
Geoip plugin improvements
2012-05-23 15:39:10 -07:00
Matt Simerson
e07488d4f6 hrmm, why didn't Test::Qpsmtpd::Plugin::log work? 2012-05-22 17:41:40 -04:00
Matt Simerson
2dcd34467e geoip: eval loading of Geo::IP, tests, enabled in config
eval Geo::IP and log an error if missing
added 2 tests
enabled in config/plugins
2012-05-22 17:40:02 -04:00
Matt Simerson
521aa4919f basicheaders, add reject option, loglevel
added reject option
document the existence of the loglevel option
factored date validity tests into their own sub
added tests
improved POD
2012-05-21 21:30:02 -04:00
Matt Simerson
9d0c2f8469 dnsbl, POD tweaks, DENY type tests
consolidated POD at top of file
added example options to reject_type POD head
added an example loglevel entry

consolidated DENY[SOFT|DISCONNECT] logic into get_reject_type
added tests for get_reject_type
2012-05-21 17:07:37 -04:00
Matt Simerson
51486d0b04 SPF plugin: refactored, tests, new config option
added POD description of spfquery note

changed spf_deny -> reject  (and offered 4 more options, see POD for reject)
	backwards compatible with old config settings
	replicates qmail-smtpd SPF patch behavior

improved logging (again)

uses a stringy eval 'use Mail::SPF' in the register sub. If missing, warn and log the error, and don't register any hooks. This is much nicer error than the current, "*** Remote host closed connection unexpectedly." broken mail server that results from enabling the SPF plugin without Mail::SPF installed.

background: I noticed I was deferring valid emails with the SPF plugin at 'spf_deny 1', and without changing the code, there wasn't a way to change how ~all records were handled. This provides that flexibility.
2012-05-21 04:19:45 -04:00
Matt Simerson
e8919beb0d increment test counter declaration 2012-05-20 23:40:39 -07:00