Score:0

Setup self-hosted mail server and route MX record from domain

cn flag

I want to move away from my current email provider which also hosts my domain and setup a private mail server on my local machine which runs 24/7.

Let's say I have 4 registered email addresses [email protected], [email protected], [email protected] and [email protected], where example.com is my domain registered at IONOS.

I want to use my IONOS domain DNS configuration for example.com and route the MX server to my local machine (which is reachable through a DynDNS domain).

  1. Will I have to adjust my email client configuration to use my private machine's mail server directly or is it possible to still use imap.ionos.de and they will take care of routing to my local machine which is provided in the MX record with my DynDNS domain?
  2. Am I going to experience major blacklisting and spam flagging issues after having those set up or will my mail address still be whitelisted since it routes through imap/smtp.ionos.de?

Thanks a lot in advance.

vidarlo avatar
ar flag
You don't want to do this. Running an e-mail server on a home ISP connection won't work; your e-mails will be universally rejected as spam, and there's a good chance your ISP will even block port 25. Second, you don't grasp how such a setup should look, based on point 1-2 in your question. Furthermore, this is obviously off topic on serverfault, we don't do home labs.
Romeo Ninov avatar
in flag
[email protected] is mail address, not domain. The domain is example.com!!!
Score:2
fr flag

Will I have to adjust my email client configuration to use my private machine's mail server directly or is it possible to still use imap.ionos.de and they will take care of routing to my local machine which is provided in the MX record with my DynDNS domain?

They will not take care of any routing, because there's no actual relationship between your MX records and accessing mail via IMAP. (Many larger providers have completely different sets of servers.) Even sending mail from your client via SMTP still does not use the MX records of your domain; the only purpose of MX records is to tell other domains how to deliver mail to you.

Even if IONOS did know which servers you use for IMAP and outbound SMTP, this is still not a service that hosting companies offer. If you want your email client apps to use imap.example.com, you will have to configure them to use imap.example.com yourself.

Am I going to experience major blacklisting and spam flagging issues after having those set up or will my mail address still be whitelisted since it routes through imap/smtp.ionos.de?

What you described does not cause mail to be routed through imap/smtp.ionos.de at all. (Outbound mail delivery doesn't even involve IMAP.)

When you run your own mail server, its default mode of operation is to deliver outbound mail directly to the recipient (using the recipient's MX records). With most recipients you will indeed have issues trying to do this from a residential Internet connection – assuming your ISP even permits outbound SMTP connections at all.

Unlike in the previous section, relaying outbound mail through IONOS or another provider may be possible (and would avoid the "residential connection" issues to some extent), but the configuration for that would be done within your SMTP server's settings (e.g. "relayhost" or "smarthost") – not through DNS.

If you're still considering running the server yourself, either run the whole mail server at a datacenter, or run the primary server at home but configure it to send everything through a "relay" server at a datacenter (your own or IONOS if they offer that service) – but I would suggest to only do this after you've figured out the differences between SMTP and IMAP.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.