Mailing List Archive

Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$
Package: libmail-spf-query-perl
Version: 1:1.999.1-1
Severity: normal

,----[ spfquery --version ]
spfquery version 2.3

`----
,----[ spfquery --help ]
[[ ... ]]
Examples:
spfquery -i 11.22.33.44 -m user@example.com -h spammer.example.net
spfquery -f test_data
echo "127.0.0.1 user@example.com helohost.example.com" | spfquery -f -
`----

,----[ spfquery -i 11.22.33.44 -m user@example.com -h spammer.example.net ]
Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
`----
,----[. spfquery -ip=11.22.33.44 -sender=user@example.com -helo=spammer.example.net }
Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
`----

,----[ spfquery -i 199.184.165.135 -m jam@tux.org -h gwyn.tux.org ]
Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
`----
,----[ spfquery -ip=199.184.165.135 -sender=jam@tux.org -helo=gwyn.tux.org ]
Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
`----

Please see below for same package same commands on another Debian box.

-- System Information:
Debian Release: 3.1
Architecture: i386 (i586)
Kernel: Linux 2.6.8-2-386
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages libmail-spf-query-perl depends on:
ii libnet-cidr-lite-perl 0.15-1 Merge IPv4 or IPv6 CIDR address ra
ii libnet-dns-perl 0.48-1 Perform DNS queries from a Perl sc
ii libsys-hostname-long-perl 1.2-1 Figure out the long (fully-qualifi
ii liburi-perl 1.35-1 Manipulates and accesses URI strin
ii perl 5.8.4-8sarge4 Larry Wall's Practical Extraction

-- no debconf information

Same package same commands on another Debian box

Package: libmail-spf-query-perl
Version: 1:1.999.1-1

,----[ spfquery --version ]
spfquery version information:
SPF test system version: 2.1
Compiled with SPF library version: 1.0.0
Running with SPF library version: 1.0.0

Usage:

spfquery [control options | data options] ...

Use the -help option for more information
`----
,----[ spfquery --help ]
[[ ... ]]
Examples:

spfquery -ip=11.22.33.44 -sender=user@aol.com -helo=spammer.tld
spfquery -f test_data
echo "127.0.0.1 myname@mydomain.com helohost.com" | spfquery -f -
`----
,----[ spfquery -ip=11.22.33.44 -sender=user@aol.com -helo=spammer.tld ]
neutral

spfquery: 11.22.33.44 is neither permitted nor denied by domain of aol.com
Received-SPF: neutral (spfquery: 11.22.33.44 is neither permitted nor denied by domain of aol.com) client-ip=11.22.33.44; envelope-from=user@aol.com; helo=spammer.tld; problem=;
`----
,----[ spfquery -ip=199.184.165.135 -sender=jam@tux.org -helo=gwyn.tux.org ]
pass

spfquery: domain of tux.org designates 199.184.165.135 as permitted sender
Received-SPF: pass (spfquery: domain of tux.org designates 199.184.165.135 as permitted sender) client-ip=199.184.165.135; envelope-from=jam@tux.org; helo=gwyn.tux.org;
`----

The following files are identical on both boxen:

/usr/bin/spfquery
/usr/share/perl5/Mail/SPF/Query.pm

-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (990, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-1-k7
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libmail-spf-query-perl depends on:
ii libnet-cidr-lite-perl 0.20-1 Merge IPv4 or IPv6 CIDR address ra
ii libnet-dns-perl 0.57-1 Perform DNS queries from a Perl sc
ii libsys-hostname-long-perl 1.4-1 Figure out the long (fully-qualifi
ii liburi-perl 1.35-2 Manipulates and accesses URI strin
ii perl 5.8.8-4 Larry Wall's Practical Extraction

libmail-spf-query-perl recommends no packages.

-- no debconf information

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$ [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John A. Martin wrote:
> Package: libmail-spf-query-perl
> Version: 1:1.999.1-1
> Severity: normal
>
> ,----[ spfquery --version ]
> spfquery version 2.3
>
> `----
> [...]
> ,----[ spfquery -i 11.22.33.44 -m user@example.com -h spammer.example.net ]
> Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
> `----
> ,----[ spfquery -ip=11.22.33.44 -sender=user@example.com -helo=spammer.example.net ]
> Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
> `----
> ,----[ spfquery -i 199.184.165.135 -m jam@tux.org -h gwyn.tux.org ]
> Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
> `----
> ,----[ spfquery -ip=199.184.165.135 -sender=jam@tux.org -helo=gwyn.tux.org ]
> Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
> `----

I can't reproduce any of these with the spfquery of libmail-spf-query-perl
1:1.999.1-1. These are my package versions:

| Versions of packages libmail-spf-query-perl depends on:
| ii libnet-cidr-lite-perl 0.20-1
| ii libnet-dns-perl 0.57-1
| ii libsys-hostname-long-perl 1.4-1
| ii liburi-perl 1.35-2
| ii perl 5.8.8-4

It seems those package versions are identical to the second system of
yours.

> Same package same commands on another Debian box
>
> ,----[ spfquery --version ]
> spfquery version information:
> SPF test system version: 2.1
> Compiled with SPF library version: 1.0.0
> Running with SPF library version: 1.0.0
> [...]
> `----
> [...]
> The following files are identical on both boxen:
>
> /usr/bin/spfquery
> /usr/share/perl5/Mail/SPF/Query.pm

I don't think so. The spfquery you execute on the second system most
likely is the one from the "spfquery" package (which is supposed to
conflict with "libmail-spf-query-perl"):

http://packages.debian.org/cgi-bin/search_contents.pl?word=usr/bin/spfquery&searchmode=searchfiles&case=insensitive&version=testing&arch=i386

> [System with libmail-spf-query-perl's "spfquery":]
> Versions of packages libmail-spf-query-perl depends on:
> ii libnet-cidr-lite-perl 0.15-1
> ii libnet-dns-perl 0.48-1
> ii libsys-hostname-long-perl 1.2-1
> ii liburi-perl 1.35-1
> ii perl 5.8.4-8sarge4

> [System with spfquery's "spfquery":]
> Versions of packages libmail-spf-query-perl depends on:
> ii libnet-cidr-lite-perl 0.20-1
> ii libnet-dns-perl 0.57-1
> ii libsys-hostname-long-perl 1.4-1
> ii liburi-perl 1.35-2
> ii perl 5.8.8-4

Do you have the "spfquery" package installed on the second system? What's
the output of `which -a spfquery` on both systems?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEW97VwL7PKlBZWjsRAs/xAKDixUpu6nJMXMdqs9MN1cPchDS9ZACg5yeU
mcqLx83lKYHQFiceqQj/ZN0=
=N2wa
-----END PGP SIGNATURE-----

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$ [ In reply to ]
>>>>> "Julian" == Julian Mehnle
>>>>> "Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$"
>>>>> Fri, 5 May 2006 23:25:07 +0000

Julian> John A. Martin wrote:
>> Package: libmail-spf-query-perl
>> Version: 1:1.999.1-1
>> Severity: normal
>>
>> ,----[ spfquery --version ]
>> spfquery version 2.3
>>
>> `----
>> [...]
>> ,----[ spfquery -i 11.22.33.44 -m user@example.com -h spammer.example.net ]
>> Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
>> `----
>> ,----[ spfquery -ip=11.22.33.44 -sender=user@example.com -helo=spammer.example.net ]
>> Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
>> `----
>> ,----[ spfquery -i 199.184.165.135 -m jam@tux.org -h gwyn.tux.org ]
>> Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
>> `----
>> ,----[ spfquery -ip=199.184.165.135 -sender=jam@tux.org -helo=gwyn.tux.org ]
>> Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
>> `----

Julian> I can't reproduce any of these with the spfquery of
Julian> libmail-spf-query-perl 1:1.999.1-1. These are my package
Julian> versions:

Julian> | Versions of packages libmail-spf-query-perl depends on:
Julian> | ii libnet-cidr-lite-perl 0.20-1
Julian> | ii libnet-dns-perl 0.57-1
Julian> | ii libsys-hostname-long-perl 1.4-1
Julian> | ii liburi-perl 1.35-2
Julian> | ii perl 5.8.8-4

Julian> It seems those package versions are identical to the
Julian> second system of yours.

Right. The second of my systems is replicated several places and has
worked well all along.

>> Same package same commands on another Debian box
>>
>> ,----[ spfquery --version ]
>> spfquery version information:
>> SPF test system version: 2.1
>> Compiled with SPF library version: 1.0.0
>> Running with SPF library version: 1.0.0
>> [...]
>> `----
>> [...]
>> The following files are identical on both boxen:
>>
>> /usr/bin/spfquery
>> /usr/share/perl5/Mail/SPF/Query.pm

Julian> I don't think so. The spfquery you execute on the second
Julian> system most likely is the one from the "spfquery" package
Julian> (which is supposed to conflict with
Julian> "libmail-spf-query-perl"):

Either we have md5 collisions or I can't cut'n paste between terminal
emulators. :)

1bca72ffa103c00d2b51cd0f9407c4de /usr/bin/spfquery
1bca72ffa103c00d2b51cd0f9407c4de /usr/bin/spfquery

f9dbed146a34a8e11067fea1be3dd37d /usr/share/perl5/Mail/SPF/Query.pm
f9dbed146a34a8e11067fea1be3dd37d /usr/share/perl5/Mail/SPF/Query.pm

Julian> http://packages.debian.org/cgi-bin/search_contents.pl?word=usr/bin/spfquery&searchmode=searchfiles&case=insensitive&version=testing&arch=i386

>> [System with libmail-spf-query-perl's "spfquery":]
>> Versions of packages libmail-spf-query-perl depends on:
>> ii libnet-cidr-lite-perl 0.15-1
>> ii libnet-dns-perl 0.48-1
>> ii libsys-hostname-long-perl 1.2-1
>> ii liburi-perl 1.35-1
>> ii perl 5.8.4-8sarge4

>> [System with spfquery's "spfquery":]
>> Versions of packages libmail-spf-query-perl depends on:
>> ii libnet-cidr-lite-perl 0.20-1
>> ii libnet-dns-perl 0.57-1
>> ii libsys-hostname-long-perl 1.4-1
>> ii liburi-perl 1.35-2
>> ii perl 5.8.8-4

NB. The first above gives the errors and is Debian Release: 3.1
(ie. stable). The second above appears to work OK and is Debian
Release: testing/unstable. 'dlocate -l spf' on both gives only

ii libmail-spf-query-perl 1.999.1-1

Julian> Do you have the "spfquery" package installed on the second
Julian> system? What's the output of `which -a spfquery` on both
Julian> systems?

You nailed part of the confusion:

,----[ First box: which -a spfquery ]
/usr/bin/spfquery
`----

,----[ Second box: which -a spfquery ]
/usr/local/bin/spfquery
/usr/bin/spfquery
/usr/bin/X11/spfquery
`----

I can only guess that /usr/local/bin/spfquery never came from a .deb
but maybe from playing with libspf2 in Jan 2005. (/usr/bin/X11 is a
symlink to /usr/bin)

Removing /usr/local/bin/spfquery and repeating the commands in the
original bug report gives the following.

Package: libmail-spf-query-perl
Version: 1:1.999.1-1

,----[ spfquery --version ]
spfquery version 2.3

`----
,----[ spfquery --help ]
[[ ... ]]
Examples:
spfquery -i 11.22.33.44 -m user@example.com -h spammer.example.net
spfquery -f test_data
echo "127.0.0.1 user@example.com helohost.example.com" | spfquery -f -
`----
,----[ spfquery -i 11.22.33.44 -m user@example.com -h spammer.example.net ]
none
SPF: domain of sender user@example.com does not designate mailers
spfquery: domain of user@example.com does not designate permitted sender hosts
Received-SPF: none (spfquery: domain of user@example.com does not designate permitted sender hosts) client-ip=11.22.33.44; envelope-from=user@example.com; helo=spammer.example.net;
`----
,----[ spfquery -i 199.184.165.135 -m jam@tux.org -h gwyn.tux.org ]
pass
Please see http://www.openspf.org/why.html?sender=jam%40tux.org&ip=199.184.165.135&receiver=spfquery: tux.org MX gwyn.tux.org A 199.184.165.135
spfquery: domain of jam@tux.org designates 199.184.165.135 as permitted sender
Received-SPF: pass (spfquery: domain of jam@tux.org designates 199.184.165.135 as permitted sender) client-ip=199.184.165.135; envelope-from=jam@tux.org; helo=gwyn.tux.org;
`----

Now that we have the second "working" box working right, why does
the first box fail?

We have

,----[ dpkg -s libmail-spf-query-perl|grep Depends: ]
Depends: perl (>= 5.6.0-16), libsys-hostname-long-perl,
libnet-dns-perl (>= 0.46), libnet-cidr-lite-perl (>= 0.15),
liburi-perl
`----

compared to

,----[ excerpt from reportbug output ]
Versions of packages libmail-spf-query-perl depends on:
ii libnet-cidr-lite-perl 0.15-1 Merge IPv4 or IPv6 CIDR address ra
ii libnet-dns-perl 0.48-1 Perform DNS queries from a Perl sc
ii libsys-hostname-long-perl 1.2-1 Figure out the long (fully-qualifi
ii liburi-perl 1.35-1 Manipulates and accesses URI strin
ii perl 5.8.4-8sarge4 Larry Wall's Practical Extraction
`----

jam

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$ [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John A. Martin wrote:
> Now that we have the second "working" box working right, why does the
> first box fail?

Please give me the output of...

perl -MCarp=verbose /usr/bin/spfquery -i 199.184.165.135 -m jam@tux.org -h gwyn.tux.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEXTT0wL7PKlBZWjsRAulGAKDT2+luDOmrzt0RwqLDePCNX9B8UQCfRJc8
+y4dvrcahsdPmvoNRWjnEZI=
=jJmi
-----END PGP SIGNATURE-----

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$ [ In reply to ]
>>>>> "Julian" == Julian Mehnle
>>>>> "Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$"
>>>>> Sat, 6 May 2006 23:44:52 +0000

Julian> John A. Martin wrote:
>> Now that we have the second "working" box working right, why
>> does the first box fail?

Julian> Please give me the output of...

Julian> perl -MCarp=verbose /usr/bin/spfquery -i 199.184.165.135
Julian> -m jam@tux.org -h gwyn.tux.org

On the broken first box

,----[ perl -MCarp=verbose /usr/bin/spfquery -i 199.184.165.135 -m jam@tux.org -h gwyn.tux.org ]
Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
`----

On the good second box

,----[ perl -MCarp=verbose /usr/bin/spfquery -i 199.184.165.135 -m jam@tux.org -h gwyn.tux.org ]
pass
Please see http://www.openspf.org/why.html?sender=jam%40tux.org&ip=199.184.165.135&receiver=spfquery: tux.org MX gwyn.tux.org A 199.184.165.135
spfquery: domain of jam@tux.org designates 199.184.165.135 as permitted sender
Received-SPF: pass (spfquery: domain of jam@tux.org designates 199.184.165.135 as permitted sender) client-ip=199.184.165.135; envelope-from=jam@tux.org; helo=gwyn.tux.org;
`----

jam

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$ [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John A. Martin wrote:
> > Please give me the output of...
> >
> > perl -MCarp=verbose /usr/bin/spfquery -i 199.184.165.135 -m jam@tux.org -h gwyn.tux.org
>
> On the broken first box
>
> ,----[ perl -MCarp=verbose /usr/bin/spfquery -i 199.184.165.135 -m jam@tux.org -h gwyn.tux.org ]
> Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
> `----

WTF? It should have dumped a stack trace... The Socket.pm XS code
probably doesn't care. Oh well.

Alright, let's resort to heavy weapons. Please run...

perl -d /usr/bin/spfquery -i 199.184.165.135 -m jam@tux.org -h gwyn.tux.org

...type "c<Enter>", and give me the output.

> On the good second box

Let's not care about the good, second box anymore.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEXcnPwL7PKlBZWjsRAhLvAJ9rkSL8AFPOpcBFAZXuVBWhFiAsygCePDdk
6A4mmWlvisqJBjgyDrA78NA=
=zsua
-----END PGP SIGNATURE-----

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$ [ In reply to ]
>>>>> "Julian" == Julian Mehnle
>>>>> "Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$"
>>>>> Sun, 7 May 2006 10:19:58 +0000

Julian> John A. Martin wrote:
>> > Please give me the output of...
>> >
>> > perl -MCarp=verbose /usr/bin/spfquery -i 199.184.165.135 -m
>> > jam@tux.org -h gwyn.tux.org
>>
>> On the broken first box
>>
>> ,----[. perl -MCarp=verbose /usr/bin/spfquery -i 199.184.165.135
>> -m jam@tux.org -h gwyn.tux.org ] Bad arg length for
>> Socket::pack_sockaddr_in, length is 0, should be 4 at
>> /usr/lib/perl/5.8/Socket.pm line 201. `----

Julian> WTF? It should have dumped a stack trace... The
Julian> Socket.pm XS code probably doesn't care. Oh well.

Julian> Alright, let's resort to heavy weapons. Please run...

Julian> perl -d /usr/bin/spfquery -i 199.184.165.135 -m
Julian> jam@tux.org -h gwyn.tux.org

Julian> ...type "c<Enter>", and give me the output.

>> On the good second box

Julian> Let's not care about the good, second box anymore.

,----[ perl -d /usr/bin/spfquery -i 199.184.165.135 -m jam@tux.org -h gwyn.tux.org ]

Loading DB routines from perl5db.pl version 1.25
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(/usr/bin/spfquery:3): eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
main::(/usr/bin/spfquery:4): if 0; # not running under some shell
DB<1> c
Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
Socket::sockaddr_in(53, 'undef') called at /usr/lib/perl5/Net/DNS/Resolver/Base.pm line 626
Net::DNS::Resolver::Base::send_udp('Net::DNS::Resolver=HASH(0x877db04)', 'Net::DNS::Packet=HASH(0x84b8504)', 'X\'\x{1}\x{0}\x{0}\x{1}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{3}tux\x{3}org\x{0}\x{0}\x{10}\x{0}\x{1}') called at /usr/lib/perl5/Net/DNS/Resolver/Base.pm line 449
Net::DNS::Resolver::Base::send('Net::DNS::Resolver=HASH(0x877db04)', 'Net::DNS::Packet=HASH(0x84b8504)') called at /usr/lib/perl5/Net/DNS/Resolver/Base.pm line 431
Net::DNS::Resolver::Base::query('Net::DNS::Resolver=HASH(0x877db04)', 'tux.org', 'TXT') called at /usr/share/perl5/Mail/SPF/Query.pm line 1233
Mail::SPF::Query::myquery('Mail::SPF::Query=HASH(0x8765e7c)', 'tux.org', 'TXT', 'char_str_list') called at /usr/share/perl5/Mail/SPF/Query.pm line 1662
DirectiveSet::new('DirectiveSet', 'tux.org', 'Mail::SPF::Query=HASH(0x8765e7c)', 'undef', 'undef', 'undef') called at /usr/share/perl5/Mail/SPF/Query.pm line 892
Mail::SPF::Query::spfquery('Mail::SPF::Query=HASH(0x8765e7c)') called at /usr/share/perl5/Mail/SPF/Query.pm line 418
Mail::SPF::Query::result('Mail::SPF::Query=HASH(0x8765e7c)') called at /usr/bin/spfquery line 457
main::do_query() called at /usr/bin/spfquery line 391
Debugged program terminated. Use q to quit or R to restart,
use O inhibit_exit to avoid stopping after program termination,
h q, h R or h O to get additional info.
DB<1> q
`----

jam

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$ [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John A. Martin wrote:
> ,----[ perl -d /usr/bin/spfquery -i 199.184.165.135 -m jam@tux.org -h gwyn.tux.org ]
> [...]
> Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
>         Socket::sockaddr_in(53, 'undef') called at /usr/lib/perl5/Net/DNS/Resolver/Base.pm line 626
>         Net::DNS::Resolver::Base::send_udp('Net::DNS::Resolver=HASH(0x877db04)', 'Net::DNS::Packet=HASH(0x84b8504)', 'X\'\x{1}\x{0}\x{0}\x{1}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{3}tux\x{3}org\x{0}\x{0}\x{10}\x{0}\x{1}') called at /usr/lib/perl5/Net/DNS/Resolver/Base.pm line 449
>         Net::DNS::Resolver::Base::send('Net::DNS::Resolver=HASH(0x877db04)', 'Net::DNS::Packet=HASH(0x84b8504)') called at /usr/lib/perl5/Net/DNS/Resolver/Base.pm line 431
>         Net::DNS::Resolver::Base::query('Net::DNS::Resolver=HASH(0x877db04)', 'tux.org', 'TXT') called at /usr/share/perl5/Mail/SPF/Query.pm line 1233
>         Mail::SPF::Query::myquery('Mail::SPF::Query=HASH(0x8765e7c)', 'tux.org', 'TXT', 'char_str_list') called at /usr/share/perl5/Mail/SPF/Query.pm line 1662
>         DirectiveSet::new('DirectiveSet', 'tux.org', 'Mail::SPF::Query=HASH(0x8765e7c)', 'undef', 'undef', 'undef') called at /usr/share/perl5/Mail/SPF/Query.pm line 892
>         Mail::SPF::Query::spfquery('Mail::SPF::Query=HASH(0x8765e7c)') called at /usr/share/perl5/Mail/SPF/Query.pm line 418
>         Mail::SPF::Query::result('Mail::SPF::Query=HASH(0x8765e7c)') called at /usr/bin/spfquery line 457
>         main::do_query() called at /usr/bin/spfquery line 391
> Debugged program terminated.  Use q to quit or R to restart,
>   use O inhibit_exit to avoid stopping after program termination,
>   h q, h R or h O to get additional info.
>   DB<1> q
> `----

I could not reproduce the problem in a Sarge chroot:

| [sarge] gray:~> dpkg -l libmail-spf-query-perl libnet-cidr-lite-perl libnet-dns-perl libsys-hostname-long-perl liburi-perl perl
| Desired=Unknown/Install/Remove/Purge/Hold
| | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
| |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
| ||/ Name Version Description
| +++-===================-===================-======================================================
| ii libmail-spf-query-p 1.999.1-1 query SPF (Sender Policy Framework) to validate mail s
| ii libnet-cidr-lite-pe 0.15-1 Merge IPv4 or IPv6 CIDR address ranges
| ii libnet-dns-perl 0.48-1 Perform DNS queries from a Perl script
| ii libsys-hostname-lon 1.2-1 Figure out the long (fully-qualified) hostname
| ii liburi-perl 1.35-1 Manipulates and accesses URI strings
| ii perl 5.8.4-8sarge4 Larry Wall's Practical Extraction and Report Language
| [sarge] gray:~> spfquery -i 199.184.165.135 -m jam@tux.org -h gwyn.tux.org
| pass
| Please see http://www.openspf.org/why.html?sender=jam%40tux.org&ip=199.184.165.135&receiver=spfquery: tux.org MX gwyn.tux.org A 199.184.165.135
| spfquery: domain of jam@tux.org designates 199.184.165.135 as permitted sender
| Received-SPF: pass (spfquery: domain of jam@tux.org designates 199.184.165.135 as permitted sender) client-ip=199.184.165.135; envelope-from=jam@tux.org; helo=gwyn.tux.org;

So I guess it must be a configuration problem on your machine.

Please give me the output of...

perl -MNet::DNS -e 'print(map("$_\n", Net::DNS::Resolver->new->nameservers))'
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEXfopwL7PKlBZWjsRAltiAKDACJApf/8zNmM41/5xFtu294uVWQCePK/Q
MK8lPokUaoctkmE/gYq3saQ=
=3uax
-----END PGP SIGNATURE-----

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$ [ In reply to ]
>>>>> "Julian" == Julian Mehnle
>>>>> "Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$"
>>>>> Sun, 7 May 2006 13:46:16 +0000

Julian> John A. Martin wrote:
>> ,----[ perl -d /usr/bin/spfquery -i 199.184.165.135 -m jam@tux.org -h gwyn.tux.org ]
>> [...]
>> Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm line 201.
>>         Socket::sockaddr_in(53, 'undef') called at /usr/lib/perl5/Net/DNS/Resolver/Base.pm line 626
>>         Net::DNS::Resolver::Base::send_udp('Net::DNS::Resolver=HASH(0x877db04)', 'Net::DNS::Packet=HASH(0x84b8504)', 'X\'\x{1}\x{0}\x{0}\x{1}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{3}tux\x{3}org\x{0}\x{0}\x{10}\x{0}\x{1}') called at /usr/lib/perl5/Net/DNS/Resolver/Base.pm line 449
>>         Net::DNS::Resolver::Base::send('Net::DNS::Resolver=HASH(0x877db04)', 'Net::DNS::Packet=HASH(0x84b8504)') called at /usr/lib/perl5/Net/DNS/Resolver/Base.pm line 431
>>         Net::DNS::Resolver::Base::query('Net::DNS::Resolver=HASH(0x877db04)', 'tux.org', 'TXT') called at /usr/share/perl5/Mail/SPF/Query.pm line 1233
>>         Mail::SPF::Query::myquery('Mail::SPF::Query=HASH(0x8765e7c)', 'tux.org', 'TXT', 'char_str_list') called at /usr/share/perl5/Mail/SPF/Query.pm line 1662
>>         DirectiveSet::new('DirectiveSet', 'tux.org', 'Mail::SPF::Query=HASH(0x8765e7c)', 'undef', 'undef', 'undef') called at /usr/share/perl5/Mail/SPF/Query.pm line 892
>>         Mail::SPF::Query::spfquery('Mail::SPF::Query=HASH(0x8765e7c)') called at /usr/share/perl5/Mail/SPF/Query.pm line 418
>>         Mail::SPF::Query::result('Mail::SPF::Query=HASH(0x8765e7c)') called at /usr/bin/spfquery line 457
>>         main::do_query() called at /usr/bin/spfquery line 391
>> Debugged program terminated.  Use q to quit or R to restart,
>>   use O inhibit_exit to avoid stopping after program termination,
>>   h q, h R or h O to get additional info.
>>   DB<1> q
>> `----

Julian> I could not reproduce the problem in a Sarge chroot:

There were no funny characters in my boxquote. :)

Julian> | [sarge] gray:~> dpkg -l libmail-spf-query-perl libnet-cidr-lite-perl libnet-dns-perl libsys-hostname-long-perl liburi-perl perl
Julian> | Desired=Unknown/Install/Remove/Purge/Hold
Julian> | | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
Julian> | |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
Julian> | ||/ Name Version Description
Julian> | +++-===================-===================-======================================================
Julian> | ii libmail-spf-query-p 1.999.1-1 query SPF (Sender Policy Framework) to validate mail s
Julian> | ii libnet-cidr-lite-pe 0.15-1 Merge IPv4 or IPv6 CIDR address ranges
Julian> | ii libnet-dns-perl 0.48-1 Perform DNS queries from a Perl script
Julian> | ii libsys-hostname-lon 1.2-1 Figure out the long (fully-qualified) hostname
Julian> | ii liburi-perl 1.35-1 Manipulates and accesses URI strings
Julian> | ii perl 5.8.4-8sarge4 Larry Wall's Practical Extraction and Report Language
Julian> | [sarge] gray:~> spfquery -i 199.184.165.135 -m jam@tux.org -h gwyn.tux.org
Julian> | pass
Julian> | Please see http://www.openspf.org/why.html?sender=jam%40tux.org&ip=199.184.165.135&receiver=spfquery: tux.org MX gwyn.tux.org A 199.184.165.135
Julian> | spfquery: domain of jam@tux.org designates 199.184.165.135 as permitted sender
Julian> | Received-SPF: pass (spfquery: domain of jam@tux.org designates 199.184.165.135 as permitted sender) client-ip=199.184.165.135; envelope-from=jam@tux.org; helo=gwyn.tux.org;

Same versions as my Sarge box.

Julian> So I guess it must be a configuration problem on your
Julian> machine.

Julian> Please give me the output of...

Julian> perl -MNet::DNS -e 'print(map("$_\n",
Julian> Net::DNS::Resolver->new->nameservers))'

,----[ perl -MNet::DNS -e 'print(map("$_\n", Net::DNS::Resolver->new->nameservers))' ]
127.0.0.1
198.6.1.1,
198.6.1.142
`----

And, no surprise:

,----[ cat /etc/resolv.conf ]
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
nameserver 198.6.1.1,
nameserver 198.6.1.142
search essential.org
`----
,----[ dig +sh @localhost. gwyn.tux.org. ]
199.184.165.135
`----

jam

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$ [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John A. Martin wrote:
> > >  Use q to quit or R to restart,   use O inhibit_exit to avoid
> > > stopping after program termination,   h q, h R or h O to get
> > > additional info.
> > >   DB<1> q
> > > `----
> >
> > I could not reproduce the problem in a Sarge chroot:
>
> There were no funny characters in my boxquote. :)

True. (Stupid KMail uses &nbsp; (0xC2 0xA0 in UTF-8) to render consecutive
spaces in its HTML message view, and it doesn't change them back to 0x20
when text is copied from there.)

> ,----[ perl -MNet::DNS -e 'print(map("$_\n", Net::DNS::Resolver->new->nameservers))' ]
> 127.0.0.1
> 198.6.1.1,
> 198.6.1.142
> `----
>
> And, no surprise:
>
> ,----[ cat /etc/resolv.conf ]
> # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
> # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.0.1
> nameserver 198.6.1.1,
> nameserver 198.6.1.142
> search essential.org
> `----

Please remove the trailing comma after "nameserver 198.6.1.1" in your
resolvconf configuration. I expect this solves your problem, right?

If you ever happen to visit Munich, remember to invite me for drinks. ;-)

Julian.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEXhLXwL7PKlBZWjsRAk9pAJ98hvULbmvg8vokuVxC6nOMUsrXhwCfQkTQ
a6hbVDRvvfYszCFXlEjEWXI=
=5yRx
-----END PGP SIGNATURE-----

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$ [ In reply to ]
>>>>> "Julian" == Julian Mehnle
>>>>> "Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$"
>>>>> Sun, 7 May 2006 15:31:34 +0000

Julian> John A. Martin wrote:
>> ,----[ perl -MNet::DNS -e 'print(map("$_\n", Net::DNS::Resolver->new->nameservers))' ]
>> 127.0.0.1
>> 198.6.1.1,
>> 198.6.1.142
>> `----
>>
>> And, no surprise:
>>
>> ,----[ cat /etc/resolv.conf ]
>> # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
>> # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
>> nameserver 127.0.0.1
>> nameserver 198.6.1.1,
>> nameserver 198.6.1.142
>> search essential.org
>> `----

Julian> Please remove the trailing comma after "nameserver
Julian> 198.6.1.1" in your resolvconf configuration. I expect
Julian> this solves your problem, right?

Right you are!

I didn't notice the comma even as and after getting that stuff into
the mail. Woe is me.

Joy at last. The postfix policy daemon now seems happy.

Will you now close this bug?

Julian> If you ever happen to visit Munich, remember to invite me
Julian> for drinks. ;-)

Let me know if you happen to get close to Washington DC first, I'll
invitee you then as well.

jam

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Bug#366173: libmail-spf-query-perl: spfquery fails with Bad arg length for Socket:$ [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John A. Martin wrote:
> I didn't notice the comma even as and after getting that stuff into
> the mail. Woe is me.
>
> Joy at last. The postfix policy daemon now seems happy.
>
> Will you now close this bug?

It is hereby closed.

> > If you ever happen to visit Munich, remember to invite me for drinks.
> > ;-)
>
> Let me know if you happen to get close to Washington DC first, I'll
> invitee you then as well.

Will do, thanks!

Julian.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEXjT9wL7PKlBZWjsRApR/AKCeFpVP/9EWvp4T1jwkfMzDotij3QCcDLpO
PEoDVDYiB8jRJmqtyj27nWg=
=MspM
-----END PGP SIGNATURE-----

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com