Subject: | Macro syntax: "r" (local hostname) macro does not work |
According to the spf-draft-200406 SPF spec, the local hostname macro should be "r". In Mail::SPF::Query::macro_substitute_item(), it is defined as "xr". Patch attached.
--- /usr/share/perl5/Mail/SPF/Query.pm 2004-02-27 19:38:35.000000000 +0100
+++ Query.pm 2005-01-15 03:19:22.000000000 +0100
@@ -1024,7 +1024,7 @@
$newval = $timestamp if (lc $field eq 't');
$newval = $query->{helo} if (lc $field eq 'h');
$newval = $query->get_ptr_domain if (lc $field eq 'p');
- $newval = $query->{myhostname} if (lc $field eq 'xr'); # only used in explanation
+ $newval = $query->{myhostname} if (lc $field eq 'r'); # only used in explanation
$newval = $query->{ipv4} ? 'in-addr' : 'ip6'
if (lc $field eq 'v');