Pine is a little out of today's standards, so we can't use another program (like Thunderbird) to move the mail messages recorded by this program, we must use PINE itself.
Start PINE and go in the Setup page
Modify the configuration so you connect to the lthmail.epfl.ch Imap server.
Save the modifications and move around your mail folders moving the messages from the local repository to the Imap server.
Go to folder and type “;” (to select message) and then “A” (for all)
“A” (to apply a command to all the selected one)
“S” (to save)
Then just type “INBOX” (to move them to INBOX)
When you finished close PINE and never reopen it.