PATCH: added auth_checkpassword plugin

2010-05-02 Thread Matt Simerson
authcheckpassword by Michael Holzt +and adapted by Johan Almqvist 2006-01-18 + +=head1 AUTHOR + +Matt Simerson msimer...@cpan.org + +=head1 COPYRIGHT AND LICENSE + +Copyright (c) 2010 Matt Simerson + +This plugin is licensed under the same terms as the qpsmtpd package itself. +Please see the LICENSE file

perltidy, bike sheds, and asbestos suits

2010-05-03 Thread Matt Simerson
There's a nifty .perltidyrc file in the git repo. There's also a lot of code that uses tab indents, 2 space indents, and 4 space indents. And of course, code that uses a mixture of the three, with local variations thrown in for good measure. I figure that the least invasive time to do a

[PATCH] spamassassin plugin sets $username for vpopmail per-user prefs

2010-05-07 Thread Matt Simerson
spamassassin plugin sets $username to first recipient in list when spamd_user config option is set to 'vpopmail'. This allows per-user SA prefs to function. From: Matt Simerson msimer...@perl.org --- plugins/spamassassin | 14 -- 1 files changed, 8 insertions(+), 6 deletions

[PATCH] tls plugin, added definedness test to $local_port

2010-05-07 Thread Matt Simerson
added defined test to $local_port. It was emitting errors due to not being defined. My previous commit to TcpServer.pm fixed the definition problem, this suppresses the error. --- plugins/tls |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/plugins/tls b/plugins/tls

[PATCH] remove vestiges of a bygone RCS

2010-05-07 Thread Matt Simerson
--- lib/Apache/Qpsmtpd.pm |2 -- lib/Qpsmtpd/ConfigServer.pm |2 -- plugins/content_log |1 - plugins/logging/file|1 - plugins/logging/syslog |1 - plugins/queue/exim-bsmtp|2 -- plugins/uribl |2 -- plugins/virus/clamav|

[PATCH] fix copy/paste error, where auth_flat_file methods were named authsql

2010-05-07 Thread Matt Simerson
--- plugins/auth/auth_flat_file|4 ++-- t/plugin_tests/auth/auth_flat_file |6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/auth/auth_flat_file b/plugins/auth/auth_flat_file index c6f1756..690957f 100644 --- a/plugins/auth/auth_flat_file +++

added p0f support to greylisting

2010-05-07 Thread Matt Simerson
added p0f support to greylisting, so that greylisting can be done selectively. greylisting DB location wasn't being set in tests, added '.' to candidate list added sample greylisting entry to config/plugins, disabled by default --- config.sample/plugins |1 + plugins/greylisting | 57

Re: perltidy, bike sheds, and asbestos suits

2010-05-10 Thread Matt Simerson
to the perltidy rules? If not, the .perltidy file should be removed entirely. Or splattered with comments that its presence is merely a suggestion, not an expectation. Matt Matt Simerson wrote: There's a nifty .perltidyrc file in the git repo. There's also a lot of code that uses tab

Re: [PATCH] tls plugin, added definedness test to $local_port

2010-05-10 Thread Matt Simerson
the 3rd and further lines for explanation. + =head3 Submit patches by mail The best way to submit patches to the project is to send them to the Matt Simerson wrote: added defined test to $local_port. It was emitting errors due to not being defined. My previous commit to TcpServer.pm fixed

Re: auth_vpopmaild added to repo

2010-05-10 Thread Matt Simerson
Merged into my branch. Not sure why we post such info the list, but I've been seeing others do it. So I'm doing it too. Matt On May 8, 2010, at 10:25 AM, Robin Bowes wrote: Hi, I committed my auth_vpopmaild plugin to my github fork [1]. I've also attached the patch against Ask's

[PATCH] added auth_checkpassword plugin

2010-05-10 Thread Matt Simerson
aren't using sudo, then remove $sudo from the open line. + +=head1 ACKNOWLEDGEMENTS + +based upon authcheckpassword by Michael Holzt +and adapted by Johan Almqvist 2006-01-18 + +=head1 AUTHOR + +Matt Simerson msimer...@cpan.org + +=head1 COPYRIGHT AND LICENSE + +Copyright (c) 2010 Matt Simerson

[PATCH 02/28] updates to auth_vpopmail_sql module

2010-05-10 Thread Matt Simerson
updates to auth_vpopmail_sql module - moved vpopmail database parameters into config files - added LIMITATIONS section to POD, noting no support for alias domains - renamed sub from authsql (too generic) to auth_vmysql --- plugins/auth/auth_vpopmail_sql | 63

Re: [PATCH 02/28] updates to auth_vpopmail_sql module

