Gordon McDonald, 57, was told by Judge Lady Stacey: "I regard you as a danger to young girls. It will be up to the parole board when, if ever, you are released."
The High Court in Glasgow had heard the dad-of-two had been a law-abiding family man until he became obsessed by porn and internet chat rooms.
McDonald groomed one girl on the internet and eventually got her to meet him after school.
He then drove her to a deserted industrial estate where they would strip naked and perform indecent acts on each other.
Eventually, the girl told a teacher what had been happening and police began an investigation.
McDonald, formerly of Cumbernauld, pleaded guilty to 13 charges between November 2005 and March 2011.
The maintenance engineer admitted indecency and meeting or arranging to meet girls under 16 for sex and possessing a stash of depraved child porn.
Advocate depute Jane Farquharson, prosecuting, told how McDonald used a series of aliases when logging on to teenage chat rooms or communicating one-to-one with girls using the MSN link.
He sent girls explicit pictures and got them to expose themselves in front of a webcam.
One girl was blackmailed into continuing contact when McDonald told her he would post on Facebook, the internet social networking site, intimate photos he had taken.
The court heard the sexually explicit internet chats with McDonald involved 10 girls aged 12 to 15.
Their identities were revealed when police raided McDonald's then home in Cumbernauld and seized computer equipment and a camera.
In his house, garage and van they found a total of 4432 indecent images, both stills and video clips.
Solicitor advocate Matthew Aunchcloss, defending, said McDonald, who later moved to Penicuik, Midlothian, that he had, at first, looked at adult porn.
But Mr Aunchcloss added that McDonald had "then descended into indecent pictures of children and contacted young girls.
"He says it was completely out of control and only came to an end with the police knocking on his door."