[opendmarc-users] opendmarc-import: throwing errors.
Robert Chalmers
robert at chalmers.com.au
Thu Dec 10 10:51:52 PST 2015
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
More information about the opendmarc-users
mailing list