Skip Menu |

This queue is for tickets about the Net-Server-Mail CPAN distribution.

Report information
The Basics
Id: 122455
Status: resolved
Priority: 0/
Queue: Net-Server-Mail

People
Owner: Nobody in particular
Requestors: NHORNE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.23
Fixed in: (no value)



Subject: helo - add incoming socket
As well as the hostname, it would be great if the HELO callback were to have the incoming socket as an argument so that the remote IP address can be interrogated. Either that or add a CONN callback
Another alternative approach would be to add a milter style context that validators could use, since SMTP is state-full that shouldn't cause a religious objection.
Le Mer 12 Jui 2017 16:49:05, NHORNE a écrit : Show quoted text
> As well as the hostname, it would be great if the HELO callback were > to have the incoming socket as an argument so that the remote IP > address can be interrogated. > > Either that or add a CONN callback
Hello, you can use $session->{in} to hav the IO::Handle object
That worked a treat thank you! (Though it breaks data encapsulation, so I'd still suggest a method, and anyhow it would be useful to have it documented.) I added this to my code: my $ip = $session->{'in'}->sockhost();
Answered