nifu has asked for the wisdom of the Perl Monks concerning the following question:
Is the error in my PERL source code or in the system settings of the linux OS?#! /usr/bin/perl use strict; use Socket; use warnings; use Email::Simple; use DBI; use File::Copy; use Date::Parse; use DateTime; use Path::Tiny qw(path); use Mail::DKIM::Verifier; use Mail::SPF; use Encode; use utf8; open (MESSAGE, "< $ARGV[0]") || die "Couldn't open email $ARGV[0]\n"; undef $/; my $raw_email = <>; close MESSAGE; my $mail = Email::Simple->new($raw_email); my $return_path = $mail->header("Return-Path"); my $from_header = $mail->header("From"); my $ip = $mail->header("X-IP"); my $spf = &spf_check($ip,$return_path); sub spf_check { my ($ip, $domain); ($ip, $domain) = @_; $domain =~ s/<|>//g; $domain =~ s/^.*@//g; my $spf_server = Mail::SPF::Server->new(); my $spf_request = Mail::SPF::Request->new ( versions => [1,2], scope => 'mfrom', identity => $domain, ip_address => $ip ); my $return = $spf_server->process($spf_request); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DNS problems with Mail::SPF
by Corion (Patriarch) on Aug 01, 2018 at 07:03 UTC | |
by nifu (Novice) on Aug 01, 2018 at 08:14 UTC | |
by Corion (Patriarch) on Aug 01, 2018 at 08:17 UTC | |
by nifu (Novice) on Aug 01, 2018 at 08:32 UTC | |
by nifu (Novice) on Aug 01, 2018 at 09:21 UTC | |
|
Re: DNS problems with Mail::SPF
by rizzo (Curate) on Aug 02, 2018 at 08:55 UTC |