This file is indexed.

/usr/share/perl5/Octopussy/Plugin/SMTP.pm is in octopussy 1.0.6-0ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# $HeadURL$
# $Revision: 321 $
# $Date: 2010-02-26 18:27:48 +0000 (Fri, 26 Feb 2010) $
# $Author: sebthebert $

=head1 NAME

Octopussy::Plugin::SMTP - Octopussy Plugin SMTP

=cut

package Octopussy::Plugin::SMTP;

use strict;
use warnings;

use Octopussy;

my @bounce_types = (
  {
    re   => qr/^Bad destination host.*$/i,
    type => 'Bad Destination Host'
  },
  {
    re   => qr/^Unknown address error.*$/i,
    type => 'Unknown Address Error'
  },
);

my @response_types = (
  {
    re   => qr/^.*accepted for delivery.*$/i,
    type => 'Accepeted for delivery'
  },
  {
    re   => qr/^.*Message.* accepted.*$/i,
    type => 'Message accepted'
  },
  {
    re   => qr/^.*message queued.*$/i,
    type => 'Queued'
  },
  {
    re   => qr/^ok.*$/i,
    type => 'Ok'
  },
  {
    re   => qr/.*ok\.*$/i,
    type => 'Ok'
  },
  {
    re   => qr/^.* queued as .*$/i,
    type => 'Queued'
  },
  {
    re   => qr/^.*Queued mail.*$/i,
    type => 'Queued'
  },
  {
    re   => qr/^.*Requested mail action okay.*$/i,
    type => 'Requested mail action okay'
  },
);

=head1 FUNCTIONS

=head2 Init()

=cut

sub Init
{
}

=head2 Bounce_Type($bounce) 

Returns Bounce Type

=cut

sub Bounce_Type
{
  my $bounce = shift;

  return (undef) if (!defined $bounce);
  foreach my $bt (@bounce_types)
  {
    return ($bt->{type}) if ($bounce =~ $bt->{re});
  }

  return ($bounce);
}

=head2 Response_Type($response)

Returns Response Type

=cut

sub Response_Type
{
  my $response = shift;

  return (undef) if (!defined $response);
  foreach my $rt (@response_types)
  {
    return ($rt->{type}) if ($response =~ $rt->{re});
  }

  return ($response);
}

=head2 Recipients_Count($recipients_list)

Reurns number of recipients

=cut

sub Recipients_Count
{
  my $recipients_list = shift;

  my @recipients = split /,/, $recipients_list;

  return (scalar @recipients);
}

1;

=head1 AUTHOR

Sebastien Thebert <octo.devel@gmail.com>

=cut