Commit Graph

493 Commits

Author SHA1 Message Date
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
7a045474f9 Qpsmtpd.pm: bump version 2013-08-05 15:01:51 -07:00
Matt Simerson
96dd90f808 TcpServer: assign default value during declaration 2013-08-05 15:01:50 -07:00
Matt Simerson
6a7598e3bf SMTP.pm: test if unrec cmd is set (suppress warning)
and decrease log message priority in rcpt_response
2013-08-05 15:01:49 -07:00
Matt Simerson
3b9479a497 Transaction.pm: added debugging messages for DESTROY 2013-08-05 15:01:47 -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
c1df6c2e1f Qpsmtpd.pm: less default logging at LOGINFO 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
0826b86dde fix typo 2012-06-04 03:34:47 -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
beca1e5e41 Q::Transaction, fix spelling error
s/Depreceated/Deprecated/
2012-05-20 23:40:08 -07: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
Matt Simerson
a6e664ce83 Altered SASL method to include the mechanism in log entries.
removed auth method from return calls in all auth plugins. The caller knows the mechanism already. In the code, the difference looks like this:

before:
        or return (DENY, "authcvm/$method");
after:
        or return (DENY, "authcvm");

Added debug level log entries in auth_vpopmaild

Conflicts:

	plugins/auth/auth_vpopmail_sql
2012-05-06 16:20:25 -07:00
Matt Simerson
5285774285 refactored Qpsmtpd::Auth::SASL
unit tests for new methods are in t/auth.t

added PLAIN and LOGIN tests in auth_flat_file

Most tests are disabled unless an interactive terminal is detected and $ENV{QPSMTPD_DEVELOPER} is set.
2012-05-06 16:17:02 -07:00
Matt Simerson
983dc82203 confine duplicate Auth log entry to LOGDEBUG 2012-05-06 16:12:20 -07:00
Matt Simerson
312d983ff7 Command.pm, promoted strictures to 1st line of code 2012-05-06 16:06:54 -07:00
Matt Simerson
c44db8c9e2 removed TODO, p0f v3 doesn't need that extra info 2012-05-06 16:01:57 -07:00
Matt Simerson
c3626f2123 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): US, United States
86553 ident::p0f: (connect) Windows 7 or 8
86553 check_earlytalker: (connect): remote host said nothing spontaneous, proceeding

Conflicts:

	plugins/logging/warn
2012-05-06 16:00:58 -07:00
Matt Simerson
6031e49da8 improved readability of default logging logic 2012-05-06 15:59:49 -07:00
Matt Simerson
d80a347afe SMTP.pm, add missing ; and remove useless if 2012-05-06 15:50:57 -07:00
Matt Simerson
d9a42d1774 confine SMTP.pm duplicate logging to LOGDEBUG 2012-05-06 15:50:23 -07:00
Matt Simerson
049d34ee55 improve readability in SMTP::auth_parse_respond 2012-05-06 15:50:07 -07:00
Matt Simerson
3afcc92150 whitespace, copyright bump, simplify logic 2012-04-29 00:30:06 -07:00
Matt Simerson
005c4d9105 make sure $hook is defined before printing it
This prevents error messages about $hook being undefined in the logs
2012-04-28 20:18:28 -07:00
Robert
461dabc3e1 Revert "Spool body when $transaction->body_fh() is called"
This reverts commit a52660a646.

See http://www.nntp.perl.org/group/perl.qpsmtpd/2010/10/msg9453.html for discussion.
2010-10-29 22:23:58 -07:00
Hanno Hecker
33d8825ecf Fix for plugins returning DONE from HELO/EHLO
We have to return something true, else the client gets an additional
 451 Internal error - try again later - command 'helo' failed unexpectedly
