Only the last refer 'D' is seen on the destination 'E' server's log. There is only one referrer per line (hit) in a server log possible.
Domain A, B and C will be penalized for SEO because of the redirects, if they are meta refresh, if that is an issue.
Code:
#.htaccess Apache
Redirect permanent /dir/1234.htm http://DOMAIN.com/file.htm
Redirect temp /dir/1234.htm http://DOMAIN.com/file.htm
git er done!