
Apache::SMTP::Server - Subclass of Net::Server::Mail::SMTP with some additional methods for getting remote ip and hostname and some config bits from Apache's httpd.conf

use Apache::SMTP::Server;
sub handler {
my $c = shift;
my $ath = Apache::TieBucketBrigade->new_tie($c);
my $smtp = Apache::SMTP::Server->new(
handle_in => $ath,
handle_out => $ath,
);
$smtp->my_config($c);
$smtp->set_callback(HELO => \&validate_hostname);
$smtp->set_callback(RCPT => \&validate_recipient);
$smtp->set_callback(DATA => \&queue_message);
$smtp->set_callback(MAIL => \&validate_sender);
$smtp->process;
Apache::OK;
}

This module is used by Apache::SMTP to add some usefull functions to Net::Server::Mail::SMTP. You probably don't need to subclass it yourself, but you may want to if you need to add more configuration bits. See Apache::SMTP for example of use.
Takes an IO::Handle object for read and write, returns an Net::Server::Mail::SMTP object.
Takes an Apache::Connection object and sets up some config variables.
returns the ip bound in httpd.conf
returns hostname as given to HELO
returns ip of remote host
returns hostname or ip used for outbound smtp connections from PerlSetVar MailHost my.host.name in httpd.conf
returns port to connect to for outbound smtp connections from PerlSetVar MailPort 25 in httpd.conf

Apache::SMTP Net::Server::Mail Net::Server::Mail::SMTP Apache::TieBucketBrigade Net::SMTP

mock, <mock@obscurity.org>

Copyright (C) 2004 by Will Whittaker and Ken Simpson
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available.