after the plugin's ->respond() message.
2010-09-17 15:25:20 +08:00
Peter A Eisch
e403a56d74 I forgot to sync the code that calls the original config correctly. 2010-09-15 14:33:34 +08:00
Peter A Eisch
2979c52b47 Adds the ability to have multiple instances (each with different
configs) running under Apache.
2010-09-15 14:33:31 +08:00
jaredj
295474503f Add support for multiple postfix cleanup sockets
The current postfix-queue plugin allows the administrator to set a
single path to a local postfix cleanup socket file from the plugin
'command line'.  This adds a 'cleanup_sockets' configuration directive
that can contain a list of paths as well as host/port combinations
pointing to postfix cleanup services, which will be tried in the order
that they appear.  Not yet tested.
2010-09-15 14:32:54 +08:00
jaredj
5c3bd220aa Run hook_reset_transaction after all connections
This makes hook_reset_transaction a bit more useful by running it on
disconnections.  It also ensures that hook_disconnect runs when the
client disconnects without QUITing.
2010-09-15 14:32:53 +08:00
Jared Johnson
96aa5ba171 Shorten/clarify Connection and Transaction notes()
Update Qpsmtpd::Connection::notes() and Qpsmtpd::Transaction::notes()
with clearer, more brief syntax.  A previous patch used seemingly better
syntax, but did not evaluate the size of @_ in order to distinguish
between a call to notes('arg1',undef) and notes('arg1').  This corrects
this issue, and adds a comment to that effect.
2010-09-15 14:32:53 +08:00
Matt Simerson
671a6953b0 add TCPLOCAL* variables to $qp->connection
(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.

Signed-off-by: Robert <rspier@pobox.com>
2010-05-11 21:15:57 -07:00
Matt Simerson
5f81fd7925 remove vestiges of a bygone RCS 2010-05-09 23:22:13 -07:00
Ask Bjørn Hansen
c408aa98ca Update copyright year 2010-04-07 22:32:41 -07:00
Ask Bjørn Hansen
e0948cee24 Prepare 0.84 release 2010-04-07 22:26:48 -07:00
Filippo Carletti
660ed14823 don't initialize the hooks array if it is already initialized 2010-02-13 21:23:03 -08:00
Peter J. Holzer
46171d0c66 fixed issue #29: config now caches returned value
Qpsmtpd::config now checks cache, hooks, qmail_config, default in this
order and returns the first match. In any case the returned value is
stored in the cache, so subsequent calls to Qpsmtpd::config return the
same value (unless the cache is cleared).
2010-01-18 11:36:06 -08:00
Devin Carraway
44c67fcbc7 Add a whatis to Qpsmtpd.pm and Postfix.pm's POD
Signed-off-by: Robert <rspier@pobox.com>
2010-01-14 00:13:10 -08:00
Rick
7de104bf66 AUTH PLAIN bug with qpsmtpd and alpine
Trying to get SMTP auth working with alpine, I came across a bug.
Alpine sends AUTH PLAIN and waits for a 334 response, then sends the
auth string. According to the RFC, the server should reply with 334
and a nothing else, but in Auth.pm qpsmtpd responds with "334 Please
continue."   the "Please continue" is interpreted as a non-zero
length initial challenge which causes alpine (and maybe other
clients?) to abort the session.

Signed-off-by: Charlie Brady <charlieb@budge.apana.org.au>
Signed-off-by: Robert <rspier@pobox.com>
2009-12-24 20:36:51 -08:00
Steve Kemp
d066479a77 PATCH: Spelling fixups
According to my dictionary "Authentification" is not a real word.

Signed-off-by: Robert <rspier@pobox.com>
2009-10-17 23:38:57 -07:00
Ask Bjørn Hansen
90b1206f85 Prepare 0.83 2009-09-15 14:55:35 -07:00
jaredj
a52660a646 Spool body when $transaction->body_fh() is called
Qpsmtpd::Transaction::body_filename() calls $self->body_spool() if the
message body has not already been spool to disk.  This adds the same
check to Qpsmtpd::Transaction::body_fh()
2009-09-15 14:41:05 -07:00
Jared Johnson
16b4dbcd81 Add dup_body_fh to return a dup'd body FH
It wasn't suitable to dup the body FH returned by plain old
body_fh(), so here's a separate function to return that.

Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
2009-09-15 14:39:50 -07:00
Ask Bjørn Hansen
90535ef883 Release 0.82 2009-06-02 16:02:58 -07:00
Ask Bjørn Hansen
45a5265837 Prepare 0.81 2009-04-02 22:39:23 -07:00
Pedro Melo
8e5bd5aa69 The bare postmaster address is case-insensitive
Per rfc2821, sec 4.5.1 and rfc5321, sec 4.5.1.

Signed-off-by: Pedro Melo <melo@simplicidade.org>
2009-03-14 17:18:13 +00:00
Ask Bjørn Hansen
6b6581fbf5 Add git describe to VERSION when running from a git clone 2009-03-02 13:00:09 -08:00