You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2015/05/22 12:55:00 UTC

[Bug 7197] New: Error when using perl-Mail-SpamAssassin-Spamd with apache >= 2.4

https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7197

            Bug ID: 7197
           Summary: Error when using perl-Mail-SpamAssassin-Spamd with
                    apache >= 2.4
           Product: Spamassassin
           Version: 3.3.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Libraries
          Assignee: dev@spamassassin.apache.org
          Reporter: remco@webconquest.com

When using spamd in combination with apache version 2.4 or newer, apache won't
respond and fills the error_log with notices like the following:

[Fri May 22 12:14:00.328855 2015] [perl:error] [pid 21043] Can't locate object
method "remote_addr" via package "Apache2::Connection" at
/usr/lib/perl5/vendor_perl/5.18.1/Mail/SpamAssassin/Spamd/Apache2/AclIP.pm line
64.\n

This is most likely caused by a module API change introduced in Apache 2.4. See
http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html for details.

This problem is present in 3.3.2, but I believe also the current trunk is still
affected by this.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7197] Error when using perl-Mail-SpamAssassin-Spamd with apache >= 2.4

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7197

Kevin A. McGrail <km...@pccc.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
   Target Milestone|Undefined                   |3.4.2

--- Comment #3 from Kevin A. McGrail <km...@pccc.com> ---
Overall, I must admit confusion because mod_perl 2.0.9-rc1 is the first release
that supports apache 2.4 and it just hit rc1 a few days ago (5/13/2015).

So I do not know what patches, etc. you have involved to run mod_perl 2.0.7 on
an httpd 2.4 architecture.

But on my test machine with 2.4 and 2.2 with mod_perl 2.0.9 rc1, I now pass
make test for the spamd-apache2 with these commits:

svn commit -m 'Cleanup of spamd-apache2 for httpd 2.4 - bug 7197'
Sending        spamd-apache2/lib/Mail/SpamAssassin/Spamd/Apache2/AclIP.pm
Sending        spamd-apache2/lib/Mail/SpamAssassin/Spamd/Apache2/AclRFC1413.pm
Sending        spamd-apache2/lib/Mail/SpamAssassin/Spamd/Apache2.pm
Transmitting file data ...
Committed revision 1681228.

svn commit -m 'Cleanup of spamd-apache2 for httpd 2.4 - bug 7197 - 3.4'
Sending        spamd-apache2/lib/Mail/SpamAssassin/Spamd/Apache2/AclIP.pm
Sending        spamd-apache2/lib/Mail/SpamAssassin/Spamd/Apache2/AclRFC1413.pm
Sending        spamd-apache2/lib/Mail/SpamAssassin/Spamd/Apache2.pm
Transmitting file data ...
Committed revision 1681230.

Please let me know how it looks for you.

regards,
KAM

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7197] Error when using perl-Mail-SpamAssassin-Spamd with apache >= 2.4

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7197

Remco Rijnders <re...@webconquest.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |remco@webconquest.com

--- Comment #2 from Remco Rijnders <re...@webconquest.com> ---
Hi Kevin,

Thank you for your response. Yes, this does apply to apache-spamd (sorry for
being unclear on that in the initial report).

I am the packager of SpamAssassin for Mageia Linux and this is a bug I've ran
into myself. It actually started with another bug I found:

https://bugs.mageia.org/show_bug.cgi?id=13925

I think this is probably a configuration error of apache-spamd as we ship it in
combination with an apache installation with virtual hosts enabled. After
commenting out all offending values in spamd.conf which prevented Apache from
starting, I bumped into this issue.

The mod_perl version shipping with Mageia 4 is 2.0.7, and Apache is 2.4.7,
though I think (but have not confirmed) that the same issue might be present
with other recent versions too.

>From the lack of similar bug reports I assume that one or both of the following
is true:
- This is a strange combination of versions that bring to light this bug;
- apache-spamd is hardly used at all.

To be frank, I myself am unclear on its use case completely, I just ran into
these issues on my own home system.

I will test the conn_rec->remote_ip and conn_rec->remote_addr changes on my
system, and report my results in this report. I wonder if it is easy to make
this change without breaking other cases with a pre 2.4 api in use.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7197] Error when using perl-Mail-SpamAssassin-Spamd with apache >= 2.4

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7197

Kevin A. McGrail <km...@pccc.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kmcgrail@pccc.com

--- Comment #1 from Kevin A. McGrail <km...@pccc.com> ---
Remco,

I'm assuming this applies to apache-spamd and either a pre-release or
release-candidate version of mod_perl 2.0.9 for httpd 2.4?


As a side-note, this was work from GSoC in like 2006 and I cleaned up
attribution for ASF compliance:

3.4:
svn commit -m 'Cleaning up the copyright/author/etc. in apache-spamd to be ASF
compliant' spamd-apache2/
Sending        spamd-apache2/Makefile.PL
Sending        spamd-apache2/README.apache
Sending        spamd-apache2/lib/Mail/SpamAssassin/Spamd.pm
Transmitting file data ...
Committed revision 1681095.

Trunk: svn commit -m 'Cleaning up the copyright/author/etc. in apache-spamd to
be ASF compliant' spamd-apache2/
Sending        spamd-apache2/Makefile.PL
Sending        spamd-apache2/README.apache
Sending        spamd-apache2/lib/Mail/SpamAssassin/Spamd.pm
Transmitting file data ...
Committed revision 1681096.




So a key issue (but possibly not the only issue) is this change:

conn_rec->remote_ip and conn_rec->remote_addr
    These fields have been renamed in order to distinguish between the client
IP address of the connection and the useragent IP address of the request
(potentially overridden by a load balancer or proxy). References to either of
these fields must be updated with one of the following options, as appropriate
for the module:

        When you require the IP address of the user agent, which might be
connected directly to the server, or might optionally be separated from the
server by a transparent load balancer or proxy, use request_rec->useragent_ip
and request_rec->useragent_addr.
        When you require the IP address of the client that is connected
directly to the server, which might be the useragent or might be the load
balancer or proxy itself, use conn_rec->client_ip and conn_rec->client_addr.


I don't have a good test bed for 2.4 so let me set something up. I can also
email the mod perl dev list to get some guidance.

-- 
You are receiving this mail because:
You are the assignee for the bug.