Report this

What is the reason for this report?

Help for setting up XMail server on a ARM CPU NAS behind a router with firewall

Posted on August 31, 2017

Although I’ve some experiences in SysAdmin I can NOT get a functional configuration for an XMail server running on a DLINK 327L Network Attached Storage with LINUX. The server is very small and very funtcional (in Intranet) but I’ve got a problem sending e-mails outside my net. The NAS is behind a Router with internal DSL mode, with SMTP/POP3/Secure Mail ports open (also from outside) with port forwarding. I currently have a domain e.g. named bla.mydom.com, the router has 192.168.178.1 as intranet address, outside address for router is 86.122.98.64, the NAS XMail server has intranet address 192.168.178.32 and has all ports open for mailing (NAS)

Running “tshark” on the NAS server while sending from a client with “Balsa” Mailer to that NAS Mail server I’ve seen that there is NO MX nslookup/DNS lookups for outside mail servers like gmail.com only for my domain (or eg bogus.com) - but I can eg. ping, nslookup etc. on the shell on that NAS, With Swaks (running on the NAS) sending outside eg. to Gmail it is working

What should I have to do for sending email outside? (I got mad)



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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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

The developer cloud

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

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.