2010-05-10 Thread Matt Simerson
, Matt On May 10, 2010, at 4:13 PM, Matt Simerson wrote: updates to auth_vpopmail_sql module - moved vpopmail database parameters into config files - added LIMITATIONS section to POD, noting no support for alias domains - renamed sub from authsql (too generic) to auth_vmysql --- plugins/auth

[PATCH] added p0f support to greylist plugin

2010-05-10 Thread Matt Simerson
added p0f config option added POD docs to explain usage modified $dbdir selection logic. The previous logic failed when QPHOME was not selected (as is the case when tests are being run). Added '.' as the dir of last resort for $dbdir selection (others $EMPTY/dir dumped greylisting database in

[PATCH] added local_ip option to p0f plugin

2010-05-10 Thread Matt Simerson
/.p0f_socket local_ip 208.75.177.101 All code heavily based upon the p0fq.pl included with the p0f distribution. +=head1 ACKNOWLEDGEMENTS + +Heavily based upon the p0fq.pl included with the p0f distribution. + +=head1 AUTHORS + + Matt Simerson msimer...@cpan.org - 5/1/2010 + previous unnamed author

Re: perltidy, bike sheds, and asbestos suits

2010-05-10 Thread Matt Simerson
that pre-commit hook, and I'll update docs/development accordingly, making it ultimately easier on everyone to have consistently formatted files. Matt Matt Simerson wrote: There's a nifty .perltidyrc file in the git repo. There's also a lot of code that uses tab indents, 2 space

[PATCH] add TCPLOCAL* variables to $qp-connection

2010-05-10 Thread Matt Simerson
added remote_port, local_ip, local_port, and local_host to $qp-connection, as the p0f plugin relies on it. --- lib/Qpsmtpd/TcpServer.pm | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/lib/Qpsmtpd/TcpServer.pm b/lib/Qpsmtpd/TcpServer.pm index e2f380f..964b9db

Re: auth_vpopmaild added to repo

2010-05-10 Thread Matt Simerson
I'll do it. And update all 4 of the auth plugins that can be used with vpopmail to reference that document. Matt On May 10, 2010, at 9:07 PM, Robert Spier wrote: Ok, you've convinced me. We'll apply them all :) Can one of you (or both of you) create a patch for

Re: [PATCH] add TCPLOCAL* variables to $qp-connection

2010-05-10 Thread Matt Simerson
On May 10, 2010, at 9:17 PM, Robert Spier wrote: What about the non-TcpServer based engines? i.e. Apache, async, etc. As I'm unfamiliar with them, the best I could do is add some comments in there stating that someone who knows how those other engines work should add the code, and if they

[PATCH] add TCPLOCAL* variables to $qp-connection

2010-05-10 Thread Matt Simerson
(patch remade against latest rspier/qpsmtpd) added remote_port, local_ip, local_port, and local_host to $qp-connection, as the p0f plugin relies on it. added notes to TcpServer.pm and the p0f plugin noting the dependence, and the lack of support for models other than tcpserver. ---

[PATCH] added local_ip option to p0f plugin

2010-05-10 Thread Matt Simerson
will likely require some additional changes to make sure these fields are populated. +=head1 ACKNOWLEDGEMENTS + +Heavily based upon the p0fq.pl included with the p0f distribution. + +=head1 AUTHORS + + Matt Simerson msimer...@cpan.org - 5/1/2010 + previous unnamed author + =cut use IO::Socket

[PATCH] fix copy/paste error in auth_flat_file

2010-05-10 Thread Matt Simerson
correct copy/paste error, where auth_flat_file methods were named authsql in auth_flat plugin --- plugins/auth/auth_flat_file|4 ++-- t/plugin_tests/auth/auth_flat_file |6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/auth/auth_flat_file

[PATCH] added p0f support to greylist plugin

2010-05-10 Thread Matt Simerson
- these changes are in the previous TCPLOCAL patch. Documented here. added p0f config option added POD docs to explain usage modified $dbdir selection logic. The previous logic failed when QPHOME was not selected (as is the case when tests are being run). Added '.' as the dir of last resort for

[PATCH] rewrote sender_permitted_from

2010-05-10 Thread Matt Simerson
policy suggests it. Settings spf_deny to 2 is more aggressive and will cause soft failures to be rejected permanently. See also http://spf.pobox.com/ +=head1 AUTHOR + +Matt Simerson msimer...@cpan.org + +=head1 ACKNOWLEDGEMENTS + +whomever wrote the original SPF plugin, upon which I based

[PATCH] added auth_vpopmail plugin

2010-05-11 Thread Matt Simerson
John Peacock jpeac...@cpan.org +Matt Simerson msimer...@cpan.org (added VPOPMAIL) + =head1 COPYRIGHT AND LICENSE Copyright (c) 2004-2006 John Peacock diff --git a/plugins/auth/auth_checkpassword b/plugins/auth/auth_checkpassword index 6337ff7..c641293 100644 --- a/plugins/auth

[PATCH] packaging updates

2010-05-11 Thread Matt Simerson
added to MANIFEST plugins/check_bogus_bounce (already committed to abh/head) plugins/auth/auth_vpopmaild (imported by rspier) t/plugin_tests/greylisting (patch is pending import, with rspier suggestions included) added packaging to MANIFEST.SKIP --- MANIFEST |3 +++ MANIFEST.SKIP |

Re: [PATCH] add TCPLOCAL* variables to $qp-connection

2010-05-11 Thread Matt Simerson
as 671a6953b0c9503717bda10dd07f434cbd302c9c Matt Simerson wrote: (patch remade against latest rspier/qpsmtpd) added remote_port, local_ip, local_port, and local_host to $qp-connection, as the p0f plugin relies on it. added notes to TcpServer.pm and the p0f plugin noting the dependence

Re: [PATCH] packaging updates

2010-05-11 Thread Matt Simerson
unless the greylisting plugin is enabled. It is not enabled in the config.sample/plugins file. Matt Matt Simerson wrote: added to MANIFEST plugins/check_bogus_bounce (already committed to abh/head) plugins/auth/auth_vpopmaild (imported by rspier) t/plugin_tests/greylisting (patch is pending

Re: [PATCH] packaging updates

2010-05-11 Thread Matt Simerson
On May 11, 2010, at 9:34 PM, Robert Spier wrote: As previously noted, the greylisting tests are not run unless the greylisting plugin is enabled. It is not enabled in the config.sample/plugins file. This seems like a hole in our testing framework. I suspect we should have a t/config/

Re: perltidy, bike sheds, and asbestos suits

2010-05-12 Thread Matt Simerson
On May 11, 2010, at 11:00 PM, Ask Bjørn Hansen wrote: On May 11, 2010, at 21:25, Robert Spier wrote: Does anyone else have any opinions on doing a massive perltidy? I'm on the fence. I'm on the fence, too. My concern is mostly for the people with private patches / hacked up

Re: tls plugin and SSL version

2010-07-25 Thread Matt Simerson
Here's a chunk of code from one of my projects: A config file setting allows an admin to choose from; all, high, medium, or pci. my $s = $ciphers eq 'all'? 'ALL' : $ciphers eq 'high' ? 'HIGH:!SSLv2' : $ciphers eq 'medium' ? 'HIGH:MEDIUM:!SSLv2' : $ciphers eq

[PATCH 1/2] corrected email address

2010-07-25 Thread Matt Simerson
--- plugins/greylisting |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/plugins/greylisting b/plugins/greylisting index ebdec8f..7860b13 100644 --- a/plugins/greylisting +++ b/plugins/greylisting @@ -133,7 +133,7 @@ use something like File::NFSLock instead. Written by

[PATCH 2/2] increased default TLS security setting

2010-07-25 Thread Matt Simerson
switched default TLS security in config/tls_ciphers from HIGH to HIGH:!SSLv2. Added note for how to set the minimum level of security necessary for PCI compliance. --- config.sample/tls_ciphers |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git

[PATCH] add test name to test output

2010-07-25 Thread Matt Simerson
--- t/plugin_tests/check_badrcptto |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/t/plugin_tests/check_badrcptto b/t/plugin_tests/check_badrcptto index 9f7b9c9..b9a986d 100644 --- a/t/plugin_tests/check_badrcptto +++ b/t/plugin_tests/check_badrcptto @@ -5,5 +5,5 @@ sub

[PATCH] give badrcptto a reasonable name

2010-07-25 Thread Matt Simerson
renamed check_badrcptto test from foo to test_check_badrcptto_ok --- t/plugin_tests/check_badrcptto |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/plugin_tests/check_badrcptto b/t/plugin_tests/check_badrcptto index d10f992..9f7b9c9 100644 ---

Re: tls plugin and SSL version

2010-07-26 Thread Matt Simerson
On Jul 26, 2010, at 3:32 PM, Charlie Brady wrote: On Mon, 26 Jul 2010, Matt Simerson wrote: Please note that SSL_version is distinct from cipher list, and is not settable in the current code. Sure, but what types of SSL connections are allowed when we exclude the insecure SSLv2

Re: Announce: Haraka

2011-03-12 Thread Matt Simerson
On Mar 12, 2011, at 12:48 PM, Guy Hulbert wrote: So to do that I have basically ported Qpsmtpd to Node.js (and given it a decent name while doing so!). It's still early days - there are no plugins to speak of yet (i.e. no queue plugins at all yet), but you might be interested in just

Re: A basket of changes

2012-04-03 Thread Matt Simerson
We could easily add a suppress headers... config option. I would suggest instead editing the SpamAssassin config and not have those headers added in the first place... Sent from my iPad On Apr 3, 2012, at 7:09 AM, Jared Johnson jjohn...@efolder.net wrote: 6. spamassassin plugin: added

Re: A basket of changes

2012-04-03 Thread Matt Simerson
On Apr 3, 2012, at 7:09 AM, Jared Johnson wrote: 6. spamassassin plugin: added support for per-user SA config settings, rewrote header processing logic in spamassassin plugin so it adds all the SA generated X-Spam-* headers to the message. Refactored the code for better maintainability.

Re: A basket of changes

2012-04-06 Thread Matt Simerson
On Apr 3, 2012, at 12:13 PM, Matt Simerson wrote: On Apr 3, 2012, at 7:09 AM, Jared Johnson wrote: 6. spamassassin plugin: added support for per-user SA config settings, rewrote header processing logic in spamassassin plugin so it adds all the SA generated X-Spam-* headers to the message

[PATCH] fixed failing auths to auth/vpopmaild, added tests

2012-04-07 Thread Matt Simerson
robin.bo...@yo61.com +Matt Simerson (4/2012: added CRAM-MD5 support, updated response parsing) + =head1 COPYRIGHT AND LICENSE Copyright (c) 2010 Robin Bowes diff --git a/t/plugin_tests/auth/auth_vpopmail b/t/plugin_tests/auth/auth_vpopmail new file mode 100644 index 000..aefa3fd --- /dev/null +++ b

[PATCH] doc fix: changed $TRACE_LEVEL to $TraceLevel

2012-04-07 Thread Matt Simerson
--- README |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 05569da..2b68d0e 100644 --- a/README +++ b/README @@ -59,7 +59,7 @@ directory. Put the files there. If you install from git you can just do run the following command in the /home/smtpd/

[PATCH] updated URL to new github repo

2012-04-07 Thread Matt Simerson
--- docs/development.pod | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/development.pod b/docs/development.pod index 0f345e1..a77e00e 100644 --- a/docs/development.pod +++ b/docs/development.pod @@ -11,12 +11,12 @@ Subscribe by sending mail to

[PATCH] applied greylisting NFSLock patch

2012-04-07 Thread Matt Simerson
Issue #1 on Google issue tracker. The patch was 'accepted' by Ask in 2007, but never applied. --- plugins/greylisting | 70 ++- 1 file changed, 47 insertions(+), 23 deletions(-) diff --git a/plugins/greylisting b/plugins/greylisting index

[PATCH] suppress log error when $user unset

2012-04-07 Thread Matt Simerson
test for and return earlier when a null sender is encountered. Prevents using an undefined variable. --- plugins/sender_permitted_from | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/plugins/sender_permitted_from b/plugins/sender_permitted_from index

[PATCH] imported check_qmail_deliverable

2012-04-07 Thread Matt Simerson
requires Qmail::Deliverable, which is a modern replacement for the apparently popular but no longer available check_deliver plugin. --- STATUS |5 - plugins/check_qmail_deliverable | 202 +++ 2 files changed, 202 insertions(+), 5

[PATCH] spamassassin refactored, added per-user SA prefs, X-header fixes

2012-04-07 Thread Matt Simerson
the message to +spamd for re-processing with the recipients address. + + =head1 TODO Make the subject munge string configurable +=head1 CHANGES + +2012.04.02 - Matt Simerson + + * refactored for ease of maintenance + * added support for per-user SpamAssassin preferences + * updated get_spam_score so

logging

2012-04-07 Thread Matt Simerson
in config/logging, is it additive to qpsmtpd's default logging, or does it replace it? Are the above settings how they are/were supposed to work? Is that how we want them to work in the future? Matt ` Matt Simerson

[PATCH] improve grammar, update logging instructions

2012-04-07 Thread Matt Simerson
updated instructions for setting loglevel to use config/loglevel instead of editing lib/Qpsmtpd to set $TraceLevel --- README | 43 +-- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/README b/README index 2b68d0e..baf18b9 100644 ---

[PATCH] whitespace, copyright bump, simplify logic

2012-04-08 Thread Matt Simerson
--- lib/Qpsmtpd.pm| 25 +++-- t/Test/Qpsmtpd.pm |1 + 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index b9b068d..05c7475 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -57,7 +57,7 @@ sub TRACE_LEVEL {

[PATCH] fixed POD formatting

2012-04-08 Thread Matt Simerson
--- plugins/logging/file |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/logging/file b/plugins/logging/file index ba87b6c..35b6ffa 100644 --- a/plugins/logging/file +++ b/plugins/logging/file @@ -20,10 +20,10 @@ logging/file [loglevel Ilevel] [reopen]

[PATCH] dspam plugin

2012-04-19 Thread Matt Simerson
--- config.sample/plugins |2 + plugins/dspam | 341 + 2 files changed, 343 insertions(+) create mode 100644 plugins/dspam diff --git a/config.sample/plugins b/config.sample/plugins index 3ac4af1..451d749 100644 ---

[PATCH] fixed spelling error, added spf code to notes

2012-04-21 Thread Matt Simerson
--- plugins/sender_permitted_from |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/sender_permitted_from b/plugins/sender_permitted_from index 4204b93..1ba1254 100644 --- a/plugins/sender_permitted_from +++ b/plugins/sender_permitted_from @@ -56,7 +56,7 @@ sub

[PATCH] added option to skip SA when user is authenticated

2012-04-21 Thread Matt Simerson
--- plugins/spamassassin | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/plugins/spamassassin b/plugins/spamassassin index 890390d..4ca890e 100644 --- a/plugins/spamassassin +++ b/plugins/spamassassin @@ -59,7 +59,7 @@ C*** SPAM *** =item spamd_socket

[PATCH] added dspam 'reject agree' option, check for spamassassin note

2012-04-22 Thread Matt Simerson
When 'reject agree' is set, dspam will only reject emails if both SpamAssassin and dspam agree that the message is spam. dspam requires a fair bit of training. It seems to have a fairly high initial false positive rate, and this option allows dspam to reject most spam while allowing it's own

[PATCH] SpamAssassing plugin now saves results in a note

2012-04-22 Thread Matt Simerson
--- plugins/spamassassin |9 + 1 file changed, 9 insertions(+) diff --git a/plugins/spamassassin b/plugins/spamassassin index 4ca890e..534d712 100644 --- a/plugins/spamassassin +++ b/plugins/spamassassin @@ -11,6 +11,9 @@ from the SpamAssassin package. Fhttp://www.spamassassin.org

[PATCH] reduce the logging from 2 to 1 lines per recipient

2012-04-22 Thread Matt Simerson
reduce the check_qmail_deliverable plugin logging from 2 to 1 lines per recipient --- plugins/check_qmail_deliverable |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/check_qmail_deliverable b/plugins/check_qmail_deliverable index 6230e66..f966e7d 100755 ---

[PATCH] changed two log calls from INFO to DEBUG (more appropriate)

2012-04-22 Thread Matt Simerson
--- plugins/greylisting |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/greylisting b/plugins/greylisting index 1085224..19cb707 100644 --- a/plugins/greylisting +++ b/plugins/greylisting @@ -250,7 +250,7 @@ sub denysoft_greylist { $dbdir = $d; } my $db

[PATCH] don't print GeoIP country if not defined

2012-04-22 Thread Matt Simerson
don't print GeoIP country if not defined (suppress warning) If we don't get a result from the lookup, all we know is that we didn't get a result. Maybe an error, maybe the IP not in the database. --- plugins/ident/geoip | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-)

[PATCH] prepend auth_flat plugin name to $note

2012-04-22 Thread Matt Simerson
Makes it much easier to figure out where that log entry came from. --- t/plugin_tests/auth/auth_flat_file |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/plugin_tests/auth/auth_flat_file b/t/plugin_tests/auth/auth_flat_file index c4218bd..6726307 100644 ---

Re: [PATCH] don't print GeoIP country if not defined

2012-04-23 Thread Matt Simerson
it all at once? I agree entirely. If you will recall, I tried the 'do it all at once' approach a year ago. I would love to see the entire code base run through perltidy and committed. Matt On Sun, Apr 22, 2012 at 2:25 PM, Matt Simerson m...@tnpi.net wrote: don't print GeoIP country

Re: [PATCH] SpamAssassing plugin now saves results in a note

2012-04-23 Thread Matt Simerson
On Apr 22, 2012, at 11:46 PM, Robert Spier rsp...@pobox.com wrote: On Sun, Apr 22, 2012 at 2:22 PM, Matt Simerson m...@tnpi.net wrote: --- plugins/spamassassin |9 + 1 file changed, 9 insertions(+) diff --git a/plugins/spamassassin b/plugins/spamassassin index 4ca890e

Re: [PATCH] prepend auth_flat plugin name to $note

2012-04-23 Thread Matt Simerson
On Apr 22, 2012, at 11:43 PM, Robert Spier wrote: On Sun, Apr 22, 2012 at 2:25 PM, Matt Simerson m...@tnpi.net wrote: Makes it much easier to figure out where that log entry came from. --- t/plugin_tests/auth/auth_flat_file |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] refactored p0f plugin, added p0f v3 support

2012-04-26 Thread Matt Simerson
sure these fields are populated. =head1 ACKNOWLEDGEMENTS -Heavily based upon the p0fq.pl included with the p0f distribution. +Version 2 code heavily based upon the p0fq.pl included with the p0f distribution. =head1 AUTHORS - Matt Simerson msimer...@cpan.org - 5/1/2010 - previous unnamed author

[PATCH] merged check_badmailfrom_patterns into check_badmailfrom

2012-04-26 Thread Matt Simerson
and plugin tests - Matt Simerson m...@tnpi.net - my $host = lc $sender-host; - my $from = lc($sender-user) . '@' . $host; +=cut - for my $config (@badmailfrom) { -my ($bad, $reason) = $config =~ /^\s*(\S+)(?:\s*(.*))?$/; -$reason = sorry, your envelope sender is in my badmailfrom list

[PATCH] changed spamassassin plugin note to plugin name

2012-04-26 Thread Matt Simerson
per Robert's comments. --- plugins/dspam|6 +++--- plugins/spamassassin |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/dspam b/plugins/dspam index d6ef1ce..6f6c19a 100644 --- a/plugins/dspam +++ b/plugins/dspam @@ -320,8 +320,8 @@ sub

[PATCH] fixed POD typo s/te/the/

2012-04-26 Thread Matt Simerson
--- lib/Qpsmtpd.pm |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index 644caed..dbbd2a0 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -623,7 +623,7 @@ Lhttp://smtpd.develooper.com/ and the IREADME file for more information. =head1

Re: [PATCH] don't print GeoIP country if not defined

2012-04-28 Thread Matt Simerson
On Apr 28, 2012, at 10:48 AM, Robert Spier wrote: On Mon, Apr 23, 2012 at 8:39 AM, Matt Simerson m...@tnpi.net wrote: On Apr 22, 2012, at 11:45 PM, Robert Spier rsp...@pobox.com wrote: This change contains a bunch of unnecessary whitespace changes. This can make it hard to trace back

Re: future directions

2012-04-28 Thread Matt Simerson
I'm all in favor. I'm doing more work on plugins right now and have a bunch more changes in the pipes. Most of the changes revolve around several practices which I think all plugins should adhere to: One thing that would help is if you could split your changes into multiple pull

Re: [smtpd/qpsmtpd] 368ce9: merged check_badmailfrom_patterns into check_badma...

2012-04-29 Thread Matt Simerson
: Matt Simerson m...@tnpi.net Date: 2012-04-29 (Sun, 29 Apr 2012) Changed paths: M plugins/check_badmailfrom R plugins/check_badmailfrom_patterns A t/plugin_tests/check_badmailfrom Log Message: --- merged check_badmailfrom_patterns into check_badmailfrom

[PATCH 1/4] spamassassin plugin tests and updates

2012-04-30 Thread Matt Simerson
parsing of the X-Spam-Status header now uses split instead of a regexp. Mining a collection of mail headers revealed that the regexp was not as robust as it could be. Now the parsing should work for everyone, regardless of how they configure SpamAssassin. the spamassassin note is now a hashref

[PATCH 2/4] tests for the spamassassin plugin

2012-04-30 Thread Matt Simerson
--- t/plugin_tests/spamassassin | 147 +++ 1 file changed, 147 insertions(+) create mode 100644 t/plugin_tests/spamassassin diff --git a/t/plugin_tests/spamassassin b/t/plugin_tests/spamassassin new file mode 100644 index 000..5056a16 --- /dev/null +++

[PATCH 3/4] dspam plugin updated for SA note parsing

2012-04-30 Thread Matt Simerson
spamassassin note is good enough now that dspam has no need to parse headers. Yay. --- plugins/dspam | 44 ++-- 1 file changed, 10 insertions(+), 34 deletions(-) diff --git a/plugins/dspam b/plugins/dspam index b86583e..4bc3203 100644 --- a/plugins/dspam

[PATCH 4/4] dspam plugin tests

2012-04-30 Thread Matt Simerson
much better logging of disposition replaced header parsing regexp with split. faster and more robust. store the dspam results in a note quiet some of the debug logging --- plugins/dspam| 74 +++--- t/plugin_tests/dspam | 98

Re: future directions

2012-04-30 Thread Matt Simerson
On Apr 29, 2012, at 11:45 PM, Michael Papet wrote: As it stands, there's often no way to answer questions like, 'how much of my ham will fail this test?' or 'will I lose valid mail using plugin X?' It's completely nebulous. When I need this, I use logging. I flip qpsmtpd into info mode

Re: future directions

2012-05-01 Thread Matt Simerson
On Apr 30, 2012, at 11:38 PM, Robert Spier wrote: On Mon, Apr 30, 2012 at 1:56 PM, Matt Simerson m...@tnpi.net wrote: On Apr 29, 2012, at 11:45 PM, Michael Papet wrote: As it stands, there's often no way to answer questions like, 'how much of my ham will fail this test?' or 'will I

uniform plugin logging

2012-05-01 Thread Matt Simerson
My Goals 1. logs that are easy for humans to observe and parse 2. logs entries that have a consistent syntax. This would enable us to write log processors that could accurately summarize the logs and spit out statistics for apps like munin, rrdtool, nagios, et al. Regardless of which logging

[PATCH] enable plugin syntax checks for developers

2012-05-06 Thread Matt Simerson
enable plugin syntax checks for developers --- t/01-syntax.t |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/01-syntax.t b/t/01-syntax.t index d7dafd1..5be4de7 100644 --- a/t/01-syntax.t +++ b/t/01-syntax.t @@ -35,7 +35,7 @@ my @files = find( {wanted=\test_syntax,

[PATCH] SMTP.pm, add missing ; and remove useless if

2012-05-06 Thread Matt Simerson
SMTP.pm, add missing ; and remove useless if --- lib/Qpsmtpd/SMTP.pm |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index 7c126dd..d8734b6 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -54,18 +54,14 @@ sub

[PATCH] confine SMTP.pm duplicate logging to LOGDEBUG

2012-05-06 Thread Matt Simerson
confine SMTP.pm duplicate logging to LOGDEBUG --- 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 7c126dd..bb03011 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -313,7 +313,7 @@ sub mail

[PATCH] improve readability in SMTP::auth_parse_respond

2012-05-06 Thread Matt Simerson
improve readability in SMTP::auth_parse_respond --- lib/Qpsmtpd/SMTP.pm | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index 7c126dd..3df02f1 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -265,26

[PATCH] enable plugin syntax checks for developers

2012-05-06 Thread Matt Simerson
enable plugin syntax checks for developers --- t/01-syntax.t |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/01-syntax.t b/t/01-syntax.t index d7dafd1..5be4de7 100644 --- a/t/01-syntax.t +++ b/t/01-syntax.t @@ -35,7 +35,7 @@ my @files = find( {wanted=\test_syntax,

[PATCH] added FAQ with 3 answers.

2012-05-06 Thread Matt Simerson
added FAQ with 3 answers. --- FAQ.pod | 47 +++ 1 file changed, 47 insertions(+) create mode 100644 FAQ.pod diff --git a/FAQ.pod b/FAQ.pod new file mode 100644 index 000..68e8806 --- /dev/null +++ b/FAQ.pod @@ -0,0 +1,47 @@ +# best read with

[PATCH] in log entries, print hook name first

2012-05-06 Thread Matt Simerson
in log entries, print hook name first, so log entries look like this: 86553 (connect) ident::geoip: US, United States 86553 (connect) ident::p0f: Windows 7 or 8 86553 (connect) check_earlytalker: remote host said nothing spontaneous, proceeding instead of this: 86553 ident::geoip: (connect):

[PATCH] improved readability of default logging logic

2012-05-06 Thread Matt Simerson
--- lib/Qpsmtpd.pm | 30 ++ plugins/logging/warn | 17 + 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index dbbd2a0..5d23211 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -125,17 +125,18

[PATCH] removed TODO, p0f v3 doesn't need that extra info

2012-05-06 Thread Matt Simerson
removed TODO, p0f v3 doesn't need that extra info removed some stray EOL chars --- lib/Qpsmtpd/TcpServer.pm | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/Qpsmtpd/TcpServer.pm b/lib/Qpsmtpd/TcpServer.pm index de3504f..7215090 100644 ---

[PATCH] moved POD to top of file

2012-05-06 Thread Matt Simerson
moved POD to top of file all but 3 plugins have their POD at the top of the file. Bring these little lost sheep into the barn. --- plugins/auth/auth_ldap_bind | 162 +-- plugins/domainkeys | 57 +++ plugins/rhsbl | 51

[PATCH] badmailfromto: added strictures, tests, and

2012-05-06 Thread Matt Simerson
badmailfromto: added strictures, tests, and rearranged portions of logic for ease of reading --- plugins/check_badmailfromto| 68 t/plugin_tests/check_badmailfromto | 36 +++ 2 files changed, 82 insertions(+), 22 deletions(-) create

[PATCH] make authdeny POD docs match plugin name

2012-05-06 Thread Matt Simerson
make authdeny POD docs match plugin name I would rather the plugin were named auth_deny as the POD has, but renaming plugins is currently a sticky mess due to backwards compatibility. --- plugins/auth/authdeny |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] added vpopmail_sql db connect error handling.

2012-05-06 Thread Matt Simerson
added vpopmail_sql db connect error handling. --- plugins/auth/auth_vpopmail_sql |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/auth/auth_vpopmail_sql b/plugins/auth/auth_vpopmail_sql index 99b4f1d..1f9e302 100644 --- a/plugins/auth/auth_vpopmail_sql +++

[PATCH] converted comments to POD

2012-05-06 Thread Matt Simerson
converted comments to POD --- plugins/check_relay | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/plugins/check_relay b/plugins/check_relay index fcb3054..06034e7 100644 --- a/plugins/check_relay +++ b/plugins/check_relay @@ -1,9 +1,19 @@ #!perl -w -# this

[PATCH] Command.pm, promoted strictures to 1st line of code

2012-05-06 Thread Matt Simerson
Command.pm, promoted strictures to 1st line of code --- lib/Qpsmtpd/Command.pm |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Qpsmtpd/Command.pm b/lib/Qpsmtpd/Command.pm index d6a722e..e48c0f2 100644 --- a/lib/Qpsmtpd/Command.pm +++ b/lib/Qpsmtpd/Command.pm @@ -53,10

[PATCH] added logging and tests to check_badmailfrom

2012-05-06 Thread Matt Simerson
added logging and tests to check_badmailfrom refactored several checks out of hook_mail and added LOGDEBUG added tests for is_immune method --- plugins/check_badmailfrom| 27 +++ t/plugin_tests/check_badmailfrom | 29 - 2 files

[PATCH] domainkeys: added reject reject_type options.

2012-05-06 Thread Matt Simerson
is free software; you can redistribute it and/or modify it under the same terms as Perl itself. +=head1 AUTHORS + + Matt Simerson- 2012 + John Peacock - 2005-2006 + Anthony D. Urso. - 2004 + =cut +use strict; +use warnings; + +use Qpsmtpd::Constants; + +use Mail::DomainKeys::Message; +use Mail

[PATCH] more shebang fixes

2012-05-06 Thread Matt Simerson
more shebang fixes --- t/plugin_tests/auth/auth_flat_file |2 +- t/plugin_tests/auth/auth_vpopmail |2 +- t/plugin_tests/auth/auth_vpopmail_sql |2 +- t/plugin_tests/auth/auth_vpopmaild |2 +- t/plugin_tests/auth/authdeny |2 +- t/plugin_tests/auth/authnull

[PATCH] refactored dnsbl, sprinkling logs and tests on it

2012-05-06 Thread Matt Simerson
refactored dnsbl, sprinkling logs and tests on it --- plugins/dnsbl| 152 -- t/plugin_tests/dnsbl | 76 - 2 files changed, 149 insertions(+), 79 deletions(-) diff --git a/plugins/dnsbl b/plugins/dnsbl index

[PATCH] confine duplicate Auth log entry to LOGDEBUG

2012-05-06 Thread Matt Simerson
confine duplicate Auth log entry to LOGDEBUG --- lib/Qpsmtpd/Auth.pm |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Qpsmtpd/Auth.pm b/lib/Qpsmtpd/Auth.pm index 422c3f4..a6f0977 100644 --- a/lib/Qpsmtpd/Auth.pm +++ b/lib/Qpsmtpd/Auth.pm @@ -103,7 +103,7 @@ sub SASL {

[PATCH] auth_checkpassword refactored and better tested

2012-05-06 Thread Matt Simerson
auth_checkpassword refactored and better tested added support for configuration arguments in plugins/config test ability to run during register, instead of failing later. added logging for additional errors. tests are automatically skipped if they aren't likely to succeed (no vpopmail

[PATCH] instead of skipping test errors, handle them

2012-05-06 Thread Matt Simerson
instead of skipping test errors, handle them --- t/01-syntax.t | 62 +++-- 1 file changed, 29 insertions(+), 33 deletions(-) diff --git a/t/01-syntax.t b/t/01-syntax.t index 5be4de7..885ca3e 100644 --- a/t/01-syntax.t +++ b/t/01-syntax.t @@

[PATCH] extend syntax tests to test directory

2012-05-06 Thread Matt Simerson
extend syntax tests to test directory lets see what Travis thinks of this... (it turned out okay) --- t/01-syntax.t |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/01-syntax.t b/t/01-syntax.t index 885ca3e..82ffeb4 100644 --- a/t/01-syntax.t +++ b/t/01-syntax.t @@ -15,7

  1   2   3   >