Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 590338 - mail-filter/spamassassin URIDNSBL broken by dev-perl/Net-DNS-1.40.0
Summary: mail-filter/spamassassin URIDNSBL broken by dev-perl/Net-DNS-1.40.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal with 1 vote (vote)
Assignee: Philippe Chaintreuil
URL: https://bz.apache.org/SpamAssassin/sh...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-02 21:44 UTC by Benny Pedersen
Modified: 2017-04-24 01:45 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
bug_7338-use_trunk_complete_a_lookup.patch (bug_7338-use_trunk_complete_a_lookup.patch,2.42 KB, patch)
2016-11-07 14:53 UTC, Michael Orlitzky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benny Pedersen 2016-08-02 21:44:34 UTC
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7338

we have a serious bug here

:(

plase add older Net-DNS that dont have this bug
Comment 1 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-08-02 23:39:13 UTC
Please report the ebuild version of spamassassin you're using. ( I can only assume you're using 3.4.1-r6 ), and please attach `emerge --info mail-filter/spamassassin` .

The real problem is SA's URIDNSBL is using ->string instead of ->address

SA needs to be updated to use the right function which will give the right behaviour.

> To obtain an address from a record of type A or AAAA,
> the proper method is $rr->address. Some parts of
> SpamAssassin have already been adjusted to do the right
> thing, unfortunately not all, or so it seems.

> It is unfortunate that old version of Net::DNS
> did not provide a method address(), so fixing it involves
> some compatibility measures.

https://metacpan.org/pod/Net::DNS::RR::A#address
https://metacpan.org/source/NLNETLABS/Net-DNS-1.06/lib/Net/DNS/RR/A.pm#L56-66

https://metacpan.org/pod/Net::DNS::RR#string
https://metacpan.org/source/Net::DNS::RR#L328-336

RFC1035 documents "( )" as being valid parts on page 34:
https://www.ietf.org/rfc/rfc1035.txt

<domain-name><rr> [<comment>]

RR -> [<TTL>] [<class>] <type> <RDATA>

> The labels in the domain name are expressed as character strings and
> separated by dots.  Quoting conventions allow arbitrary characters to be
> stored in domain names

> ( )             Parentheses are used to group data that crosses a line
>                 boundary.  In effect, line terminations are not
>                 recognized within parentheses.

Obviously you don't want "rdata" ( https://metacpan.org/source/Net::DNS::RR#L334 ), you want "address" ( https://metacpan.org/source/Net::DNS::RR#L334 )
Comment 2 Michael Orlitzky gentoo-dev 2016-08-02 23:52:08 UTC
I CCed myself on the SpamAssassin bug; as soon as there's a patch I'll add it to our ebuild.
Comment 4 Michael Orlitzky gentoo-dev 2016-08-05 21:26:54 UTC
(In reply to Marcin Mirosław from comment #3)
> It should be fixed in commit:
> http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/
> URIDNSBL.pm?r1=1694122&r2=1694129&view=patch

I tried this on v3.4.1, but the patch doesn't apply. With any luck they'll backport it quickly.
Comment 5 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-08-29 13:03:16 UTC
I have downgraded dev-perl/Net-DNS-0.740.0, restarted spamd service, run sa-update and I still get errors like:

  config: failed to parse line, skipping, in "/tmp/.spamassassin5071yuaLeztmp/72_active.cf": uridnsbl_skip_domain [...]

Is it related to the issue or not?
Comment 6 Michael Orlitzky gentoo-dev 2016-08-29 13:16:36 UTC
(In reply to Amadeusz Żołnowski from comment #5)
> I have downgraded dev-perl/Net-DNS-0.740.0, restarted spamd service, run
> sa-update and I still get errors like:
> 
>   config: failed to parse line, skipping, in
> "/tmp/.spamassassin5071yuaLeztmp/72_active.cf": uridnsbl_skip_domain [...]
> 
> Is it related to the issue or not?

Just bad timing, last night's rules updates are acting weird. Upstream pulled the problematic file, so if you sa-update again that error should go away.
Comment 7 Marcin Mirosław 2016-08-29 13:17:56 UTC
No, http://marc.info/?l=spamassassin-users&m=147246380520629&w=2
Comment 8 Thomas Capricelli 2016-08-30 08:13:58 UTC
I still have the 
config: failed to parse line, skipping, in "/tmp/.spamassassin31467nbXpmwtmp/72_active.cf": uridnsbl_skip_domain wegelin.ch

as of today
Comment 9 Marcin Mirosław 2016-08-30 08:18:57 UTC
This isn't related to this bug.
Comment 10 Michael Orlitzky gentoo-dev 2016-08-30 20:09:39 UTC
(In reply to Thomas Capricelli from comment #8)
> I still have the 
> config: failed to parse line, skipping, in
> "/tmp/.spamassassin31467nbXpmwtmp/72_active.cf": uridnsbl_skip_domain
> wegelin.ch
> 
> as of today

Yeah, it happened again last night. Upstream is aware of the issue (there have been a few threads on the -users list), but not much we can do about it except wait for them to fix it.
Comment 11 Stefan Briesenick (RETIRED) gentoo-dev 2016-11-06 01:07:19 UTC
any news?
Comment 12 Michael Orlitzky gentoo-dev 2016-11-06 01:43:37 UTC
(In reply to Stefan Briesenick from comment #11)
> any news?

No, still waiting on a backport (or a new SA release!) unfortunately.
Comment 13 Stefan Briesenick (RETIRED) gentoo-dev 2016-11-06 15:01:28 UTC
@michael

there're plenty of patches available from debian.

it would be wise to include them into an -r9. I can confirm, that spamassassin under debian works great. At least it doesn't have these nasty error messages.
Comment 14 Michael Orlitzky gentoo-dev 2016-11-07 14:51:01 UTC
(In reply to Stefan Briesenick from comment #13)
> @michael
> 
> there're plenty of patches available from debian.
> 
> it would be wise to include them into an -r9. I can confirm, that
> spamassassin under debian works great. At least it doesn't have these nasty
> error messages.

I looked through all of the patches in Debian's latest,

http://http.debian.net/debian/pool/main/s/spamassassin/spamassassin_3.4.1-6.debian.tar.xz

but I don't see one for this issue...
Comment 15 Michael Orlitzky gentoo-dev 2016-11-07 14:53:08 UTC
Created attachment 452626 [details, diff]
bug_7338-use_trunk_complete_a_lookup.patch

The upstream commit doesn't apply cleanly, but the function signature has not changed. Here's a patch that replaces the entire problematic function with the one in SA trunk.

Beware:

  * I don't know perl.
  * I haven't even tried it.

But if anyone is feeling adventurous, it may solve the problem.
Comment 16 Michael Orlitzky gentoo-dev 2017-04-24 01:45:59 UTC
An upstream fix for this is finally available,

  https://svn.apache.org/viewvc?view=rev&rev=1791573

and I've included it in -r11.

commit 3dd9f4f0d1d30ed1e47ac185ecd5267b6088ad28
Author: Michael Orlitzky <mjo@gentoo.org>
Date:   Sun Apr 23 21:25:30 2017 -0400

    mail-filter/spamassassin: new revision fixing bugs 590338 and 615856.

    The first fix in this revision adds a slot-operator dependency on
    dev-lang/perl. This should force SpamAssassin to rebuild in response
    to future major upgrades of perl (bug 615856).

    The second fix includes a backported patch to support newer versions
    of dev-perl/Net-DNS. This should avoid the problems experienced with
    the URIDNSBL plugin (bug 590338).

    Gentoo-Bug: 590338
    Gentoo-Bug: 615856

    Package-Manager: Portage-2.3.3, Repoman-2.3.1