summaryrefslogtreecommitdiff
path: root/mail/postfix-policyd-spf-perl/files
diff options
context:
space:
mode:
authorBeech Rintoul <beech@FreeBSD.org>2009-01-27 05:39:46 +0000
committerBeech Rintoul <beech@FreeBSD.org>2009-01-27 05:39:46 +0000
commitddab3358cd86c1eef50e76cbfb9e5a6fabd7b6ad (patch)
treee1fa1db65afcd99847223c3531e6641601ebb5a6 /mail/postfix-policyd-spf-perl/files
parentFix build with unixODBC 2.2.14: in 2.2.14 signatures of several functions (diff)
postfix-policyd-spf-perl is an RFC-4408-compliant SPF policy service for
postfix written in Perl. WWW: http://www.openspf.org/Software/ PR: ports/131000 Submitted by: Darren Pilgrim <ports.maintainer at evilphi.com>
Diffstat (limited to 'mail/postfix-policyd-spf-perl/files')
-rw-r--r--mail/postfix-policyd-spf-perl/files/patch-postfix-policyd-spf-perl32
-rw-r--r--mail/postfix-policyd-spf-perl/files/pkg-message.in26
2 files changed, 58 insertions, 0 deletions
diff --git a/mail/postfix-policyd-spf-perl/files/patch-postfix-policyd-spf-perl b/mail/postfix-policyd-spf-perl/files/patch-postfix-policyd-spf-perl
new file mode 100644
index 000000000000..d3a0c0b49769
--- /dev/null
+++ b/mail/postfix-policyd-spf-perl/files/patch-postfix-policyd-spf-perl
@@ -0,0 +1,32 @@
+--- postfix-policyd-spf-perl.orig 2008-07-25 19:35:01.000000000 -0700
++++ postfix-policyd-spf-perl 2009-01-25 16:46:38.991336330 -0800
+@@ -263,14 +263,14 @@
+ info => "%s: SPF %s: HELO/EHLO: %s",
+ $attr->{queue_id}, $helo_result, $attr->{helo_name}
+ );
+- return "550 $helo_authority_exp";
++ return "%%SPF_FAIL%% $helo_authority_exp";
+ }
+ elsif ($helo_result->is_code('temperror')) {
+ syslog(
+ info => "%s: SPF %s: HELO/EHLO: %s",
+ $attr->{queue_id}, $helo_result, $attr->{helo_name}
+ );
+- return "DEFER_IF_PERMIT SPF-Result=$helo_local_exp";
++ return "%%SPF_TEMPERROR%% SPF-Result=$helo_local_exp";
+ }
+ elsif ($attr->{sender} eq '') {
+ syslog(
+@@ -334,10 +334,10 @@
+ $attr->{queue_id}, $mfrom_result, $attr->{sender}
+ );
+ if ($mfrom_result->is_code('fail')) {
+- return "550 $mfrom_authority_exp";
++ return "%%SPF_FAIL%% $mfrom_authority_exp";
+ }
+ elsif ($mfrom_result->is_code('temperror')) {
+- return "DEFER_IF_PERMIT SPF-Result=$mfrom_local_exp";
++ return "%%SPF_TEMPERROR%% SPF-Result=$mfrom_local_exp";
+ }
+ else {
+ return "PREPEND $mfrom_spf_header"
diff --git a/mail/postfix-policyd-spf-perl/files/pkg-message.in b/mail/postfix-policyd-spf-perl/files/pkg-message.in
new file mode 100644
index 000000000000..d853e2bd17cb
--- /dev/null
+++ b/mail/postfix-policyd-spf-perl/files/pkg-message.in
@@ -0,0 +1,26 @@
+The service is not enabled by default. Enable it by doing the following:
+
+1. Add the following to /etc/postfix/master.cf:
+
+ spf-policy unix - n n - 0 spawn
+ user=nobody argv=%%PREFIX%%/sbin/postfix-policyd-spf-perl
+
+ The user nobody is fine if you have no other daemons running as nobody.
+ Otherwise, you should use a dedicated user and group for this policy
+ service.
+
+2. Add "spf-policy_time_limit = 3600" to main.cf.
+
+3. Configure the Postfix policy service in %%PREFIX%%/etc/postfix/main.cf:
+
+ smtpd_recipient_restrictions =
+ ...
+ reject_unauth_destination
+ ...
+ check_policy_service unix:private/spf-policy
+ ...
+
+ NOTE: Specify check_policy_service AFTER reject_unauth_destination or your
+ system may become an open relay.
+
+4. Restart Postfix.