Commit Graph

620 Commits

Author SHA1 Message Date
Jared Johnson
dcdda3a5e7 Don't interpret invalid return codes as OK 2015-02-03 17:01:52 -06:00
Jared Johnson
b3f8ce6b07 Tests for error logging in run_continuation() 2015-02-03 16:44:06 -06:00
Matt Simerson
d9ac50f383 make sure $transaction->notes is blessed before
calling it as such. It doesn't resolve #199 but it does help there.

I'm not sure initializing Qpsmtpd::transaction as {} is a brilliant idea, but I haven't a better solution for that yet.
2015-01-29 11:25:14 -08:00
Matt Simerson
cad4f2b1d6 TcpServer: don't 'use parent Qpsmtpd::Base'
it breaks stuff. Instead, grab a base object and use it
2015-01-29 00:15:43 -08:00
Matt Simerson
98d148a0bf refactor start_connection 2015-01-29 00:04:13 -08:00
Matt Simerson
d81b2d4331 Merge pull request #147 from msimerson/tcpserver
update tcpenv and lrpip calls to use -> syntax
2015-01-28 20:08:53 -08:00
Matt Simerson
be9f4aef0c update tcpenv and lrpip calls to use -> syntax
don't load plugins twice.

Not exactly sure where that feature crept in some time ago. It was suppressed by checking to see if a queue plugin was already registered, and then bailing out on subsequent register_hook runs. I noticed it in testing, b/c I didn't have a queue plugin loaded. This removes the duplicate calls to register_hook.

* adds caching of the AUTH methods. You can't add new plugins or register new
  hooks w/o restarting QP, so cache the list and avoid having to generate it on every connection.

* other PBP changes (early exits, less indention, fewer unnecessary parens, etc.)
2015-01-28 19:58:58 -08:00
Jared Johnson
3b0d60545d Tests for Qpsmtpd::Plugin::register_hook() 2015-01-28 17:23:21 -06:00
Jared Johnson
113becf8be Get rid of Qpsmtpd::DB::File
DBM is probably the only file format we'll ever support anyhow
2015-01-27 15:55:53 -06:00
Jared Johnson
b6311caae0 Pass multiple keys to del() to speed up prune_db() 2015-01-27 11:50:55 -06:00
Jared Johnson
1320a01f46 Speed up prune_db() with new Qpsmtpd::DB::mget()
This reduces round trips to Redis, speeding up DB pruning,
especially over a network
2015-01-27 10:59:47 -06:00
Jared Johnson
e76b6a9048 Fix consistency problems with DBM store
Destroy the AnyDBM-tied hash after untying

Google's wisdom seems to indicate that leaving the AnyDBM-tied hash around after
untying it was causing data to not flush to the DBM file... or something. At any
rate the regression test added here confirms inconsistency when using multiple
instances which is fixed by destroying the AnyDBM-tied hash after untying.
2015-01-21 16:43:23 -06:00
Matt Simerson
376498f2e8 Merge pull request #190 from msimerson/use-lib
remove instances of: use lib 'lib' in lib/ and
2015-01-21 10:06:07 -08:00
Matt Simerson
391dfc9309 Merge pull request #189 from msimerson/auth-results
completed DKIM signing detection to A-R header
2015-01-21 10:00:55 -08:00
Priyadi Iman Nurcahyo
3ef92f214e Change Received header ordering when using SSL 2015-01-13 05:40:16 +00:00
Matt Simerson
c6918d10ca remove instances of: use lib 'lib' in lib/ and
plugins/
2015-01-04 17:13:50 -08:00
Matt Simerson
62a063b366 completed DKIM signing detection to A-R header
cleaning function, making it 'safe'

