Thanks to Dave Evans on the exim4 users list for this.
I need to set different IP addresses for different outgoing domains.
Since I only have a few - we took a simple approach
/etc/exim4/interfaces
has lines of the form
domain: ip
domain: ip
domain: ip
Then - in /etc/exim4/conf.d/transport/30_exim4-config_remote_smtp (or wherever your definition of remote_smtp transport is) add the following to the remote_smtp transport:
interface = ${lookup{$sender_address_domain}lsearch{/etc/exim4/interfaces}{$value}{default_ip_in_case_no_match}}
E-Mail account settings for google (gmail), .mac and a personal server for the Nokia n95
To add a .mac mail account to a P990i.
An article popped up on debian-administration.org. I'm going to have to take a closer look at one of the comments:
http://www.debian-administration.org/articles/302#comment_6
If this can work well with courier (which I guess it should) then this will solve an issue I've had a while (and I don't want to go the route of a database for this).
Edit: Various things that have come up under discussion
courier assumes $HOME - to change this you need to change the authenticator so that it changes the value of $HOME (at least according to various google searches)