Qpsmtpd::Connection.3pm

Langue: en

Autres versions - même langue

Version: 2006-02-27 (ubuntu - 07/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

Qpsmtpd::Connection - A single SMTP connection

SYNOPSIS

   my $rdns = $qp->connection->remote_host;
   my $ip = $qp->connection->remote_ip;
 
 

DESCRIPTION

This class contains details about an individual SMTP connection. A connection lasts the lifetime of a TCP connection to the SMTP server.

See also Qpsmtpd::Transaction which is a class containing details about an individual SMTP transaction. A transaction lasts from "MAIL FROM" to the end of the "DATA" marker, or a "RSET" command, whichever comes first, whereas a connection lasts until the client disconnects.

API

These API docs assume you already have a connection object. See the source code if you need to construct one. You can access the connection object via the "Qpsmtpd" object's "$qp->connection" method.

new ( )

Instantiates a new Qpsmtpd::Connection object.

start ( %args )

Initializes the connection object with %args attribute data.

remote_host( )

The remote host connecting to the server as looked up via reverse dns.

remote_ip( )

The remote IP address of the connecting host.

remote_port( )

The remote port.

hello( )

remote_info( )

If your server does an ident lookup on the remote host, this is the identity of the remote client.

local_ip( )

The local ip.

local_port( )

The local port.

hello( )

Either "helo" or "ehlo" depending on how the remote client greeted your server.

NOTE: This field is empty during the helo or ehlo hooks, it is only set after a successful return from those hooks.

hello_host( )

The host name specified in the "HELO" or "EHLO" command.

NOTE: This field is empty during the helo or ehlo hooks, it is only set after a successful return from those hooks.

notes($key [, $value])

Connection-wide notes, used for passing data between plugins.

clone( )

Returns a copy of the Qpsmtpd::Connection object.

relay_client( )

True if the client is allowed to relay messages.