Commit Graph

66 Commits

Author SHA1 Message Date
Matt Simerson
97fda310ee headers: plugin tests, deprecate check_basicheaders 2013-08-05 15:01:48 -07:00
Matt Simerson
5b2a0add66 added commented out uribl to config.sample/plugins 2013-08-05 15:01:47 -07:00
Matt Simerson
4e2ae484a2 Merge pull request #15 from msimerson/early
consolidated chunks of code duplicated 4x into log_and_deny and log_and_...
2013-08-05 12:33:42 -07:00
Matt Simerson
1eb996a1f5 added note in file telling which plugin uses it 2012-06-04 03:34:48 -04:00
Matt Simerson
54ac009807 added plugin name that uses them to the config files 2012-06-04 03:34:48 -04:00
Matt Simerson
9c1e62371b added new t/config directory, with developer tests
run when $ENV{QPSMTPD_DEVELOPER} is set

plugins file is same as in config.sample, but with more stuff enabled
2012-06-04 03:34:48 -04:00
Matt Simerson
980c2a28bb comment out vpopmail/checkpasswd plugins in config 2012-06-04 03:34:48 -04:00
Matt Simerson
1a1dcc3e53 auth: eval 'use' so plugins can be enabled by default
and tested.
2012-06-04 03:34:47 -04:00
Matt Simerson
8795d4fd6e relay: use IETF IP testing addresses 2012-06-04 03:34:47 -04:00
Matt Simerson
974f1a95e8 new relay plugin, with tests!
replaces functionality of previous 3 relay plugins
2012-06-04 03:34:47 -04:00
Matt Simerson
57a0e4ba7b updated plugins to use QP::Plugins::is_immune 2012-06-04 03:26:16 -04:00
Matt Simerson
2dcd34467e geoip: eval loading of Geo::IP, tests, enabled in config
eval Geo::IP and log an error if missing
added 2 tests
enabled in config/plugins
2012-05-22 17:40:02 -04:00
Matt Simerson
d5f15a7d33 enable domainkeys plugin 2012-05-21 08:30:48 -07:00
Matt Simerson
68c868c793 enable basicheaders plugin 2012-05-20 23:40:01 -07:00
Matt Simerson
f37fba7c2b badrcptto: merged plugins, refactored, tests
merged badrcptto_pattern into badrcptto
refactored into smaller methods
added unit tests for each method
2012-05-20 23:39:38 -07:00
Matt Simerson
c4b8a7a395 hosts_allow: added logging, POD, deploy notes
added LOGINFO logging for denials, and LOGDEBUG for other results
added SEE ALSO pod
improved readability
2012-05-20 23:37:33 -07:00
Matt Simerson
102e068297 added dspam plugin 2012-04-29 00:38:28 -07:00
Matt Simerson
4bff5debab added tls comments to config/plugins 2012-04-28 20:14:00 -07:00
Matt Simerson
91d3f2a007 added comments to logging config files 2012-04-28 20:13:50 -07:00
Matt Simerson
3a7f46aa3e increased default TLS security setting
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.

Signed-off-by: Robert <rspier@pobox.com>
2010-07-25 22:31:59 -07:00
Matt Simerson
b81d464c87 added p0f support to greylist plugin
- 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 $dbdir selection (others $EMPTY/dir
 dumped greylisting database in / )

  - These changes are included in this patch -
Added t/plugin_tests/greylisting, with greylist logic testing (tests are
 disabled by default, as greylisting is disabled in config.sample/plugins)
Added example entry in config.sample/plugins

