Files

90 lines
3.5 KiB
Diff
Raw Permalink Normal View History

--- a/sqlgrey 2012-02-13 08:54:08.000000000 -0800
+++ b/sqlgrey 2019-04-23 18:04:12.000000000 -0700
2011-06-18 19:38:20 +00:00
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!@PERL_BIN@ -w
2011-06-18 19:38:20 +00:00
# sqlgrey: a postfix greylisting policy server using an SQL backend
# based on postgrey
@@ -57,10 +57,10 @@
2011-06-18 19:38:20 +00:00
# defaults
my %dflt;
$dflt{loglevel} = 2; # used for $dflt{log} entries in read_conffile()
-$dflt{user} = 'sqlgrey';
-$dflt{group} = 'sqlgrey';
-$dflt{pidfile} = '/var/run/sqlgrey.pid';
-$dflt{conf_dir} = '/etc/sqlgrey';
+$dflt{user} = '@SQLGREYUSER@';
+$dflt{group} = '@SQLGREYGROUP@';
2012-10-17 05:44:55 +00:00
+$dflt{pidfile} = '@PREFIX@/var/run/@NAME@/sqlgrey.pid';
+$dflt{conf_dir} = '@PREFIX@/etc/sqlgrey';
2011-06-18 19:38:20 +00:00
$dflt{reconnect_delay} = 5; # 5 minutes
$dflt{max_connect_age} = 24; # 24 hours
$dflt{awl_age} = 60; # 60 days
@@ -104,7 +104,7 @@
2011-06-18 19:38:20 +00:00
};
# Default configuration file
-my $config_file = '/etc/sqlgrey/sqlgrey.conf';
2012-10-17 05:44:55 +00:00
+my $config_file = '@PREFIX@/etc/sqlgrey/sqlgrey.conf';
2011-06-18 19:38:20 +00:00
# whitelist files
my $stat_ip_whitelist_file = $dflt{conf_dir} . '/clients_ip_whitelist';
@@ -2739,7 +2739,7 @@
2011-06-18 19:38:20 +00:00
close(STDERR);
# Ugly hack to prevent perl from complaining
# 'warning: Filehandle STDERR reopened as FILE only \
- # for input at /usr/bin/sqlgrey line 717, <FILE> line 57'
2012-10-17 05:44:55 +00:00
+ # for input at @PREFIX@/bin/sqlgrey line 717, <FILE> line 57'
2011-06-18 19:38:20 +00:00
open(STDIN,'</dev/null');
open(STDOUT,'>/dev/null');
open(STDERR,'>/dev/null');
@@ -2825,15 +2825,15 @@
2011-06-18 19:38:20 +00:00
-k, --kill kill a running sqlgrey
(identified by 'pidfile' content)
-f, --configfile=FILE read config from FILE
- (default /etc/sqlgrey/sqlgrey.conf)
2012-10-17 05:44:55 +00:00
+ (default @PREFIX@/etc/sqlgrey/sqlgrey.conf)
2011-06-18 19:38:20 +00:00
expecting config_param=value lines,
- spaces are ignored,
- '#' is used for comments
-See the default config file at /etc/sqlgrey/sqlgrey.conf for runtime parameters.
2012-10-17 05:44:55 +00:00
+See the default config file at @PREFIX@/etc/sqlgrey/sqlgrey.conf for runtime parameters.
2011-06-18 19:38:20 +00:00
If you got sqlgrey from sources, read the HOWTO file in the compressed archive.
If it came prepackaged, look into the documentation tree for this file:
-/usr/share/doc/sqlgrey-<version>/ on most Linux distributions for example.
2012-10-17 05:44:55 +00:00
+@PREFIX@/share/doc/sqlgrey-<version>/ on most Linux distributions for example.
2011-06-18 19:38:20 +00:00
=head1 DESCRIPTION
@@ -2941,7 +2941,7 @@
2011-06-18 19:38:20 +00:00
=item *
Start by adding check_policy_service after reject_unauth_destination in
-/etc/postfix/main.cf :
2012-10-17 05:44:55 +00:00
+@PREFIX@/etc/postfix/main.cf :
2011-06-18 19:38:20 +00:00
smtpd_recipient_restrictions =
...
@@ -2965,7 +2965,7 @@
2011-06-18 19:38:20 +00:00
If you want to disable greylisting for some users you can configure
Postfix like this:
-/etc/postfix/sqlgrey_recipient_access:
2012-10-17 05:44:55 +00:00
+@PREFIX@/etc/postfix/sqlgrey_recipient_access:
2011-06-18 19:38:20 +00:00
i_like_spam@ee.ethz.ch OK
Then you'll add a check_recipient_access in main.cf before the
@@ -2973,8 +2973,8 @@
2011-06-18 19:38:20 +00:00
smtpd_recipient_restrictions =
...
reject_unauth_destination
- check_client_access hash:/etc/postfix/sqlgrey_client_access
- check_recipient_access hash:/etc/postfix/sqlgrey_recipient_access
2012-10-17 05:44:55 +00:00
+ check_client_access hash:@PREFIX@/etc/postfix/sqlgrey_client_access
+ check_recipient_access hash:@PREFIX@/etc/postfix/sqlgrey_recipient_access
2011-06-18 19:38:20 +00:00
check_policy_service inet:127.0.0.1:10023
=head1 SEE ALSO