Pair Networks

process_request() - handles a new connection from beginning to end

handle_command() - handles a single SMTP command


$what is an SMTP command, like "mail from:<somebody@example.com>", or the special "end-of-data" command, ".".

The result should be true to keep the connection open, or false to close it.

handle_end_of_data() - source has finished transmitting the message

  my $result = $server->handle_end_of_data($client);

This method is called when the source finishes transmitting the message. This method may filter the message and if desired, transmit the message to $client. Alternatively, this method can respond to the server with some sort of rejection (temporary or permanent).

The result is nonzero if a message was transmitted to the next server and its response returned to the source server, or zero if the message was rejected and the connection to the next server should be dropped.

setup_client_socket() - create socket for sending the message