Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Net::Server::Mail::ESMTP::XFORWARD 0.15

    Download button

    No screenshots available
    Downloads: 348  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Xavier Guimard | More programs
    Perl Artistic License / FREE
    April 20th, 2007, 04:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Net::Server::Mail::ESMTP::XFORWARD description

    Net::Server::Mail::ESMTP::XFORWARD is a Perl module to add support to the XFORWARD command in Net::Server::Mail::ESMTP.

    Net::Server::Mail::ESMTP::XFORWARD is a Perl module to add support to the XFORWARD command in Net::Server::Mail::ESMTP.

    SYNOPSIS

    use Net::Server::Mail::ESMTP;

    my @local_domains = qw(example.com example.org);
    my $server = new IO::Socket::INET Listen => 1, LocalPort => 25;

    my $conn;
    while($conn = $server->accept)
    {
    my $esmtp = new Net::Server::Mail::ESMTP socket => $conn;
    # activate some extensions
    $esmtp->register('Net::Server::Mail::ESMTP::XFORWARD');
    # adding some handlers
    $esmtp->set_callback(RCPT => &validate_recipient);
    $esmtp->process();
    $conn->close()
    }

    sub validate_recipient
    {
    my($session, $recipient) = @_;

    my $domain;
    if($recipient =~ /@(.*)>s*$/)
    {
    $domain = $1;
    }

    if(not defined $domain)
    {
    return(0, 513, 'Syntax error.');
    }
    elsif(not(grep $domain eq $_, @local_domains) && $session->get_forwarded_addr != "10.1.1.1")
    {
    return(0, 554, "$recipient: Recipient address rejected: Relay access denied");
    }

    return(1);
    }

    When using a Net::Server::Mail::ESMTP script inside a MTA and not in front of Internet, values like client IP address are not accessible to the script and when the script returns mail to an other instance of smtpd daemon, it logs "localhost" as incoming address. To solve this problem, some administrators use the XFORWARD command. This module gives the ability to read and store XFORWARD informations.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    XFORWARD command | Net::Server::Mail::ESMTP module | Perl module | Net::Server::Mail::E | XFORWARD | command

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM