~ubuntu-branches/ubuntu/natty/spamassassin/natty

« back to all changes in this revision

Viewing changes to lib/Mail/SpamAssassin/Plugin/DKIM.pm

  • Committer: Package Import Robot
  • Author(s): Noah Meyerhans
  • Date: 2010-03-21 23:20:31 UTC
  • mfrom: (0.4.1) (1.4.1) (29.2.1 maverick)
  • Revision ID: package-import@ubuntu.com-20100321232031-ryqjxh9cx27epnka
Tags: 3.3.1-1
* New upstream version.
* Update several patches now that bugfixes have been incorporated
  upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 loadplugin Mail::SpamAssassin::Plugin::DKIM [/path/to/DKIM.pm]
25
25
 
26
26
Taking into account signatures from any signing domains:
 
27
 
27
28
 full   DKIM_SIGNED           eval:check_dkim_signed()
28
29
 full   DKIM_VALID            eval:check_dkim_valid()
29
30
 full   DKIM_VALID_AU         eval:check_dkim_valid_author_sig()
31
32
Taking into account signatures from specified signing domains only:
32
33
(quotes may be omitted on domain names consisting only of letters, digits,
33
34
dots, and minus characters)
 
35
 
34
36
 full   DKIM_SIGNED_MY1       eval:check_dkim_signed('dom1','dom2',...)
35
37
 full   DKIM_VALID_MY1        eval:check_dkim_valid('dom1','dom2',...)
36
38
 full   DKIM_VALID_AU_MY1     eval:check_dkim_valid_author_sig('d1','d2',...)
38
40
 full   __DKIM_DEPENDABLE     eval:check_dkim_dependable()
39
41
 
40
42
Author Domain Signing Practices (ADSP) from any author domains:
 
43
 
41
44
 header DKIM_ADSP_NXDOMAIN    eval:check_dkim_adsp('N')
42
45
 header DKIM_ADSP_ALL         eval:check_dkim_adsp('A')
43
46
 header DKIM_ADSP_DISCARD     eval:check_dkim_adsp('D')
46
49
 header DKIM_ADSP_CUSTOM_HIGH eval:check_dkim_adsp('3')
47
50
 
48
51
Author Domain Signing Practices (ADSP) from specified author domains only:
 
52
 
49
53
 header DKIM_ADSP_MY1         eval:check_dkim_adsp('*','dom1','dom2',...)
50
54
 
51
55
 describe DKIM_SIGNED   Message has a DKIM or DK signature, not necessarily valid
61
65
 describe DKIM_ADSP_CUSTOM_HIGH adsp_override is CUSTOM_HIGH, no valid author domain signature
62
66
 
63
67
For compatibility with pre-3.3.0 versions, the following are synonyms:
 
68
 
64
69
 OLD: eval:check_dkim_verified = NEW: eval:check_dkim_valid
65
70
 OLD: eval:check_dkim_signall  = NEW: eval:check_dkim_adsp('A')
66
71
 OLD: eval:check_dkim_signsome = NEW: redundant, semantically always true
418
423
How many seconds to wait for a DKIM query to complete, before
419
424
scanning continues without the DKIM result.
420
425
 
 
426
=back
 
427
 
421
428
=cut
422
429
 
423
430
  push (@cmds, {
494
501
    # don't bother
495
502
  } else {
496
503
    $self->_check_dkim_adsp($pms)  if !$pms->{dkim_checked_adsp};
 
504
 
497
505
    # an asterisk indicates any ADSP type can match (as long as
498
506
    # there is no valid author domain signature present)
499
 
    if ($adsp_char ne '*' &&
500
 
        !(grep { $_ eq $adsp_char} values %{$pms->{dkim_adsp}}) ) {
 
507
    $adsp_char = 'NAD123'  if $adsp_char eq '*';  # a shorthand for NAD123
 
508
 
 
509
    if ( !(grep { index($adsp_char,$_) >= 0 } values %{$pms->{dkim_adsp}}) ) {
501
510
      # not the right ADSP type
502
511
    } elsif (!@domains_list) {
503
512
      $result = 1;  # no additional constraints, any author domain will do
776
785
        }
777
786
      }
778
787
      if (would_log("dbg","dkim")) {
779
 
        dbg("dkim: i=%s, d=%s, a=%s, c=%s, %s%s, %s",
780
 
          $signature->identity, $d,
 
788
        dbg("dkim: %s, i=%s, d=%s, s=%s, a=%s, c=%s, %s%s, %s",
 
789
          map { !defined $_ ? '(undef)' : $_ }
 
790
          $signature->isa('Mail::DKIM::DkSignature') ? 'DK' : 'DKIM',
 
791
          $signature->identity, $d, $signature->selector,
781
792
          $signature->algorithm, scalar($signature->canonicalization),
782
793
          ($sig_result_supported ? $signature : $verifier)->result,
783
794
          !$expired ? '' : ', expired',