I'm planning on taking the train from Istanbul to Iran in June 2008. Has anyone any experience of booking the ticket in advance, either over the Internet or through a travel agency? I live in the UK.

I will use that train tonight. It seems to be impossible to get a ticket from abroad. I had to find someone with private connections to Turkey who organized the ticket for me (and had a considerable amount of work with it). I had to send him a copy of my passport and even then it seemed to depend on the person on duty at the ticket counter wether they sell the ticket or not. It is 86 YTL, about 43 €. Train experience report later!
A few days in Istanbul waiting for the train after you buy the ticket is no great impost.............