Mailing List Archive

svn commit: mail-spf-query-perl: r147 - trunk/examples
Author: julian
Date: 2006-03-14 15:51:58 -0600 (Tue, 14 Mar 2006)
New Revision: 147

Modified:
trunk/examples/postfix-policyd-spf
Log:
trunk/examples/postfix-policyd-spf
* Bumped version number to 1.07.
* Enabled Subversion keyword expansion.
* Say syslog(warning => ...) instead of syslog(warn => ...). "warn" is not a
valid sylog priority!


Modified: trunk/examples/postfix-policyd-spf
===================================================================
--- trunk/examples/postfix-policyd-spf 2006-02-26 21:10:24 UTC (rev 146)
+++ trunk/examples/postfix-policyd-spf 2006-03-14 21:51:58 UTC (rev 147)
@@ -2,7 +2,7 @@

# postfix-policyd-spf
# http://www.openspf.org
-# version 1.06
+# version 1.07
# $Id$

use Fcntl;
@@ -120,9 +120,9 @@
# Log an error and abort.
#
sub fatal_exit {
- syslog(err => "fatal_exit: @_");
- syslog(warn => "fatal_exit: @_");
- syslog(info => "fatal_exit: @_");
+ syslog(err => "fatal_exit: @_");
+ syslog(warning => "fatal_exit: @_");
+ syslog(info => "fatal_exit: @_");
die "fatal: @_";
}

@@ -149,11 +149,11 @@
while (<STDIN>) {
chomp;
if (/=/) { my ($k, $v) = split (/=/, $_, 2); $attr{$k} = $v; next }
- elsif (length) { syslog(warn=>sprintf("warning: ignoring garbage: %.100s", $_)); next; }
+ elsif (length) { syslog(warning => sprintf("warning: ignoring garbage: %.100s", $_)); next; }

if ($VERBOSE) {
for (sort keys %attr) {
- syslog(debug=> "Attribute: %s=%s", $_, $attr{$_});
+ syslog(debug => "Attribute: %s=%s", $_, $attr{$_});
}
}

@@ -164,14 +164,14 @@
foreach my $handler (@HANDLERS) {
no strict 'refs';
my $response = $handler->(attr=>\%attr);
- syslog(debug=> "handler %s: %s", $handler, $response);
+ syslog(debug => "handler %s: %s", $handler, $response);
if ($response and $response !~ /^dunno/i) {
- syslog(info=> "handler %s: %s is decisive.", $handler, $response);
+ syslog(info => "handler %s: %s is decisive.", $handler, $response);
$action = $response; last;
}
}

- syslog(info=> "decided action=%s", $action);
+ syslog(info => "decided action=%s", $action);

print STDOUT "action=$action\n\n";
%attr = ();
@@ -188,13 +188,13 @@
sender=>$attr{sender},
helo =>$attr{helo_name}) };
if ($@) {
- syslog(info=>"%s: Mail::SPF::Query->new(%s, %s, %s) failed: %s",
+ syslog(info => "%s: Mail::SPF::Query->new(%s, %s, %s) failed: %s",
$attr{queue_id}, $attr{client_address}, $attr{sender}, $attr{helo_name}, $@);
return "DUNNO";
}
my ($result, $smtp_comment, $header_comment) = $query->result();

- syslog(info=>"%s: SPF %s: smtp_comment=%s, header_comment=%s",
+ syslog(info => "%s: SPF %s: smtp_comment=%s, header_comment=%s",
$attr{queue_id}, $result, $smtp_comment, $header_comment);

if ($result eq "fail") { return "REJECT $smtp_comment"; }
@@ -214,12 +214,11 @@
and
$attr{recipient} =~ /policyblock/) {

- syslog(info=>"%s: testing: will block as requested",
- $attr{queue_id});
+ syslog(info => "%s: testing: will block as requested", $attr{queue_id});
return "REJECT smtpd-policy blocking $attr{recipient}";
}
else {
- syslog(info=>"%s: testing: stripped sender=%s, stripped rcpt=%s",
+ syslog(info => "%s: testing: stripped sender=%s, stripped rcpt=%s",
$attr{queue_id},
address_stripped($attr{sender}),
address_stripped($attr{recipient}),


Property changes on: trunk/examples/postfix-policyd-spf
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com