Signed-off-by: Robert <rspier@pobox.com>
2010-05-11 21:19:52 -07:00
Robert
c8b8e724bc sample badmailfrom config
add a sample badmailfrom config (useful for testing)
2009-06-23 22:27:28 -07:00
Henry Baragar
4bbdd551b4 Ignore leading/trailing whitespace in config files
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@966 958fd67b-6ff1-0310-b445-bb7760255be9
2009-01-02 20:41:00 +00:00
Ask Bjørn Hansen
30901fb91c make the queue/ plugin lines more verbose
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@796 958fd67b-6ff1-0310-b445-bb7760255be9
2007-09-24 20:59:27 +00:00
Ask Bjørn Hansen
240cdef285 take auth/authnull out of the sample configuration
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@792 958fd67b-6ff1-0310-b445-bb7760255be9
2007-09-22 20:20:24 +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
Ask Bjørn Hansen
313f285847 Added tests for the rcpt_ok plugin (Guy Hulbert, issue #4)
http://code.google.com/p/smtpd/issues/detail?id=4



git-svn-id: https://svn.perl.org/qpsmtpd/trunk@725 958fd67b-6ff1-0310-b445-bb7760255be9
2007-03-15 06:55:24 +00:00
Ask Bjørn Hansen
e7d64268e0 Update the sample configuration to use zen.spamhaus.org
take out ordb and mail-abuse references from sample config and the website



git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@702 958fd67b-6ff1-0310-b445-bb7760255be9
2007-01-06 02:25:45 +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
dcb86d5a72 take out ordb.org from the sample dnsbl config; s/sbl/sbl-xbl/
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@698 958fd67b-6ff1-0310-b445-bb7760255be9
2006-12-18 19:46:26 +00:00
John Peacock
413d3c38d3 Sample tls_ciphers configuration should have HIGH as a default.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@665 958fd67b-6ff1-0310-b445-bb7760255be9
2006-10-04 15:10:23 +00:00
John Peacock
9c39c530b2 Allow override of TLS security methods using CIPHER_STRINGS passed to
IO::Socket::SSL.  Brian Szymanski <ski-qpsmtpd@allafrica.com>

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@663 958fd67b-6ff1-0310-b445-bb7760255be9
2006-10-04 13:39:27 +00:00
John Peacock
25d9fe85a8 Two patches from Robin Johnson:
Add SSL encryption method to FROM: header line.
Add new tls_before_auth configuration to hide AUTH until TLS is established.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@645 958fd67b-6ff1-0310-b445-bb7760255be9
2006-06-22 14:48:48 +00:00
John Peacock
8fcb46177b Add Qpsmtpd::Command to gather all parsing logic in one place (Hanno
Hecker)


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@631 958fd67b-6ff1-0310-b445-bb7760255be9
2006-04-07 18:58:02 +00:00
John Peacock
c0920346e5 the pre-connection and post-connection hooks are not working in
qpsmtpd-forkserver. This patch merges Peter's patch (with the possibilty
to DENY/DENSOFT the connection) and my first attempt. The --max-from-ip
check was moved from core to the hosts_allow plugin. 

Patch by: Hanno Hecker <hah@uu-x.de>

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@599 958fd67b-6ff1-0310-b445-bb7760255be9
2006-01-11 16:21:08 +00:00
John Peacock
4b3fdf50bd * lib/Qpsmtpd.pm
By default, spool all messages to disk.

* config.sample/size_threshold
  Provide minimal explanation for how to avoid spooling small messages.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@549 958fd67b-6ff1-0310-b445-bb7760255be9
2005-09-22 17:29:13 +00:00
John Peacock
ea28e88fa6 Extend require_resolvable_fromhost to include a configurable list of
"impossible" addresses to combat spammer forging.  (Hanno Hecker)

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@522 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-28 20:25:54 +00:00
John Peacock
35f45f208b These changes to trunk were missed when 0.31 was branched.
r588@jpeacock (orig r490):  jpeacock | 2005-07-09 07:03:53 -0400
  r547@jpeacock:  jpeacock | 2005-07-02 07:20:17 -0400
  Replace pithy comment with something more neutral.
  Thanks Gordon Rowell <gordonr@gormand.com.au>
  r548@jpeacock:  jpeacock | 2005-07-02 07:24:21 -0400
  Example patterns for badrcptto plugin - Gordon Rowell <gordonr@gormand.com.au>
  r586@jpeacock:  jpeacock | 2005-07-09 06:54:47 -0400
  Don't use varlog() directly unless you are passing all parameters.
  Don't try to log() anything during loading of logging plugins.
  r587@jpeacock:  jpeacock | 2005-07-09 06:59:57 -0400
  Cannot use new-style hooking with logging plugins (yet).
 
 r590@jpeacock (orig r491):  jpeacock | 2005-07-10 06:56:55 -0400
  r589@jpeacock:  jpeacock | 2005-07-10 06:54:32 -0400
  Track hooks as array and hash.
  Re-revert changes to logging plugins to use new-style hooking.
  logging/adaptive assumed that register() has been called before hook_logging.
 


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@503 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-14 02:31:01 +00:00
John Peacock
89fd516d8e Revamp Qpsmtpd::Constants so it is possible to retrieve the text
representation from the numeric (for logging purposes).  Add new logging
plugin, logging/adaptive, which logs at different levels depending on
whether the message was accepted/rejected.
 
 *  lib/Qpsmtpd/Constants.pm
    use hashes for storing return_codes and log_levels
    export accessor methods to retrieve the text representations
 
 *  lib/Qpsmtpd.pm
    Rename log_level() to trace_level() so as to not conflict with the same
    name in Qpsmtpd::Constants.
    Call return_code() to display the text form when logging
 
 *  plugins/logging/adaptive
    Better documentation
    Support named parameters and prefix
    Call return_code() to display the text form when logging
 
 *  plugins/logging/warn
    Include POD

 *  README.logging
    First pass at documenting the logging plugin API

 *  config.sample/loglevel
    New numbering scheme to map directly to syslog levels


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@401 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-29 20:15:53 +00:00
John Peacock
e331f6b248 Add plugable logging support include sample plugin which replicates the
existing core code.  Add OK hook.

