[opendmarc-users] opendmarc-import: throwing errors.

Dan Mahoney, System Admin danm at prime.gushi.org
Thu Dec 10 11:44:33 PST 2015


Please mail me the entire script off-list, or dump it up to a pastebin 
somewhere (make sure you remove any DB login info) -- the error on line 
278 is coming from another function that we're not seeing here.

-Dan

On Thu, 10 Dec 2015, Robert Chalmers wrote:

>
> Hi
>
> File top, including version
>
> #!/usr/bin/perl
> #
> # Copyright (c) 2012, 2014, The Trusted Domain Project.  All rights reserved.
> #
> # Script to import per-message DMARC data.
>
> ###
> ### Setup
> ###
>
> use strict;
> use warnings;
>
> use Switch;
>
> use DBI;
> use File::Basename;
> use Fcntl qw(:flock);
> use Getopt::Long;
> use POSIX;
>
> require DBD::mysql;
>
> # general
> my $progname      = basename($0);
> my $version       = "1.3.1";
> my $verbose       = 0;
> my $helponly      = 0;
> my $showversion   = 0;
>
>
>
> Lines surrounding 278. 278 is marked
>
> $dbi_s = $dbi_h->prepare("INSERT INTO signatures (message, domain, pass, error) VALUES(?, ?, ?, ?)");
>        foreach $dd (0 .. $#dkim_data)
>        {
>                my $sdomain;
>                my $pass;
>                my $error;
>
>                $sdomain = $dkim_data[$dd][0];
>                $pass = $dkim_data[$dd][1];
>                $error = $dkim_data[$dd][2];
>
>                $sdomain_id = get_table_id($sdomain, "domains");
>                if (!defined($sdomain_id))
>                {
>                        next;
>                }
>
>                if (!$dbi_s->execute($msg_id, $sdomain_id, $pass, $error))
>                {
>                        print STDERR "$progname: failed to insert DKIM data: " . $dbi_h->errstr . "\n";
>                        $dbi_s->finish;
>                        return;
>                }
>        }
>        $dbi_s->finish;
>
>        if (get_value("requests", "locked", $request_id) != 1)  <—————————————— LINE 278
>        {
>                if (scalar @rua > 0)
>                {
>                        $repuri = join(",", @rua);
>                        $dbi_s = $dbi_h->prepare("UPDATE requests SET repuri = ? WHERE id = ?");
>
>                        if (!$dbi_s->execute($repuri, $request_id))
>                        {
>                                print STDERR "$progname: failed to update reporting URI for $fdomain: " . $dbi_h->errstr . "\n";
>                                $dbi_s->finish;
>                                return;
>                        }
>
>                        $dbi_s->finish;
>                }
>                else
>                {
>                        $dbi_s = $dbi_h->prepare("UPDATE requests SET repuri = NULL WHERE id = ?");
>
>                        if (!$dbi_s->execute($request_id))
>                        {
>                                print STDERR "$progname: failed to update reporting URI for $fdomain: " . $dbi_h->errstr . "\n";
>                                $dbi_s->finish;
>                                return;
>                        }
>
>                        $dbi_s->finish;
>                }
>
>
>
>> On 10 Dec 2015, at 18:37, A. Schulze <sca at andreasschulze.de> wrote:
>>
>>
>> Robert Chalmers:
>>
>>> Use of uninitialized value in numeric ne (!=) at /usr/local/sbin/opendmarc-import line 278, <STDIN> line 19.
>>
>>
>> could you post your version and the lines around line 278 ?
>>
>> Andreas
>>
>> _______________________________________________
>> opendmarc-users mailing list
>> opendmarc-users at trusteddomain.org
>> http://www.trusteddomain.org/mailman/listinfo/opendmarc-users
>
> Robert Chalmers
> robert at chalmers.com.au  Quantum Radio: http://tinyurl.com/lwwddov
> Mac mini 6.2 - 2012, Intel Core i7,2.3 GHz, Memory:16 GB. El-Capitan 10.11. 2TB Storage made up of -
> Drive 0:HGST HTS721010A9E630. Upper bay. Drive 1:ST1000LM024 HN-M101MBB. Lower Bay
>
>
>
>
> _______________________________________________
> opendmarc-users mailing list
> opendmarc-users at trusteddomain.org
> http://www.trusteddomain.org/mailman/listinfo/opendmarc-users
>

-- 

"I am a professional drinker, and I know that that was NOT Jose Cuervo!"

"Well, what was it then?"

"I think it was some mixture of Rubbing Alcohol, and Desenex(TM) Foot
Powder, because my feet feel okay, and my back doesn't hurt, but my
stomach is killing me!"

-Dan Mahoney, Costa Rica, August 12th, 1994

--------Dan Mahoney--------
Techie,  Sysadmin,  WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144   AIM: LarpGM
Site:  http://www.gushi.org
---------------------------


More information about the opendmarc-users mailing list