How to get port number used?

Currently using qpsmtpd 0.32 in forkserver mode.

I would like to know if it is possible for a plugin to determine which
port a connection came in on, so that it could be treated differently
from connections on other ports.

Thank you.
0
sub
7/15/2007 1:37:16 AM
perl.qpsmtpd 1907 articles. 0 followers. Follow

2 Replies
462 Views

Similar Articles

[PageSpeed] 11
Get it on Google Play
Get it on Apple App Store

On 14-Jul-07, at 9:37 PM, sub-qpsm-tpd@rope.net wrote:

> Currently using qpsmtpd 0.32 in forkserver mode.
>
> I would like to know if it is possible for a plugin to determine which
> port a connection came in on, so that it could be treated differently
> from connections on other ports.

$qp->connection->local_port tells you the local port number.

0
matt
7/15/2007 2:55:19 AM
On Sat, 14 Jul 2007, Matt Sergeant wrote:

> On 14-Jul-07, at 9:37 PM, sub-qpsm-tpd@rope.net wrote:
>
> > Currently using qpsmtpd 0.32 in forkserver mode.
> >
> > I would like to know if it is possible for a plugin to determine which
> > port a connection came in on, so that it could be treated differently
> > from connections on other ports.
>
> $qp->connection->local_port tells you the local port number.

Excellent.

(I see the spammers are getting faster at pulling my email address off
this list, so I now have to abandon this one right away.)
0
sub
7/15/2007 1:12:12 PM
Reply: