[PATCH] updated MANIFEST with lots of test files

2012-05-21 Thread Matt Simerson
--- MANIFEST | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/MANIFEST b/MANIFEST index 1a6384b..fbcd358 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,7 +1,9 @@ .gitignore +.travis.yml Changes config.sample/badhelo config.sample/badmailfrom +conf

[PATCH 4/4] auth: adding tests (should have attached with a previous commit)

2012-05-21 Thread Matt Simerson
--- t/Test/Qpsmtpd/Plugin.pm | 55 +++--- 1 file changed, 3 insertions(+), 52 deletions(-) diff --git a/t/Test/Qpsmtpd/Plugin.pm b/t/Test/Qpsmtpd/Plugin.pm index 6e7773d..cafa0d0 100644 --- a/t/Test/Qpsmtpd/Plugin.pm +++ b/t/Test/Qpsmtpd/Plugin.pm @@ -5,8

[PATCH 3/4] checkpassword: remove newlines that appeared

2012-05-21 Thread Matt Simerson
--- plugins/auth/auth_checkpassword |1 + 1 file changed, 1 insertion(+) diff --git a/plugins/auth/auth_checkpassword b/plugins/auth/auth_checkpassword index 4f4f9a2..28d7894 100644 --- a/plugins/auth/auth_checkpassword +++ b/plugins/auth/auth_checkpassword @@ -124,6 +124,7 @@ sub auth_checkp

[PATCH 1/4] auth: eval 'use' so plugins can be enabled by default

2012-05-21 Thread Matt Simerson
and tested. --- config.sample/plugins|4 config.sample/smtpauth-checkpassword |1 + plugins/auth/auth_vpopmail |4 ++-- plugins/auth/auth_vpopmail_sql |9 - 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 config.sam

[PATCH 2/4] auth_vpopmail_sql test, eval 'use DBI' before testing

2012-05-21 Thread Matt Simerson
--- t/plugin_tests/auth/auth_vpopmail |2 +- t/plugin_tests/auth/auth_vpopmail_sql | 13 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/t/plugin_tests/auth/auth_vpopmail b/t/plugin_tests/auth/auth_vpopmail index 11cbdfa..1c56609 100644 --- a/t/plugin_tests

Re: [PATCH 3/7] basicheaders, add reject option, loglevel

2012-05-21 Thread Matt Simerson
On May 21, 2012, at 3:26 PM, Jared Johnson wrote: >> There's several plugins that have something like what you've suggested: >> >> plugin action [ add-header | deny | denysoft ] >> >> And here's a sampling of the arguments that various plugins use with >> action: >> >> add-header, lo

PATCH: dnsbl, POD tweaks, DENY type tests

2012-05-21 Thread Matt Simerson
https://github.com/smtpd/qpsmtpd/pull/14 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

Re: [PATCH 3/7] basicheaders, add reject option, loglevel

2012-05-21 Thread Jared Johnson
> There's several plugins that have something like what you've suggested: > > plugin action [ add-header | deny | denysoft ] > > And here's a sampling of the arguments that various plugins use with > action: > > add-header, log, continue, reject, deny, denysoft, accept, delete, add > >

[PATCH] removed duplicated test name from test output

2012-05-21 Thread Matt Simerson
--- t/plugin_tests/check_badmailfrom | 33 - t/plugin_tests/check_badmailfromto |8 t/plugin_tests/ident/p0f | 15 +++ t/plugin_tests/rcpt_ok | 22 +++--- t/plugin_tests/sender_permitted_

[PATCH] SMTP: log denial message once (vs twice) at LOGINFO

2012-05-21 Thread Matt Simerson
--- lib/Qpsmtpd/SMTP.pm |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index 5394646..b426114 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -451,13 +451,13 @@ sub rcpt_respond { } elsif ($rc == DENY_DISCONN

[PATCH] make SPF level 2 a little more lenient

2012-05-21 Thread Matt Simerson
--- plugins/sender_permitted_from |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sender_permitted_from b/plugins/sender_permitted_from index 2353493..17805f1 100644 --- a/plugins/sender_permitted_from +++ b/plugins/sender_permitted_from @@ -167,7 +167,7 @@ sub hook_

PATCH: dnsbl, POD tweaks, DENY type tests

2012-05-21 Thread Matt Simerson
https://github.com/smtpd/qpsmtpd/pull/14 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 `

PATCH: earlytalker

2012-05-21 Thread Matt Simerson
https://github.com/smtpd/qpsmtpd/pull/15 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,

relay plugins

2012-05-21 Thread Matt Simerson
https://github.com/smtpd/qpsmtpd/pull/13 replaces 3 relay plugins (check_relay, check_norelay, relay_only) with a single plugin (relay). Same functionality. Bonus: includes tests. And a brief description of how the settings in the 3 config files interact. :) ```

[PATCH] domainkeys: fix failing tests

2012-05-21 Thread Matt Simerson
the previous DK commit moved the 'use Mail::DomainKeys::*' stuff into an eval. The right idea, but tests still fail because I forgot to remove the bare 'use' lines. --- plugins/domainkeys |3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/domainkeys b/plugins/domainkeys index 5f4b3

Re: [PATCH 2/2] enable domainkeys plugin by default

2012-05-21 Thread Matt Simerson
On May 21, 2012, at 8:32 AM, Ask Bjørn Hansen wrote: > > On May 21, 2012, at 3:04, Matt Simerson wrote: > > Merged; also merged the loglevel option patch, the greylisting notes and the > SPF refactoring. Nice work! > > The tests are failing though: > > http://travis-ci.org/#!/smtpd/qp

Re: [PATCH] basicheaders: Charlie's corrections

2012-05-21 Thread Ask Bjørn Hansen
On May 21, 2012, at 0:59, Matt Simerson wrote: >> Please combine this into the previous patch. Actually, I applied it >> anyway, see below. > > Most of the patches that are related, or are very big, are in their own > branch, and I've pushed the branches to github as well. Perhaps it would be

Re: [PATCH 2/2] enable domainkeys plugin by default

2012-05-21 Thread Ask Bjørn Hansen
On May 21, 2012, at 3:04, Matt Simerson wrote: Merged; also merged the loglevel option patch, the greylisting notes and the SPF refactoring. Nice work! The tests are failing though: http://travis-ci.org/#!/smtpd/qpsmtpd/builds/1390280 Ask

[PATCH 2/2] enable domainkeys plugin by default

2012-05-21 Thread Matt Simerson
The previous commit allows it to be enabled and not blow up if Mail::DomainKeys isn't installed --- config.sample/plugins |1 + 1 file changed, 1 insertion(+) diff --git a/config.sample/plugins b/config.sample/plugins index 0f96bfe..b3d35e2 100644 --- a/config.sample/plugins +++ b/config.sam

[PATCH 1/2] domainkeys: only register hooks if Mail::DomainKeys is loadable

2012-05-21 Thread Matt Simerson
--- plugins/domainkeys | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/plugins/domainkeys b/plugins/domainkeys index dfd4e8f..5f4b353 100644 --- a/plugins/domainkeys +++ b/plugins/domainkeys @@ -68,7 +68,22 @@ sub init { }; } -sub hook_data_post { +s

[PATCH] added loglevel option for plugins

2012-05-21 Thread Matt Simerson
Plugins can now use a 'loglevel' argument in config/plugins entry Includes user instructions prepended to docs/logging.pod Already works for all plugins that use named arguments --- docs/logging.pod | 121 - lib/Qpsmtpd/Plugin.pm | 29 +

[PATCH] greylisting: added upgrade note

2012-05-21 Thread Matt Simerson
--- UPGRADING | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/UPGRADING b/UPGRADING index 58330ac..5b15721 100644 --- a/UPGRADING +++ b/UPGRADING @@ -3,10 +3,20 @@ When upgrading from: v 0.84 or below -SPF plugin: spf_deny setting deprecated. Use reject

[PATCH] consolidate auth logic into Qpsmtpd::Auth

2012-05-21 Thread Matt Simerson
These 3 auth plugins all have a data store they fetch the reference password or hash from. They then match the attempted password or hash against the reference. This consolidates the latter portion (validating the password/hash) into Auth.pm. * less duplicated code in the plugins. * Pass validatio

[PATCH] earlytalker: many changes

2012-05-21 Thread Matt Simerson
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 log

[PATCH] make SPF level 2 a little more lenient

2012-05-21 Thread Matt Simerson
--- plugins/sender_permitted_from |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sender_permitted_from b/plugins/sender_permitted_from index 2353493..17805f1 100644 --- a/plugins/sender_permitted_from +++ b/plugins/sender_permitted_from @@ -167,7 +167,7 @@ sub hook_

[PATCH] SPF plugin: refactored, tests, new config option

2012-05-21 Thread Matt Simerson
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

Re: [PATCH] basicheaders: Charlie's corrections

2012-05-21 Thread Matt Simerson
On May 20, 2012, at 11:47 PM, Robert Spier wrote: > Please combine this into the previous patch. Actually, I applied it > anyway, see below. Most of the patches that are related, or are very big, are in their own branch, and I've pushed the branches to github as well. Perhaps it would be easi