Jared Johnson
3bf1a7f48c
Better handling of testing temp files
...
Rather than creating and ignoring a bunch of random files, create files in
t/tmp, ignored in .gitignore and cleaned up with 'make clean'
2015-01-27 14:41:15 -06:00
Matt Simerson
178c5f6884
Merge pull request #196 from msimerson/dmarc
...
dmarc: add error handling and tests
2015-01-27 10:30:28 -08:00
Jared Johnson
0dcafcffb6
Add testing for prune_db() in plugins/greylisting
2015-01-27 10:45:10 -06:00
Jared Johnson
462a2ae367
Rename 'redis_server' arg to 'redis'
2015-01-23 15:15:04 -06:00
Jared Johnson
4f9af75e48
Make Redis optional
...
Previously the greylist plugin tried to use redis and fell back to DBM. This means that if a system already had an established DBM database, but happened to have Redis running, the existing DBM db would be abandoned for a new Redis DB. This would inevitably lead to more delays for legitimate mail, and possibly lost mail.
This adds a 'redis_server' argument which enables Redis and sets the location of the redis server; if it is not explicitly set, DBM is used instead.
If the redis server is unavailable, rather than failing to start QP, we instead fail to register the plugin.
2015-01-23 14:24:23 -06:00
Jared Johnson
63de50c808
Remove unused sub from greylist tests
...
Not sure how long ago this fell out of use and neither is the author
2015-01-22 23:44:52 -06:00
Matt Simerson
8185d33fa5
dmarc: add error handling and tests
2015-01-21 10:16:03 -08:00
Jared Johnson
f8e220e3b5
Handle missing GeoIP data gracefully
...
Previously, the GeoIP plugin would crash on certain missing GeoIP data.
Now it will continue to operate on whatever data it can get at.
Note that it already warns when any data it's looking for is missing.
2015-01-14 15:28:14 -06:00
Matt Simerson
4226dfaa3e
fcrdns: document the is_valid_localhost skip
...
with a logdebug line
2015-01-04 02:48:01 -05:00
Matt Simerson
296219c603
fcrdns: add tests and improved localhost detection
2015-01-04 02:03:09 -05:00
Jared Johnson
11646b9a27
Add Qpsmtpd::DB testing and more greylist testing
2014-12-30 14:53:53 -06:00
Jared Johnson
eb0ff1fe98
Get rid of grey_timeout and 'white' clients
...
These are noops: clients that retry before grey_timeout is exceeded and
clients that retry after grey_timeout is exceeded all pass greylisting until
expired by white_timeout.
2014-12-28 21:27:03 -06:00
Jared Johnson
c01cdffb08
Add testing for greylist()
2014-12-28 21:26:49 -06:00
Jared Johnson
bf8dc171a3
Don't disable greylist in absence of p0f argument
2014-12-22 16:09:41 -06:00
Jared Johnson
ea937f89dc
Warn about lack of ASN data when GeoIP2 is loaded
2014-12-18 13:30:26 -06:00
Jared Johnson
a9e7d00177
Tests exclude_connection() and exclude_recipient()
2014-12-11 16:55:59 -06:00
Jared Johnson
4ad56e4117
Add tests for check_genre()
2014-12-11 16:50:06 -06:00
Jared Johnson
ec470ed08e
Tests for ident/p0f rcpt_handler()
2014-12-11 16:29:07 -06:00
Jared Johnson
0a7c6f0f08
Tests for ident/p0f register_genre_blocking()
2014-12-11 16:06:54 -06:00
Jared Johnson
0d5ec185a8
Make fake_config() available to all plugin tests
2014-12-11 15:33:34 -06:00
Jared Johnson
4f4e19ba0a
Better fake_config() in t/plugin_tests/content_log
2014-12-11 15:31:23 -06:00
Jared Johnson
4547677135
Tests for ident/p0f register_headers()
2014-12-11 15:11:51 -06:00
Jared Johnson
b8e5e0a1b9
Make content log file configurable
2014-12-03 15:50:45 -06:00
Jared Johnson
64c7519d7c
content_log_enabled: Accept multiple 'true' values
2014-12-03 09:57:27 -06:00
Jared Johnson
e95f1e294e
Add method to exclude messages from content log
2014-12-02 17:13:00 -06:00
Jared Johnson
edc8f7600d
Test content_log enable/disable logic
2014-12-02 17:08:07 -06:00
Jared Johnson
ae887c156b
Add some basic testing for content_log
2014-12-02 17:02:45 -06:00
Jared Johnson
1d29db66ff
Move some DBM functions to Qpsmptd::DB::File::DBM
...
Not everything is moved and Qpsmtpd::DB* does not yet have test coverage
2014-11-25 17:52:18 -06:00
Jared Johnson
5fe9d80f9b
Clarify DBM-specific functions
...
This changes function names only
2014-11-24 17:09:42 -06:00
Jared Johnson
30dd9cafeb
Add some p0f results to message headers
2014-11-21 16:51:19 -06:00
Matt Simerson
fd11777892
Merge pull request #144 from grtodd/master
...
Add auth_imap plugin.
2014-11-15 12:08:25 -08:00
Graham Todd
29f12626a0
perltidy -b t/plugin_tests/auth/auth_imap
2014-11-15 08:40:34 -05:00
Jared Johnson
3b2b720ed5
Add tests for header addition
2014-11-13 13:52:49 -06:00
Jared Johnson
3ffee33d33
Remove extraneous semicolons
...
They confuse my editor
2014-11-11 16:59:40 -06:00
Matt Simerson
84db310736
geoip: don't run ASN tests if ASN db didn't load
2014-11-11 02:02:21 -05:00
Jared Johnson
2655e7b452
Add tests for exclude files
2014-11-06 17:02:27 -06:00
Graham Todd
fc50cc2629
Update pull request with suggested changes from feedback.
2014-11-06 15:37:40 -05:00
Matt Simerson
38d5523b35
Base: consistent DNS handling
2014-11-06 11:15:18 -08:00
Graham Todd
ceb7419578
Add auth_imap plugin.
2014-11-06 13:00:52 -05:00
Matt Simerson
54abd60239
strip off AS prefix
2014-11-05 14:30:23 -08:00
Matt Simerson
f2eda74074
ASN lookups now work
2014-11-05 14:30:22 -08:00
Matt Simerson
c61dbb5734
added GeoIP2 support, partial ASN support
2014-11-05 14:30:22 -08:00
Matt Simerson
9862cdc042
geoip: simplify the get/set data bits
2014-11-05 14:30:22 -08:00
Jared Johnson
b5d6c2e4c8
Add tests
2014-10-28 14:38:15 -05:00
Matt Simerson
a5420149bd
remove test counters from plugin tests
...
replace with done_testing(), which provides the same "make sure to kvetch if tests fail to run" without requiring humans to do the bookkeeping.
2014-09-17 00:11:32 -07:00
Jonathan Hall
f2bcd3736a
New tests to cover new handling of register-time configuration.
2014-09-16 14:04:37 -05:00
Jonathan Hall
3d97773827
Reverse sense of is_not_multipart to is_multipart.
2014-09-16 13:57:15 -05:00
Jonathan Hall
44cafde7d4
More complete clamdcscan tests
...
* construct our own Qpsmtpd::Transaction object for testing, so we're sure
to have a pristine state
* Move some logic into a should_scan() sub, to help separate scan_all from
is_not_multipart (since the multipart state of a message has nothing to
do with any configuration parameters)
2014-09-16 13:48:19 -05:00
Jonathan Hall
8344bf8439
Working toward functional virus/clamdscan tests.
2014-09-16 12:56:32 -05:00
Matt Simerson
ebdb25a4bd
extracted config*() from Qpsmtpd.pm -> Config.pm
...
* includes full test converage for Qpsmtpd::Config
* folded t/config.t into t/qpsmtpd-config.t
* includes additional tests for Qpsmtpd
* folded t/tempstuff into t/qpsmtpd.t
* PBP adjustments here and there
* other tweaks to handle test warnings
2014-09-15 23:41:31 -07:00