*  lib/Qpsmtpd.pm
   (init_logger): replaced with log_level()
   (load_logging): NEW - load logging plugins without calling log()
   (log_level): NEW - set/get global $LogLevel scalar
   (log): now just a wrapper for varlog(); called only by core code
   (varlog): initializes logging if not already done, calls logging plugins
     in turn and falls back to interal logging unless plugins OK or DECLINED
   (_load_plugins): only display "Loading plugin" when actually loading one
   (run_hooks): load logging plugins without calling log(); add OK hook as
     else of the DENY* case
   (spool_dir): use global $Spool_dir scalar to cache location

*  lib/Qpsmtpd/Plugin.pm
   (%hooks): add "logging" and "ok"
   (register_hook): add local _hook to object cache
   (log): call varlog() with additional parameters hook and plugin_name
     except for logging hook
   (compile): add accessor sub for local _hook scalar

*  lib/Qpsmtpd/SMTP.pm
   (mail, rcpt): change loglevel to LOGALERT instead of LOGWARN for from/to

*  qpsmtpd-forkserver
   (REAPER): use package ::log() instead of warn()
   (main): defer calling log until $plugin_loader has been initialized
   (log): call logging using the $plugin_loader object

*  plugins/logging/warn
   NEW: sample plugin which replicates the core logging functionality

*  plugins/logging/devnull
   NEW: sample plugin which logs nothing (for testing multiple logging
     plugin functionality)

*  config.sample/logging
   sample configuration file for logging plugins

*  plugins/virus/uvscan
   plugins/virus/clamav
   Increase loglevel for non-serious warnings to LOGWARN from LOGERROR


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@398 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-24 21:16:35 +00:00
John Peacock
f92e99bd9c * plugins/check_relay
*   plugins/rcpt_ok
    Split check_relay into two plugins

*   config/plugins
    Reorder plugins to take advantage of the new check_relay

*   lib/Qpsmtpd/Connection.pm
    Add support for relay_client() method

*   lib/Qpsmtpd/SMTP.pm
    Copy connection relay settings to transaction object when created

*   lib/Qpsmtpd/Auth.pm
    Use the connection->relay_client() instead of setting an env var


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@326 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-22 16:01:16 +00:00
Robert Spier
72781ca2bb document multiple plugin calling
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@309 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-07 05:36:41 +00:00
Ask Bjørn Hansen
d9ec93f82f update sample config ... the config directory should probably be renamed
to config.sample/ or something like that.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@256 958fd67b-6ff1-0310-b445-bb7760255be9
2004-06-30 09:26:18 +00:00
Matt Sergeant
9c700b18e1 New for 0.28: Log levels and $Include for config/plugins
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@217 958fd67b-6ff1-0310-b445-bb7760255be9
2004-03-05 12:46:24 +00:00
Ask Bjørn Hansen
afff6f988b reinstate the default plugins config (from revision 1.9)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@193 958fd67b-6ff1-0310-b445-bb7760255be9
2003-11-06 22:31:38 +00:00
Matt Sergeant
c2fb24c4e4 Split received header so it doesn't exceed 78 chars
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@191 958fd67b-6ff1-0310-b445-bb7760255be9
2003-11-04 22:52:49 +00:00
Matt Sergeant
77881fe791 Example relayclients file
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@183 958fd67b-6ff1-0310-b445-bb7760255be9
2003-11-02 11:18:29 +00:00
Ask Bjørn Hansen
53efac2e14 Use $ENV{QMAIL} to override /var/qmail for where to find the
control/ directory.

  Enable "check_earlytalker" in the default plugins config


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@168 958fd67b-6ff1-0310-b445-bb7760255be9
2003-08-30 15:14:39 +00:00
Ask Bjørn Hansen
1cc56d8f64 add sbl.spamhaus.org to the default config
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@149 958fd67b-6ff1-0310-b445-bb7760255be9
2003-06-10 10:04:50 +00:00