RAPNAP::client

RAPNAP::client module can perform a check against the RAPNAP database.
Download

RAPNAP::client Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • David Nicol
  • Publisher web site:
  • http://search.cpan.org/~davidnico/TipJar-MTA-0.21/MTA.pm

RAPNAP::client Tags


RAPNAP::client Description

RAPNAP::client module can perform a check against the RAPNAP database. RAPNAP::client module can perform a check against the RAPNAP database.SYNOPSIS use RAPNAP::client; # use default key, limited and accounted by IP # use RAPNAP::client 'AssignedKey'; # contact pay2send.com for a key ... # parse the headers of an e-mail or SMTP data block $RAPNAP_RESULT = rapnap_check($return_address,$peer_network_address, $subject_line,$target_recipient); if ($RAPNAP_RESULT =~ /> GOODb/){ # continue delivering message ... }else{ # refuse or defer delivery ... };RAPNAP::client provides a client for the pay2send.com RAPNAP database, which is a database of valid e-mail senders and the e-mail relays that their e-mail originates from.Pay2send.com pursues a vision of e-mail that costs money to send, except for whitelisted correspondents. This client module connects to http://pay2send.com/cgi/rapnap/check and offers the RA ("Return Address") and PNA ("Peer Network Address") specified as the first and second arguments to the < Crapnap_check() > function which is exported by this module.The rapnap_check() function takes two required and three optional arguments:raReturn Address (in dotted quad form. ipv6 addresses are not supported yet.)pnaPeer Network AddressslSubject Line -- the subject line of the e-mail we are evaluatingtaTArget -- to whom the e-mail we are evaluating is addressedteTEmplate -- the message template to use in the confirmation message and returns the text of the web page. ra and pna are required to get a response. If a dns lookup on pna produces a name that does not map back to the provided address, that is considered an error.Subject Line and TArget are required to fill in the blanks in the message template, and the rapnap checking routine will not send e-mails unless they are provided.TEmplate is parameterized so that you can compose your own message template, following the example at http://www.pay2send.com/rapnap/default_template.txt and have messages sent to people because they are sending you or yours mail from unlisted sources customized. Information about the source of queries is provided in the e-mail headers, before the template is streamed in.By default, RAPNAP::client uses a pay2send account key of "ipv4" which allows a limited number of accesses per day from an IP address.See the http://www.pay2send.com web site for information on getting a pay2send RAPNAP client key which will allow more accesses per day.The rapnap_check function returns the text of the web page, which will begin "error" is something went wrong, and will match ($RA2, $dnsname, $PNA2, $result, $count, $more) = ($QueryResult = rapnap_check($RA, $PNA)) =~ m/^(S+) VIA (S+) +)] -> (UNKNOWN|GOOD|BAD) (d+)(.*)/s;otherwise, that is, if the query was syntacticly valid and the network address was not mapped to a name that does not map back to the same address.There may be additional information after the restatement of the query, the result, and the count of queries so far today, for the provided key, or $QueryResult might begin /^error / in which case something went wrong, such as the RA containing a percent sign, or being over the limit of queries.When a sender has agreed to pay to send e-mail, the $more field will contain information about this, in the form of text matching ($USD_amount) = $more =~ /WILL_PAY (d*.?d*) USD/;At this time there is no concrete plan for the pay2send infrastructure to work with currencies other than the United States Dollar.Requirements:· PerlWhat's New in This Release:· Documented optional parameters, WILL PAY syntax. Iraq is secure.


RAPNAP::client Related Software