* added test coverage to authentication_results and clean_authentication_results
2015-01-04 14:27:59 -08:00
Matt Simerson
31fb710792 add group write permissions to default DBs 2015-01-04 12:22:51 -08:00
Matt Simerson
4a11e2cb71 Revert "Turn warnings into $qpsmtpd->log() calls" 2015-01-03 21:45:59 -08:00
Matt Simerson
96c0e29ae3 correct HELO respond error causing timeout 2015-01-04 00:11:53 -05:00
Jared Johnson
a308e53aa7 Merge pull request #156 from msimerson/smtp
moved SMTP changes into new PR
2014-12-30 16:47:23 -06:00
Matt Simerson
a515e2b17c Merge pull request #171 from priyadi/authresultfix
Authentication-Results header fix on data_post
2014-12-30 13:58:21 -08:00
Jared Johnson
6e3e605c66 Avoid test failure when Redis.pm is unavailable 2014-12-30 15:10:32 -06:00
Jared Johnson
80e4629f9d Qpsmtpd::DB::Redis simplifications 2014-12-30 14:53:53 -06:00
Jared Johnson
11646b9a27 Add Qpsmtpd::DB testing and more greylist testing 2014-12-30 14:53:53 -06:00
Jared Johnson
fa2ca922c5 Add Qpsmtpd::DB::Redis 2014-12-30 14:53:53 -06:00
Jared Johnson
ecb6d2c1d5 Update Qpsmtpd::DB to work with multiple stores 2014-12-30 14:53:53 -06:00
Jared Johnson
ba659461b5 Avoid warnings for Qpsmtpd::Address->new(undef) 2014-12-30 13:51:04 -06:00
Matt Simerson
e9497d7e51 moved SMTP changes into new PR 2014-12-26 22:15:05 -08:00
Priyadi Iman Nurcahyo
bd2f30bdad Keep data_post hook, and add data_post_headers 2014-12-24 02:40:07 +00:00
Priyadi Iman Nurcahyo
f8c49b6067 Authentication-Results header fix on data_post 2014-12-23 18:53:13 +00:00
Jared Johnson
4d59ce8406 Fix unstable use of $1 in Qpsmtpd::warn_level() 2014-12-17 16:11:12 -06:00
Jared Johnson
1d01a85542 Change qw() to qw[] in warn_level() 2014-12-15 20:22:28 -06:00
Jared Johnson
d3ec361ab8 Turn warnings into $qpsmtpd->log() calls
This can be convenient, especially when one wants to emit a warning that will
show up when running the test suite but still be properly logged in production
2014-12-15 20:07:45 -06:00
Jared Johnson
ef26c61b6d Use Qpsmtpd::DB in karma plugin
And clean up a few things in Qpsmtpd::DB
2014-11-26 16:28:52 -06:00
Jared Johnson
72c9c79f31 Move the rest of DBM operations to Qpsmtpd::DB 2014-11-26 16:06:24 -06:00
Jared Johnson
66ba031240 Get rid of experimental 'use lib' thing 2014-11-26 12:03:03 -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
971e6ab0e8 perltidy -b lib/Qpsmtpd/Plugin.pm 2014-11-14 15:24:30 -06:00
Jared Johnson
2c3a601ff0 use parent 2014-11-14 10:57:52 -06:00
Jared Johnson
cf09a662ad New convention for calling Qpsmtpd::Base stuff
I think
2014-11-13 16:29:52 -06:00
Jared Johnson
3ffee33d33 Remove extraneous semicolons
They confuse my editor
2014-11-11 16:59:40 -06:00
Matt Simerson
924dbfe5de async_resolver: suppress test warning when
Net::DNS::Async not installed.
2014-11-06 11:15:18 -08:00
Matt Simerson
38d5523b35 Base: consistent DNS handling 2014-11-06 11:15:18 -08:00
Matt Simerson
149063d37f base: removed redundant code from is_ipv6 2014-11-05 14:31:44 -08:00
Matt Simerson
f2eda74074 ASN lookups now work 2014-11-05 14:30:22 -08:00
Matt Simerson
4a4a5d047e correct spelling of deprecated 2014-11-04 12:50:39 -08:00
Matt Simerson
7576e64f70 Address: renamed $domain/$domain_re (clearer)
and added a couple more tests
2014-09-22 10:33:15 -07:00
Matt Simerson
2aaedbb445 address: added tests for canonify 2014-09-21 16:52:30 -07:00
Jonathan Hall
374dbfdd35 Correct some spellification. 2014-09-19 19:06:48 -05:00