On 15/04/2023 23:16, Fabio Martins wrote:
solution inline
On 2023-04-15 17:05, Sebastian Arcus via Exim-users wrote:
On 15/04/2023 17:00, Fabio Martins wrote:
I believe you are trying to use the same IP address for the 3 exim
instances, otherwise the solution would be quite simple binding each
instance to the proper IP address. Right? Or do you have 3 different
public IP addresses?
That's correct - there is only one IP address on the VPS/proxy - which
needs to serve all the Exim servers behind
Ok, so solution will work.
If you have only 1 public IP, does a solution forwarding to a
subdomain via system_aliases+dsearch+local_parts+cron job updating
user list, would satisfy?
example:
a...@company1.com -> a...@internal.company1.com
e...@company1.com -> e...@internal.company1.com
key...@business2.com -> key...@internal.business2.com
s...@designer3.com -> s...@internal.designer3.com
cont...@designer3.com -> cont...@internal.designer3.com
I can't say that I am really following what you are trying to suggest
- but I don't think having emails on subdomains would help with my
problem
The subdomain trick is just a way to reach the right Exim box.
Cloud Box configuration:
box1 VPN IP: bind it to IP 172.20.10.1
box2 VPN IP: bind it to IP 172.20.10.2
box3 VPN IP: bind it to IP 172.20.10.3
VPN configuration for each client ( adjust IP addresses for your
configuration ):
Box1 will bind to port 25 on VPN IP 172.20.10.1
Box2 will bind to port 25 on VPN IP 172.20.10.2
Box3 will bind to port 25 on VPN IP 172.20.10.3
internal DNS configuration of cloud box ( unbound shall do the trick ):
internal.company1.com MX points to 172.20.10.1
internal.business2.com MX points tp 172.20.10.2
internal.designer3.com MX points to 172.20.10.3
--
Exim configuration of Cloud Box:
# mkdir /etc/exim/domainlistbusiness/
# echo 'adam: a...@internal.company1.com' >>
/etc/exim/domainlistbusiness/company1.com
# echo 'eve: e...@internal.company1.com' >>
/etc/exim/domainlistbusiness/company1.com
# echo 'keyser: key...@internal.business2.com' >>
/etc/exim/domainlistbusiness/business2.com
# echo 'soze: s...@internal.designer3.com' >>
/etc/exim/domainlistbusiness/designer3.com
# echo 'contact: cont...@internal.designer3.com' >>
/etc/exim/domainlistbusiness/designer3.com
# /etc/exim/exim4.conf ( or proper filename in your box ) (only relevant
lines):
domainlist local_domains =
company1.com:business2.com:designer3.com:internal.company1.com:internal.business2.com:internal.designer3.com
system_aliases:
driver = redirect
allow_fail
allow_defer
domains = dsearch,ret=full;//etc/exim/domainlistbusiness
local_parts = lsearch;$domain_data
data = ${lookup{$local_part}lsearch*@{${domain_data}}}
file_transport = address_file
pipe_transport = address_pipe
--
Exim configuration of VPN Exim Box1 from company1.com ( only relevant
lines ):
primary_hostname = company1.com
domainlist local_domains = company1.com:internal.company1.com
( other VPN boxes you can deduct from above )
--
This dirty / quick trick shall work ok, and its not a complicated setup.
That still seems like quite a complex setup. I was thinking of just
using the Exim routers in the front end machine to choose the correct
back-end machine to forward the email to. Something like:
relay_to_compan1:
driver = manualroute
domains = company1.com
route_list = company1.com 192.168.100.10
transport = remote_relay_company1
host_find_failed = defer
relay_to_compan2:
driver = manualroute
domains = company2.com
route_list = company2.com 192.168.100.11
transport = remote_relay_company2
host_find_failed = defer
Wouldn't the above just work for incoming email?
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/