First off, thanks for your answers!
It seems petur is right, because it didn't work.
I had already tried selecting "Line In" in the Source menu (Rockbox), like shaggy suggested, but the recordings were silent.
This time I tried again but with a +48dB gain, like sunjan said, and while the bars moved a little when rubbing the mic, the recording was still silent (except with a lot of background noise).
Regular line-in recording (with an actual analog cable connected to the output of another audio device), on the other hand, works very well, so it seems I'll have to use an external preamp, which adds extra bulk.
I'm using an old non-working Sharp MiniDisc as the preamp for now
(what doesn't work is the recorder part of the MiniDisc, but the mic preamp works great, so I use the headphone output connected to the iRiver)
I also have a 9V square battery based preamp bought off eBay some years ago, but I think it's worse than the MD preamp, because it distorts a lot and even the waveform looks odd (only the upper half of the wave is recorded!)