Commit Graph

47 Commits

Author SHA1 Message Date
Jared Johnson
a1144ecbf9 Revert "Revert "Don't crash QP when GeoIP data is missing"" 2015-02-26 17:07:35 -06:00
Jared Johnson
6f38bdf5ad Revert "Don't crash QP when GeoIP data is missing" 2015-02-26 17:05:52 -06:00
Jared Johnson
15210db779 Don't crash QP when GeoIP data is missing 2015-02-26 17:04:49 -06:00
Matt Simerson
bc4e7e61a5 geoip: change a couple INFO -> DEBUG 2015-01-28 22:10:06 -08: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
Jared Johnson
9450c21c06 Perltidy 2015-01-14 16:17:04 -06:00
Jared Johnson
029db84771 Remove some postfix 'if' 2015-01-14 16:05:42 -06:00
Jared Johnson
f8e220e3b5 Handle missing GeoIP data gracefully
Previously, the GeoIP plugin would crash on certain missing GeoIP data.
Now it will continue to operate on whatever data it can get at.

Note that it already warns when any data it's looking for is missing.
2015-01-14 15:28:14 -06:00
Matt Simerson
c6918d10ca remove instances of: use lib 'lib' in lib/ and
plugins/
2015-01-04 17:13:50 -08:00
Jared Johnson
ea937f89dc Warn about lack of ASN data when GeoIP2 is loaded 2014-12-18 13:30:26 -06:00
Jared Johnson
8de22de762 Try to load geoip1 before geoip2 2014-12-18 13:27:35 -06:00
Jared Johnson
ffefb6b1ec Fix GeoIP add_headers() return code 2014-11-17 14:24:17 -06:00
Jared Johnson
cf09a662ad New convention for calling Qpsmtpd::Base stuff
I think
2014-11-13 16:29:52 -06:00
Jared Johnson
a3ae6c51f4 Shorter lines and more explicit default 2014-11-13 14:55:17 -06:00
Jared Johnson
0975b22582 Get rid of a warning 2014-11-13 14:19:34 -06:00
Jared Johnson
575dc73cdf Use 'command line' instead of config() call
It's awful, but consistent
2014-11-13 13:40:04 -06:00
Jared Johnson
943b1fcaf3 Remove country_name header which is redundant 2014-11-13 11:13:15 -06:00
Jared Johnson
0f0495f09e Explicit return 2014-11-13 11:13:15 -06:00
Jared Johnson
cf0d87610c Make GeoIP headers optional 2014-11-13 11:13:15 -06:00
Jared Johnson
d22396c298 Add headers with GeoIP data 2014-11-13 11:13:15 -06:00
Jared Johnson
da3ed5ebbf Fix missing $self 2014-11-13 11:13:15 -06:00
Jared Johnson
462e974d1e leave register() if neither geoip module loads 2014-11-13 11:13:15 -06:00
Matt Simerson
03e7ef722c geoip: skip lookups for localhost 2014-11-11 01:49:46 -05:00
Matt Simerson
3acc6dd3d9 updated MANIFEST with new bin/ file 2014-11-10 16:29:59 -08:00
Matt Simerson
4acf8602bd update docs with geoip_asn note addition 2014-11-10 13:32:28 -08:00
Matt Simerson
954fa45f2d added call to ->set_asn 2014-11-05 14:30:23 -08:00
Matt Simerson
54abd60239 strip off AS prefix 2014-11-05 14:30:23 -08:00
Matt Simerson
f2eda74074 ASN lookups now work 2014-11-05 14:30:22 -08:00
Matt Simerson
4eba2a39bc remove unused var 2014-11-05 14:30:22 -08:00
Matt Simerson
c61dbb5734 added GeoIP2 support, partial ASN support 2014-11-05 14:30:22 -08:00
Matt Simerson
9862cdc042 geoip: simplify the get/set data bits 2014-11-05 14:30:22 -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
a4695cec8b geoip: added named array for invalid args
so it passes Perl::Critic tests
2013-12-18 00:02:07 -05:00
Matt Simerson
75a3e4baae find plugins -type f -exec perltidy -b {} \; 2013-08-05 15:05:15 -07:00
Matt Simerson
e7f9f3bf21 geoip: added too_far option 2013-08-05 15:05:11 -07:00
Matt Simerson
11e449a904 geoip: no data is a skip, not a fail 2013-08-05 15:01:50 -07:00
Matt Simerson
c95df51af1 geoip: improve log messages
list fixed with continent code first to improve readability
added ability to include city in logging
2013-08-05 15:01:48 -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
0a16621f02 connection consistency
-  $self->qp->connection->notes
+  $self->connection->notes

