it is called the over-flow pipe, i am talking from petrol experience but it should apply to diesels as well. if the cars tank is over full or the car parks at wierd or actually steep angles, the petrol or diesel with flow out through that pipe if it goes above a certain level in the tank.
i stand to be corrected on this though since this is a diesel your talking about but i hope this helps