I think I worked this one out but I'm not sure if it's a bug or not:
The Mail Mail template has a token in it called [DMX:DefaultPath]. One might expect this to be the path to the default DMX module. However, it seems to be putting just the portal url in. As soon as I realised this I was able to add the full path to the DMX home and the links redirect to the login page as desired.
e.g.
Title: [Entry:Title]
link:
http://[DMX:DefaultPath]/Default.aspx?Command=Core_Download&EntryId=[Entry:EntryId]
So, how about renaming the token or making it do what it says it does?
thanks
Gus