Freeradius-Perl script using POP3 against Gmail

92 Views Asked by At

has anyone successfully authenticate against gmail using pop3 perl scripts in freeradiu 3? I'm following this tutorial(https://kerker.website/freeradiusgmail802-1x%e8%a8%ad%e5%ae%9apop3s/) but perl continues rejecting the user.

This is the script:

use Data::Dumper;
use Mail::POP3Client;
use IO::Socket::SSL;

sub authenticate {
    my $pop = Mail::POP3Client->new(
        USER => $RAD_REQUEST{'User-Name'},
        PASSWORD => $RAD_REQUEST{'User-Password'},
        HOST => "pop.gmail.com",
        USESSL => 1,
        DEBUG => 1,
    );
    if($pop->Connect()){
        return RLM_MODULE_OK;
    }else{
        return RLM_MODULE_REJECT;
    }
    $pop->Close;
}

I can't post the output right now but it rejects the user and I haven't been able to debug the script. I just want to know if anyone has recently sucedded in authenticating gmail and how.

0

There are 0 best solutions below