Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

CPAN::Reporter and SMTP-server

by tinita (Parson)
on Dec 17, 2006 at 16:08 UTC ( [id://590313]=perlquestion: print w/replies, xml ) Need Help??

tinita has asked for the wisdom of the Perl Monks concerning the following question:

hello monks,

as soon as CPAN::Reporter was released, i installed it and configured it. great module. it works well when i'm at work; the test reports are sent through our company's mailserver.

at home, however, i have a dynamic ip-address (i have a dyndns-address also, if that helps), and so i cannot send mails because mailservers generally don't accept mails from dynamic ips.

i read my email over POP3 or IMAP and send it over SMTP. the SMTP server of my mail provider needs a username and a password, but i can't find the location where to configure that in CPAN::Reporter. is this possible?

thanks

Replies are listed 'Best First'.
Re: CPAN::Reporter and SMTP-server
by bingos (Vicar) on Dec 17, 2006 at 16:45 UTC

    Hi,

    CPAN::Reporter is using Test::Reporter to send the test reports. Test::Reporter in turn uses either Net::SMTP or Mail::Send ( if that is installed ).

    AFAIK, Test::Reporter has no way of specifying SMTP credentials, though Net::SMTP does have an auth method to provide SASL authentication.

    The best I can suggest is that either try sending test reports directly to the CPAN Testers MX ( which is what Test::Reporter will do if you don't specify an MX ) and see if it works; or, alternatively, configure some sort of SMTP relay locally that will accept reports from CPAN::Reporter/Test::Reporter and forward them to your SMTP gateway with the appropriate authentication.

      try sending test reports directly to the CPAN Testers MX
      sure, i have already tried that.

      configure some sort of SMTP relay locally that will accept reports from CPAN::Reporter/Test::Reporter and forward them to your SMTP gateway with the appropriate authentication.
      i just don't know how... also i think this shouldn't be necessary for cpan-testing.
      the module is great, and i think more people would test if they didn't need to know how to set up a local mailserver for that...
        i just don't know how...
        I have such a system on my machine. If you're interested, then I can show you the scripts tomorrow in the office.

        I've heard rumours that in the future Test::Reporter and CPAN test reporting will be via HTTP, this will mediate that kind of issue

      I have been able to get Test::Reporter to work by hard coding the testers.cpan.org MX record(mx.develooper.com) as follows:
      sub new { my $type = shift; my $class = ref($type) || $type; my $self = { '_mx' => ['mx1.x.perl.org', mx.develooper.com'],
      That is a snippet from near the top of the Test::Reporter module.
Re: CPAN::Reporter and SMTP-server
by xdg (Monsignor) on Dec 18, 2006 at 01:47 UTC

    I know that this part of using CPAN::Reporter is frustrating and I appreciate the patience and effort people put in to trying to make it work.

    There has been some very loose discussion among the Test::Reporter maintainer(s), the perl.org admins, chorny and me of switching to HTTP for submitting reports. I believe chorny has an alpha patch for Test::Reporter for HTTP submission, but doesn't have a gateway to get it into the CPAN Testers inbox. So it's a work in progress.

    Note -- This would be an excellent project for a Perl Hackathon somewhere.

    In the meantime, if someone would like to provide an example of configuring a local relay, I'd be happy to add the instructions for it to the CPAN::Reporter FAQ.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Re: CPAN::Reporter and SMTP-server
by socketdave (Curate) on Dec 17, 2006 at 16:39 UTC
    This modules sends directly to perl.org by default. Have you tried not setting a mail server at all?
      sure, that's what i find in my log:
      refused: Dynamic IP Addresses See: 451 http://www.sorbs.net/lookup.shtml?ip

      that's what i get if i don't use a mailserver:
      Dec 16 12:53:04 my-computers-hostname postfix/smtp[32033]: 231904AAE8: to=<cpan-testers@perl.org>, relay=mx.develooper.com[63.251.223.176], delay=432669, status=deferred (host mx.develooper.com[63.251.223.176] said: 450 Could not resolve my-computers-hostname.local (in reply to MAIL FROM command))

        That second message (which you get if you don't use a mailserver) probably means that whatever module is sending mail is sending the message from you@my-computers-hostname.local. If you could fix that, maybe it would send; see which module it's using (somebody suggested two elsewhere in this thread), and see how the mail domain is configured. My first guess would be that it's in /etc/hosts.

        Good luck!

Re: CPAN::Reporter and SMTP-server
by hesco (Deacon) on Dec 18, 2006 at 20:02 UTC
    I too do my development work on a dynDNS.org linked server without working access to an smtp server. I've installed CPAN::Reporter on every machine where I have even sudo root. But its this dynamic IP box at my feet that has the opportunity to work through the largest number of experimental CPAN modules. The production servers I maintain are handled a bit more conservatively. All that to say this, if I can get my reports into the system by way of port 80, that would certainly be useful here.

    -- Hugh

    if( $lal && $lol ) { $life++; }
Re: CPAN::Reporter and SMTP-server
by Scott7477 (Chaplain) on Dec 18, 2006 at 17:01 UTC

      Both use Test::Reporter to send test reports, so this is a little surprising. Can you tell what differs between the two? What errors are you getting from CPAN::Reporter?

      Even something as minor as what return email address is used could be affecting this. (One person found that their ISP was rejecting email when the "From" line didn't match the ISP's account for them.)

      -xdg

      Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://590313]
Approved by chargrill
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found