1
24.7 Production Series / Re: Opening 993 and 25 for Email Ports
« on: November 25, 2024, 03:19:57 pm »
I run my own mail server at my house, and utilize Proxmox Mail Gateway in an LXC container, and Axigen mail server in another LXC.
I use aliases for this to help keep this clean and organized. I have one inbound rule (Firewall / Rules / WAN) for port 25 that says from Any - to the mail gateway, and a linked NAT rule for it. You shouldn't need anything setup for outbound unless you modified your any rule outbound, which nothing is blocked by default outbound.
My outbound mail port 25 is blocked by my ISP. So, I use an SMTP relay host (SMTP2GO) that allows 1000/mo for free. I have a template in the mail gateway that allows me to utilize outbound mail through the mail gateway using an authenticated smarthost. This also helps with your mail reputation for your domain. My mail server is setup to send all mail through the mail gateway. Inbound, everything is sent to the mail gateway first, then it passes it along to the mail server once it has been scored.
None of this kind of hosting is as hard as everyone makes it out to be - if you have the free time to set it up and monitor it, I encourage anyone to at least try it. I think a lot of people just don't have the time to stay on top of people trying to relay, but using things like a mail gateway that utilizes spamhaus and other checks can help out a lot, along with using things like Crowdsec and such on OPN.
Other alias rules I have in place that you are going to want at the top of your list (they are applied in an order from top to bottom) are blocking ASNs and blocking IPs, because you will have bad actors trying to relay off you. OPN allows you to block by ASN number, which can be fantastic to use, but it may also block some services you want to access and cannot. This takes just a few seconds of adding an ASN number or an IP to the alias list and applying. I only bother with the morons that are trying to ping my mail every minute - the small few checks every now and then I don't worry about and are already listed in an RBL 99.9% of the time.
I use aliases for this to help keep this clean and organized. I have one inbound rule (Firewall / Rules / WAN) for port 25 that says from Any - to the mail gateway, and a linked NAT rule for it. You shouldn't need anything setup for outbound unless you modified your any rule outbound, which nothing is blocked by default outbound.
My outbound mail port 25 is blocked by my ISP. So, I use an SMTP relay host (SMTP2GO) that allows 1000/mo for free. I have a template in the mail gateway that allows me to utilize outbound mail through the mail gateway using an authenticated smarthost. This also helps with your mail reputation for your domain. My mail server is setup to send all mail through the mail gateway. Inbound, everything is sent to the mail gateway first, then it passes it along to the mail server once it has been scored.
None of this kind of hosting is as hard as everyone makes it out to be - if you have the free time to set it up and monitor it, I encourage anyone to at least try it. I think a lot of people just don't have the time to stay on top of people trying to relay, but using things like a mail gateway that utilizes spamhaus and other checks can help out a lot, along with using things like Crowdsec and such on OPN.
Other alias rules I have in place that you are going to want at the top of your list (they are applied in an order from top to bottom) are blocking ASNs and blocking IPs, because you will have bad actors trying to relay off you. OPN allows you to block by ASN number, which can be fantastic to use, but it may also block some services you want to access and cannot. This takes just a few seconds of adding an ASN number or an IP to the alias list and applying. I only bother with the morons that are trying to ping my mail every minute - the small few checks every now and then I don't worry about and are already listed in an RBL 99.9% of the time.