Postfix: Sender Dependent Outgoing IP Address not working for external clients

Hi

I followed the intructions at https://www.virtualmin.com/documentation/email/dependent for Sender Dependent Outgoing IP Address

It is working as it should when sending mail locally from the same host postfix is installed. Mail is sent through different ip addresses depending on the sender’s domain. But when trying to use an external client, mail is sent by the default server’s ip address.

I’ve been pulling my hair out with this for a week now. I see other people having the same problem, but no solution. For example this guy: http://stackoverflow.com/questions/19927143/postfix-relaying-via-specific-outgoing-ip/20075935#20075935

These are the headers i get for the same email sent:

Sent from the same server:
Received: from mailing.example.com ([1.1.1.1]) <- dedicated IP

Sent frrom an external client:
Received: from mailing.example.com ([2.2.2.2]) <- default server ip

My configuration was mostly taken care by virtualmin, but 've triple checked it with other manual examples in several forums:

master.cf:
smtp-146847774219364 unix - - n - - smtp -o smtp_bind_address=1.1.1.1

map file:
@mailing.example.com smtp-146847774219364

Any ideas? thanks!!

External clients will always pick the default broadcasted IP, you can however change it on the client side

ok i thought there was a solution, since it seems other people have managed to overcome this. How can i set an external dedicated mail server so my customers can bulk mail on individual ips?

for example, I’ve set up tools for them to manage their mailing list inside their hosting accounts, but for delivering we thought it was better to use an external mail server and give each one of them a dedicated ip so if for some reason they run into spam problems they don’t affect anybody around.

it seems this in not a good or at least not a simple approach, right?

thanks!

Some people I know set the outgoing IP base on the domain. This way everyone can connect using 1 IP and send outgoing emails locked to their domain’s IP.

One way to combat this is to turn off auto config for dovecot/postfix. Then supply them the correct settings locked to their domain. Autoconfig settings is the culprit that fetches the default broadcast IP.

Yeah, i don’t think that’s my problem. I’ve tried to configure it manually with no luck.

Do you know how those people manage to do it? which setting do i have to add or modify?

can’t believe this is this hard…

thanks!