Hello,

I am currently running a Mailcow setup on Ubuntu 22.04 with four public IP addresses. I aim to host four different domains on this server and ensure that each domain uses a dedicated IP for sending outbound mail. My goal is to configure this without disrupting the existing Mailcow configuration or mail delivery functionality.

I am seeking guidance on the best approach to achieve this. Specifically, I am looking for advice.

Thank you for your assistance!

Best regards,
[LM]

If you are not an expert into mail stack and how to configure it, I assume you are not, cause you are asking, than i would advice to make 4 separate mailcow instances to handle your domain per IP separation.

If you insist on one instance, you will need to make pretty non-standard configuration change in your postfix start whit master.conf spin up multiple smtp services like this

(do not copy&paste, it will break something)

domain1 unix -       -       n       -       -       smtp
      -o syslog_name=mail.domain1.com
      -o smtp_helo_name=mail.domain1.com
      -o smtp_bind_address=1.1.1.1

domain2 unix -       -       n       -       -       smtp
      -o syslog_name=mail.domain2.com     
      -o smtp_helo_name=mail.domain2.com
      -o smtp_bind_address=2.2.2.2

and remake transport maps somehow like

@domain1.com domain1:
@domain2.com domain2:

and possible much more, it can be done, but just don’t.

Have something to say?

Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

No one is typing