initial commit of file from CVS for smeserver-geoip on Sat Sep 7 20:26:07 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 20:26:07 +10:00
parent 668d7517d0
commit ca710f1de3
25 changed files with 1033 additions and 2 deletions

View File

@@ -0,0 +1 @@
enabled

View File

@@ -0,0 +1 @@
service

View File

@@ -0,0 +1 @@
enabled

View File

@@ -0,0 +1,2 @@
#!/bin/bash
/usr/bin/geoipupdate

View File

@@ -0,0 +1,12 @@
# The following AccountID and LicenseKey are required placeholders.
# For geoipupdate versions earlier than 2.5.0, use UserId here instead of AccountID.
#AccountID 0
AccountID { $geoip{AccountID} ||'0' }
LicenseKey { $geoip{LicenseKey} ||'000000000000'}
# Include one or more of the following edition IDs:
# * GeoLite2-City - GeoLite 2 City
# * GeoLite2-Country - GeoLite2 Country
# For geoipupdate versions earlier than 2.5.0, use ProductIds here instead of EditionIDs.
EditionIDs GeoLite2-City GeoLite2-Country
#ProductIds GeoLite2-City GeoLite2-Country

View File

@@ -0,0 +1,9 @@
# The remaining settings are OPTIONAL.
# The directory to store the database files. Defaults to /usr/share/GeoIP
# DatabaseDirectory /usr/share/GeoIP
{
my $DatabaseDirectory = $geoip{DatabaseDirectory} || '/usr/share/GeoIP';
$OUT ="DatabaseDirectory $DatabaseDirectory";
}

View File

@@ -0,0 +1,7 @@
# The server to use. Defaults to "updates.maxmind.com".
# Host updates.maxmind.com
{
my $GEOserver = $geoip{Host} || 'updates.maxmind.com';
$OUT ="Host $GEOserver";
}

View File

@@ -0,0 +1,8 @@
# The proxy host name or IP address. You may optionally specify a
# port number, e.g., 127.0.0.1:8888. If no port number is specified, 1080
# will be used.
# Proxy 127.0.0.1:8888
# The user name and password to use with your proxy server.
# ProxyUserPassword username:password

View File

@@ -0,0 +1,8 @@
# Whether to preserve modification times of files downloaded from the server.
# Defaults to "0".
# PreserveFileTimes 0
{
my $FT = $geoip{PreserveFileTimes} || '0';
$OUT ="PreserveFileTimes $FT";
}

View File

@@ -0,0 +1,6 @@
# The lock file to use. This ensures only one geoipupdate process can run at a
# time.
# Note: Once created, this lockfile is not removed from the filesystem.
# Defaults to ".geoipupdate.lock" under the DatabaseDirectory.
# LockFile /usr/share/GeoIP/.geoipupdate.lock

View File

@@ -0,0 +1,3 @@
# Updating the GeoIP database monthly on the 5th at 0:00h.
0 0 10 * * root /usr/bin/geoipupdate

View File

@@ -0,0 +1,7 @@
{
my @badcountries = split /[,:]/, ${qpsmtpd}{BadCountries} || '';
return "# No BadCountries are defined" unless (scalar @badcountries);
return join "\n", @badcountries;
}

View File

@@ -0,0 +1 @@
../../plugins/18check_badcountries

View File

@@ -0,0 +1,6 @@
{
return "# geoip disabled" unless (${qpsmtpd}{GeoIP} eq "enabled");
"check_badcountries";
}