Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 90564
Status: resolved
Priority: 0/
Queue: Mail-Sender

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

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



Subject: NTLM
Hello. First, thank you very much for this module. I've an issue related to the NTLM authentification. Sending one single email with NTLM it works out of box :-) The issue appears with sending more than one email from the same script. It fails with "Login not accepted". I am forced to exit/quit from the script and run it again. It's really weird, like that once the NTLM connection is established, it cannot be reset, so you cannot create a new one. The only way to really close it, it's exiting from script. Example: my $sender = new Mail::Sender({...., auth=>'NTLM',...}); ref($sender->MailMsg({...}); $sender->Close; print "works\n"; my $sender2 = new Mail::Sender({...., auth=>'NTLM',...}); ref($sender->MailMsg({...}); $sender->Close; The second email (related to $sender2) fails during the negotiating. Thanks,
I encountered this issue also. I found that the problem is because the internal state of Authen::NTLM changes when Authen::NTLM::ntlm() is called. So Authen::NTLM::ntlm_reset() needs to be called for each time you authenticate. You just need to add that call near the beginning of sub Mail::Sender::Auth::NTLM. $_ = send_cmd $s, "AUTH NTLM"; if (!/^[123]/) { return $self->Error(INVALIDAUTH('NTLM', $_)); } + Authen::NTLM::ntlm_reset(); Authen::NTLM::ntlm_user($self->{'authid'}); Authen::NTLM::ntlm_password($self->{'authpwd'}); Authen::NTLM::ntlm_domain($self->{'authdomain'}) if defined $self->{'authdomain'}; On Wed Nov 20 17:21:38 2013, PECO wrote: Show quoted text
> Hello. > > First, thank you very much for this module. > > I've an issue related to the NTLM authentification. > > Sending one single email with NTLM it works out of box :-) > > The issue appears with sending more than one email from the same > script. It fails with "Login not accepted". I am forced to exit/quit > from the script and run it again. > It's really weird, like that once the NTLM connection is established, > it cannot be reset, so you cannot create a new one. The only way to > really close it, it's exiting from script. > > Example: > > my $sender = new Mail::Sender({...., auth=>'NTLM',...}); > ref($sender->MailMsg({...}); > $sender->Close; > print "works\n"; > my $sender2 = new Mail::Sender({...., auth=>'NTLM',...}); > ref($sender->MailMsg({...}); > $sender->Close; > > The second email (related to $sender2) fails during the negotiating. > > Thanks,
resolved in 0.8.23 Thank you, Jenda