[Mimedefang] SPF integration problem

An.H.Nguyen annguyen251 at hotmail.com
Wed Aug 1 03:21:09 EDT 2007


I have these errors when I tried to implement SPF check.

Jul 31 23:52:02 hestia mimedefang-multiplexor[29566]: [ID 980602 mail.info] 
Slave 0 stderr: no IP address given at /usr/local/
lib/perl5/site_perl/5.8.7/Mail/SPF/Query.pm line 255, <STDIN> line 1.
Jul 31 23:52:02 hestia mimedefang-multiplexor[29566]: [ID 389462 mail.error] 
Slave 0 died prematurely -- check your filter rul
es
Jul 31 23:52:02 hestia mimedefang-multiplexor[29566]: [ID 204284 mail.error] 
Reap: slave 0 (pid 628) exited normally with stat
us 9 (SLAVE DIED UNEXPECTEDLY)
Jul 31 23:52:02 hestia mimedefang[29579]: [ID 847421 mail.error] Error from 
multiplexor: ERR No response from slave

What have I missed?
Can someone please give me an example of the mimedefang-filter code and all 
requirements which can make SPF work?
Thanks,
An Nguyen

Here's my code (after I commented out)
# use Mail::SPF::Query;
#  %PROCEDURE: spf_query
# sub spf_query ($$$$) {
      # my ($ip, $sender, $helo, $guess) = @_;
      # The guess parameter needs to be set to either 0 or 1.
      # if ($guess != 1) {
              # $guess = 0;
      # }
      # Check this sender against any SPF or Caller-ID records
      # that might be available.
      # my $query = new Mail::SPF::Query ( ip           => $ip,
                                         # sender       => $sender,
                                         # helo         => $helo,
                                         # guess        => $guess,
                                         # callerid     => {
                                              # "*."    => {
                                              # check   => 1 } }
      # );
      # my ($result, $smtp_comment, $header_comment, $spf_record) = 
$query->result();
      # return ($result, $smtp_comment, $header_comment, $spf_record);
# }

sub filter_sender {
# Query for SPF information with guess mode off
      # my ($result, $smtp_comment, $header_comment, $spf_record) =
              # spf_query ($ip, $sender, $helo, 0);

      # If SPF says this sender is not coming from an authorized MTA,
      # then reject it.
      # if ($result eq "fail") {
         # md_syslog ('info', "Received-SPF: $result ($header_comment) " .
              # "$spf_record, Helo=$helo");
         # return('REJECT', "Access Denied (SPF) [$smtp_comment], " .
              # "Relay=$hostname [$ip], Helo=$helo");
      # } else {
              # return ('CONTINUE', "ok");
      # }







More information about the MIMEDefang mailing list