The only way to affect which IP address sendmail uses for outbound traffic, is to bind the sendmail process to a specific IP address. But if you do that, all outbound mail will be sent using that address.
If sendmail is bound to all addresses (the defauls setting), the routing table decides where the traffic goes, which in turn determines the source address.
I guess you could run several instances of sendmail, each bound to a specific IP address. It wouldn't look pretty, but it could work.
Why the need for a different source IP address for mail from different senders?
|