.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Qpsmtpd::Connection 3pm" .TH Qpsmtpd::Connection 3pm "2019-01-11" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Qpsmtpd::Connection \- A single SMTP connection .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& my $rdns = $qp\->connection\->remote_host; \& my $ip = $qp\->connection\->remote_ip; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This class contains details about an individual \s-1SMTP\s0 connection. A connection lasts the lifetime of a \s-1TCP\s0 connection to the \s-1SMTP\s0 server. .PP See also Qpsmtpd::Transaction which is a class containing details about an individual \s-1SMTP\s0 transaction. A transaction lasts from \&\f(CW\*(C`MAIL FROM\*(C'\fR to the end of the \f(CW\*(C`DATA\*(C'\fR marker, or a \f(CW\*(C`RSET\*(C'\fR command, whichever comes first, whereas a connection lasts until the client disconnects. .SH "API" .IX Header "API" These \s-1API\s0 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 \f(CW\*(C`Qpsmtpd\*(C'\fR object's \f(CW\*(C`$qp\->connection\*(C'\fR method. .SS "new ( )" .IX Subsection "new ( )" Instantiates a new Qpsmtpd::Connection object. .ie n .SS "start ( %args )" .el .SS "start ( \f(CW%args\fP )" .IX Subsection "start ( %args )" Initializes the connection object with \f(CW%args\fR attribute data. .SS "remote_host( )" .IX Subsection "remote_host( )" The remote host connecting to the server as looked up via reverse dns. .SS "remote_ip( )" .IX Subsection "remote_ip( )" The remote \s-1IP\s0 address of the connecting host. .SS "remote_port( )" .IX Subsection "remote_port( )" The remote port. .SS "remote_info( )" .IX Subsection "remote_info( )" If your server does an ident lookup on the remote host, this is the identity of the remote client. .SS "local_ip( )" .IX Subsection "local_ip( )" The local ip. .SS "local_port( )" .IX Subsection "local_port( )" The local port. .SS "hello( )" .IX Subsection "hello( )" Either \f(CW"helo"\fR or \f(CW"ehlo"\fR depending on how the remote client greeted your server. .PP \&\s-1NOTE:\s0 This field is empty during the helo or ehlo hooks, it is only set after a successful return from those hooks. .SS "hello_host( )" .IX Subsection "hello_host( )" The host name specified in the \f(CW\*(C`HELO\*(C'\fR or \f(CW\*(C`EHLO\*(C'\fR command. .PP \&\s-1NOTE:\s0 This field is empty during the helo or ehlo hooks, it is only set after a successful return from those hooks. .ie n .SS "notes($key [, $value])" .el .SS "notes($key [, \f(CW$value\fP])" .IX Subsection "notes($key [, $value])" Get or set a note on the connection. This is a piece of data that you wish to attach to the connection and read somewhere else. For example you can use this to pass data between plugins. .SS "clone([%args])" .IX Subsection "clone([%args])" Returns a copy of the Qpsmtpd::Connection object. The optional args parameter may contain: .IP "no_reset (1|0)" 4 .IX Item "no_reset (1|0)" If true, do not reset the original connection object, the author has to care about that: only the cloned connection object is reset at the end of the connection .SS "relay_client( )" .IX Subsection "relay_client( )" True if the client is allowed to relay messages.