Commit Graph

76 Commits

Author SHA1 Message Date
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
Jared Johnson
3b0d60545d Tests for Qpsmtpd::Plugin::register_hook() 2015-01-28 17:23:21 -06:00
Matt Simerson
c6918d10ca remove instances of: use lib 'lib' in lib/ and
plugins/
2015-01-04 17:13:50 -08: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
fa2ca922c5 Add Qpsmtpd::DB::Redis 2014-12-30 14:53:53 -06: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
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
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
3ffee33d33 Remove extraneous semicolons
They confuse my editor
2014-11-11 16:59:40 -06:00
Matt Simerson
38d5523b35 Base: consistent DNS handling 2014-11-06 11:15:18 -08:00
Jonathan Hall
897a1fd8aa Remove a ton of 'return ()', and a few other minor readability tweaks. 2014-09-17 20:28:51 -05:00
Matt Simerson
1e5d249224 added tests for run_hooks & run_hooks_no_respond 2014-09-17 13:03:46 -07:00
Matt Simerson
f8e2fdb966 more tests for Qpsmtpd.pm 2014-09-15 18:54:10 -07:00
Jared Johnson
b22d037c39 Add hook_user_config
This adds a hook_user_config for plugins designed to return per-user
configuration directives.  Qpsmtpd::Address::config() triggers a
hook_user_config plugin.
2014-09-15 16:53:09 -05:00
Matt Simerson
2416d1e940 Plugin.pm: made is_naughty is now a getter too 2013-12-17 23:43:26 -05:00
Matt Simerson
4d489ea6ef tested and working Authentication-Results
changed the method of saving results. Instead of appending to/from a header, plugins save results to a connection note.

Qpsmtpd::SMTP.pm has a new method that inserts the Authentication-Results header
The smtp-auth information has been removed from the Received header

Authentication-Results providing plugins have been updated to store results in connection note
2013-08-05 15:05:38 -07:00
Matt Simerson
4ae16219bd added Authentication-Results header, with provider
dkim, dmarc, fcrdns (iprev), spf, and smtp-auth
2013-08-05 15:05:38 -07:00
Matt Simerson
247c5a2bea is_naughty is a setter now too 2013-08-05 15:05:38 -07:00
Matt Simerson
bbc6e895cc distinguish rejecting versus tolerated failures 2013-08-05 15:05:36 -07:00
Matt Simerson
dbcc3d40b4 split is_immune into itself + is_naughty
is_immune tests designates to plugins they should always skip processing.

That's typical for naughty connections, but this change provides the ability to handly naughty connections differently than (whitelisted/relayclients/known good) senders.
2013-08-05 15:05:36 -07:00
Matt Simerson
c3b8df645c Plugin: override dns_timeout by passing in a value 2013-08-05 15:05:15 -07:00
Matt Simerson
5b06929e95 find . -name '*.pm' -exec perltidy -b {} \; 2013-08-05 15:05:15 -07:00
Matt Simerson
2f3127359d moved triplicated init_resolver into Plugin.pm 2013-08-05 15:05:13 -07:00
Matt Simerson
5b74b9c1d3 Q:Plugin.pm: abstracted out store_deferred_reject 2013-08-05 15:05:13 -07:00
Matt Simerson
9ed3843b53 adjust_karma now increments properly 2013-08-05 15:05:11 -07:00
Matt Simerson
9a8bc0286c added missing semicolon 2013-08-05 15:04:51 -07:00
Matt Simerson
01d7c7e228 karma: added adjust_karma method
makes it easier to set karma in plugins
2013-08-05 15:04:12 -07:00
Matt Simerson
9e665ba2b7 added missing semicolon 2013-08-05 15:01:53 -07:00
Matt Simerson
2fc909b809 karma: added adjust_karma method
makes it easier to set karma in plugins
2013-08-05 15:01:52 -07:00
Matt Simerson
d5ccedd37e Plugin.pm: more descriptive variable names
append optional log_mess to log entry (more description)
subsequent attempts to set naughty don't overwrite the first
set the naughty rejection type to be the reject type of the plugin that marked the connection naughty
get_reject_type can be passed an explicit default
2013-08-05 15:01:47 -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
041f64a474 renamed reaper -> naughty 2012-06-04 03:34:59 -04:00
Matt Simerson
0d2a9bf887 Plugin.pm: added is_immune 2012-06-04 03:34:48 -04:00
Matt Simerson
efbaf2ec6f added loglevel option for plugins
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
2012-05-21 05:34:37 -04:00
Matt Simerson
ae3fe2e4d5 cleanups for Auth::validate_password commit
one for testing to work again
and one to remove MD5 dependency in Plugin.pm
2012-05-20 23:37:16 -07:00
Matt Simerson
35e1ce9883 consolidate auth logic into Qpsmtpd::Auth
These 3 auth plugins all have a data store they fetch the reference
password or hash from. They then match the attemped 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 validation consistently handled for these 3 plugins.
* less work to create new auth plugins

Also caches the CRAM-MD5 ticket. It could also cache user/pass info if
this was desirable.
2012-05-20 23:37:06 -07:00
Karl Y. Pradene
059771d31d End of headers hook: data_headers_end
Hook after receiving all headers lines. Defaults to nothing,
just continue processing. At this step, sender does not wait for a reply,
but we can stop him from sending remaining data by disconnecting.

(Cleaned up by Robert for english and coding style.)

Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
Signed-off-by: Robert Spier <robert@perl.org>
2009-02-10 02:49:38 -05:00
Radu Greab
90e60d3d4f Allow plugins to use the post-fork hook.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@877 958fd67b-6ff1-0310-b445-bb7760255be9
2008-05-01 06:11:22 +00:00
Matt Sergeant
214e7e0ec0 More crazy performance stuff
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@845 958fd67b-6ff1-0310-b445-bb7760255be9
2008-02-08 21:26:25 +00:00
Hanno Hecker
2f3a326e11 Pluggable hook "noop" with example plugin (noop_counter) and doc update.
... now check_earlytalker can be expanded to VRFY and NOOP (see RFC 1854, #2.1)


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@836 958fd67b-6ff1-0310-b445-bb7760255be9
2008-01-24 18:43:34 +00:00
Hanno Hecker
bb75098a84 add missing entry "vrfy" in @hooks, to make hook_vrfy() work
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@834 958fd67b-6ff1-0310-b445-bb7760255be9
2008-01-19 15:09:07 +00:00
Hanno Hecker
bf88f1ee99 Pluggable help, based on patch by Jose Luis Martinez
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@825 958fd67b-6ff1-0310-b445-bb7760255be9
2007-12-07 09:12:15 +00:00
Hanno Hecker
a5c22bcb7c Fix Qpsmtpd::Plugins::isa_plugin() with multiple plugin dirs (Gavin Carr)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@783 958fd67b-6ff1-0310-b445-bb7760255be9
2007-08-31 05:26:04 +00:00
Matt Sergeant
ef7d885929 Allow plugin tests to be in subdir (as with plugins).
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@737 958fd67b-6ff1-0310-b445-bb7760255be9
2007-05-17 22:02:32 +00:00
Matt Sergeant
062e73b7bf Support for pluggable received headers
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@731 958fd67b-6ff1-0310-b445-bb7760255be9
2007-04-09 14:45:11 +00:00
Hanno Hecker
d54a960f9a undo r700 (skip plugin)
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@701 958fd67b-6ff1-0310-b445-bb7760255be9
2007-01-01 12:47:46 +00:00
Hanno Hecker
39a9271213 New "skip plugin API" + example plugin skip_plugins, see perldoc
Qpsmtpd::Plugins for more info. This can be used to disable (and re-
enable) loaded plugins for the current connection.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@700 958fd67b-6ff1-0310-b445-bb7760255be9
2006-12-31 11:07:32 +00:00
Ask Bjørn Hansen
bf2419df33 r3744@embla: ask | 2006-06-28 13:04:50 -0700
Support "module" plugins ("My::Plugin" in the config/plugins file)
 


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@648 958fd67b-6ff1-0310-b445-bb7760255be9
2006-06-28 20:05:04 +00:00