Paul Stead wrote:
Awesome,

Might it be useful to have other tags set as well?

LASTEXTERNALHELO - similar to the common tag in PerMsgStatus
LASTEXTERNALIP - as above

Anything else that could be handy?


Indeed, the LASTEXTERNALIP, LASTEXTERNALRDNS, and LASTEXTERNALHELO
could just as well be made into tags. To make LASTEXTERNALIP useful
as a tag the fields of an IP address would probably need to be
reversed.


We already have tags RELAYSTRUSTEDREVIP, RELAYSUNTRUSTEDREVIP,
RELAYSINTERNALREVIP, RELAYSEXTERNALREVIP :

Mail/SpamAssassin/Message/Metadata.pm :

  foreach my $tuple (
      [$self->{relays_trusted},   'RELAYSTRUSTEDREVIP'  ],
      [$self->{relays_untrusted}, 'RELAYSUNTRUSTEDREVIP'],
      [$self->{relays_internal},  'RELAYSINTERNALREVIP' ],
      [$self->{relays_external},  'RELAYSEXTERNALREVIP' ])
  { my($rly, $tag) = @$tuple;
    my @revips;
    @revips = map {
      my($ip,$revip);
      $ip = $_->{ip}  if ref $_ && !$_->{ip_private};
      $revip = reverse_ip_address($ip)  if defined $ip && $ip ne '';
      defined $revip && $revip ne '' ? $revip : ();
    } @$rly  if $rly;
    $permsgstatus->set_tag($tag,
@revips == 1 ? $revips[0] : \@revips) if @revips;

These last four are currently undocumented, as they are not (yet)
a full substitute for the more complicated logic in a plugin DNSEval,
although the idea behind these was to provide data to askdns rules
that could eventually complement or replace check_rbl* eval calls
with their lastexternal, firsttrusted, notfirsthop, and untrusted
modifiers.

  Mark

Reply via email to