redirect 80 requests to webmail

Hello,

Is it possible to redirect port 80 requests to http://webmail.mydomain.com
Hi,
which traffic should be redirected? The one coming to port 80 with target IP of the PVE host or all the traffic on port 80 inbound on a specific interface? You can achieve this by setting up port forwarding rules via the firewall, if your webmail service has static IP and is running on the PVE host/cluster.

If on the other hand the webmail is running on an outside server and you want to redirect by domain name, you could setup a simple nginx or apache2 service with redirect rules.
 
  • Like
Reactions: sheshman
Hi,
which traffic should be redirected? The one coming to port 80 with target IP of the PVE host or all the traffic on port 80 inbound on a specific interface? You can achieve this by setting up port forwarding rules via the firewall, if your webmail service has static IP and is running on the PVE host/cluster.

If on the other hand the webmail is running on an outside server and you want to redirect by domain name, you could setup a simple nginx or apache2 service with redirect rules.
My webmail works on another server with different ip, and when users try to reach mail.mydomain.com through browser it returns 404 (normal behavior i believe because my A & MX records pointed to proxmox mgw server).

On the other hand all users were so get used to use mail.mydomain.com as webmail so what i want to do is to forward http://mail.mydomain.com to my webmail server's url if it is possible of course.
 
My webmail works on another server with different ip, and when users try to reach mail.mydomain.com through browser it returns 404 (normal behavior i believe because my A & MX records pointed to proxmox mgw server).

On the other hand all users were so get used to use mail.mydomain.com as webmail so what i want to do is to forward http://mail.mydomain.com to my webmail server's url if it is possible of course.
Okay, but would it not make more sense to update the DNS records in that case, instead of redirecting?
 
  • Like
Reactions: sheshman
Okay, but would it not make more sense to update the DNS records in that case, instead of redirecting?
If i change the MX & A record as point to zimbra instead of proxmox, then would proxmox stop working, sorry i'm a rookie and trying to learn.

How i must create dns records to point mail.mydomain.com as webmail?
 
If i change the MX & A record as point to zimbra instead of proxmox, then would proxmox stop working, sorry i'm a rookie and trying to learn.

How i must create dns records to point mail.mydomain.com as webmail?
`mail.mydomain.com` and `mydomain.com` are not the same, so you could have a DNS record for `mail.mydomain.com` pointing to your webmail service (which I hope is redirecting from HTTP to HTTPS on the webmail site) and another subdomain, e.g. `pve.mydomain.com` pointing to your PVE host and maybe a CNAME record `mydomain.com` pointing to `pve.mydomain.com` if its what you want. Then your PVE host would be reachable via `mydomain.org` and/or `pve.mydomain.org`, while the webmail service can be reached via `mail.mydomain.com`

How to setup these DNS records will depend on your DNS provider.

Or am I getting something wrong here and you are referring to a PMG setup, not a PVE setup?
 
  • Like
Reactions: sheshman
`mail.mydomain.com` and `mydomain.com` are not the same, so you could have a DNS record for `mail.mydomain.com` pointing to your webmail service (which I hope is redirecting from HTTP to HTTPS on the webmail site) and another subdomain, e.g. `pve.mydomain.com` pointing to your PVE host and maybe a CNAME record `mydomain.com` pointing to `pve.mydomain.com` if its what you want. Then your PVE host would be reachable via `mydomain.org` and/or `pve.mydomain.org`, while the webmail service can be reached via `mail.mydomain.com`

How to setup these DNS records will depend on your DNS provider.

Or am I getting something wrong here and you are referring to a PMG setup, not a PVE setup?
i just realised that i started my topin in the wrong section, terribly sorry, could you please move my topic to right section

here is my system details(i made up the ip adresses due to security reasons;

--Proxmox Mail Gateway 7.1-1 (176.66.65.66)
--Zimbra 8.8.15 (177.77.75.77)
on the DNS side
MX : mail.mydomain.com ->176.66.65.66
A : mail.mydomain.com->176.66.65.66
smtp.mydomain.com->177.77.75.77
imap.mydomain.com->177.77.75.77
pop.mydomain.com->177.77.75.77

when you try to navigate mail.mydomain.com PMG handling the request and returns 404 because there are no service responses requests from port 80 on PMG, what i want to do is forward mail.mydomain.com:80 requests to webmail.mydomain.com:80.

Sorry for wrong section again.
 
i just realised that i started my topin in the wrong section, terribly sorry, could you please move my topic to right section

here is my system details(i made up the ip adresses due to security reasons;

--Proxmox Mail Gateway 7.1-1 (176.66.65.66)
--Zimbra 8.8.15 (177.77.75.77)
on the DNS side
MX : mail.mydomain.com ->176.66.65.66
A : mail.mydomain.com->176.66.65.66
smtp.mydomain.com->177.77.75.77
imap.mydomain.com->177.77.75.77
pop.mydomain.com->177.77.75.77

when you try to navigate mail.mydomain.com PMG handling the request and returns 404 because there are no service responses requests from port 80 on PMG, what i want to do is forward mail.mydomain.com:80 requests to webmail.mydomain.com:80.

Sorry for wrong section again.
what you could do in that case is install nginx and set it up to redirect http/s traffic to the new domain. Something like here https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections#nginx but with the different domains of course. I would directly redirect to https in that case.
 
  • Like
Reactions: sheshman

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!