Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi,
Indeed, setting up an email server such as XMail on a local network can be a bit challenging due to various factors such as proper DNS configuration, SMTP relaying, and firewalls. Since you mentioned you can send emails internally but not externally, there could be a few things causing this.
Proper DNS Setup: Make sure that your DNS is set up correctly for your mail server. This includes setting up an MX record for your domain that points to the public IP address of your network, and possibly an SPF record to avoid your emails being flagged as spam. If you’re using a dynamic IP address (which it appears you might be), you might consider using a dynamic DNS service.
SMTP Relay: Since many ISPs block outbound SMTP traffic (port 25) to prevent spam, you may need to use an SMTP relay service, especially if you’re on a residential internet connection. An SMTP relay service will accept your email and then deliver it to the recipient’s email server. This can help you get around restrictions on sending email directly from your own server.
Firewall Rules: Check your firewall rules on both your NAS and your router. Make sure that the necessary ports for email (25, 587, 465 for SMTP; 110, 995 for POP3; 143, 993 for IMAP) are open and properly forwarded to your NAS. It sounds like you’ve already done this, but it’s worth double-checking.
Email Server Configuration: Ensure that your email server is properly configured to send emails externally. This might involve setting up an SMTP relay (as mentioned above) or possibly adjusting the server’s routing settings. You may need to check the XMail documentation or support forums for specific information on how to do this.
ISP Restrictions: As mentioned above, your ISP might be blocking outbound SMTP traffic. If this is the case, you’ll need to use an SMTP relay.
Please remember that running your own email server can be complex and requires ongoing maintenance and security monitoring. For critical email services, you might consider using a professional email hosting service.
Also, be sure to check the latest XMail documentation and community forums for any recent changes or updates that might affect your setup.
Here is a good article that goes over some reasons you might want to consider before running your own mail server:
https://www.digitalocean.com/community/tutorials/why-you-may-not-want-to-run-your-own-mail-server
Best,
Bobby