and all tests pass.
2012-06-02 00:46:33 -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
8103c5a132 added country name to GeoIP plugin
and removed redundant words from log entries
2012-05-07 09:54:31 -07:00
Ask Bjørn Hansen
a23d4b3da9 Fix 01-syntax test failures
Exclude some tests with dependencies.

Remove -T from perl line in plugins
This makes it harder to test with PERL5LIB/perlbrew etc
2012-04-29 01:36:01 -07:00
Matt Simerson
dbaa9dbd6c POD corrections, additional tests, plugin consistency
on files in plugins dir:
  fixed a number of POD errors

  formatted some # comments into POD

  removed bare 1;  (these are plugins, not perl modules)
    most instances of this were copy/pasted from a previous plugin that had it

  removed instances of # vim ts=N ...
    they weren't consistent, many didn't match .perltidyrc

  on modules that failed perl -c tests, added 'use Qpsmtpd::Constants;'

Conflicts:

	plugins/async/check_earlytalker
	plugins/async/dns_whitelist_soft
	plugins/async/dnsbl
	plugins/async/queue/smtp-forward
	plugins/async/require_resolvable_fromhost
	plugins/async/rhsbl
	plugins/async/uribl
	plugins/auth/auth_checkpassword
	plugins/auth/auth_cvm_unix_local
	plugins/auth/auth_flat_file
	plugins/auth/auth_ldap_bind
	plugins/auth/auth_vpopmail
	plugins/auth/auth_vpopmail_sql
	plugins/auth/authdeny
	plugins/check_badmailfromto
	plugins/check_badrcptto_patterns
	plugins/check_bogus_bounce
	plugins/check_earlytalker
	plugins/check_norelay
	plugins/check_spamhelo
	plugins/connection_time
	plugins/dns_whitelist_soft
	plugins/dnsbl
	plugins/domainkeys
	plugins/greylisting
	plugins/hosts_allow
	plugins/http_config
	plugins/logging/adaptive
	plugins/logging/apache
	plugins/logging/connection_id
	plugins/logging/transaction_id
	plugins/logging/warn
	plugins/milter
	plugins/queue/exim-bsmtp
	plugins/queue/maildir
	plugins/queue/postfix-queue
	plugins/queue/smtp-forward
	plugins/quit_fortune
	plugins/random_error
	plugins/rcpt_map
	plugins/rcpt_regexp
	plugins/relay_only
	plugins/require_resolvable_fromhost
	plugins/rhsbl
	plugins/sender_permitted_from
	plugins/spamassassin
	plugins/tls
	plugins/tls_cert
	plugins/uribl
	plugins/virus/aveclient
	plugins/virus/bitdefender
	plugins/virus/clamav
	plugins/virus/clamdscan
	plugins/virus/hbedv
	plugins/virus/kavscanner
	plugins/virus/klez_filter
	plugins/virus/sophie
	plugins/virus/uvscan
2012-04-29 00:00:10 -07:00
Matt Simerson
651ca986ff don't print GeoIP country if not defined
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.
2012-04-28 20:19:18 -07:00
Robert Spier
29ea951680 Recreate the Geo::IP object for each message. (Otherwise it will hold the underlying database file handle open, and it doesn't like when that file changes underneath it.)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@933 958fd67b-6ff1-0310-b445-bb7760255be9
2008-07-04 02:03:56 +00:00
Robert Spier
90daeb3786 r483@dog: rspier | 2005-07-06 21:17:00 -0700
The great plugin renaming in the name of inheritance and standardization commit.
 
 1. new concept of standard hook_ names.
 2. Plugin::init
 3. renamed many subroutines in plugins (and cleaned up register subs)
 4. updated README.plugins
 


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@479 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-07 04:17:39 +00:00
Robert Spier
56ee8641ec Two new plugins:
ident/geoip - lookup country of host
  ident/p0f   - use p0f to get type of source machine


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@289 958fd67b-6ff1-0310-b445-bb7760255be9
2004-08-29 07:47:25 +00:00