Postfix: force outgoing mail for specified domain trough separate ip

To be able to send each domain mail from different ip you have to do the following:

#> vi /etc/postfix/
add postfix listener bound on alternative ip in after smtp line: transport
domaincom_transport unix - - y - - smtp
-o smtp_bind_address=$domaincom_transport_bind_address
-o syslog_name=smtp-domain

#> vi /etc/postfix/
domaincom_transport_bind_address =
#mask outgoing mails on a per domain to ip match base - add a line
sender_dependent_default_transport_maps = hash:/etc/postfix/sender_transport

then create the file for mapping

#> vi /etc/postfix/sender_transport domaincom domain2 domain3

save and exit and create hash db:
#> postmap hash:/etc/postfix/sender_transport

/etc/init.d/postfix restart