If you use the Raspberry Pi as a mail server in combination with an internet connection that has a static IP address, you come as close as possible to a professional mail server. In this case, it is advisable to enter not only the above-mentioned mandatory entries (PTR and MX record), but also an SPF resource record and DKIM (DomainKeys Identified Mail). This reduces the likelihood of your Raspberry Pi e-mail server deciding that e-mails from other mail servers are spam. However, as mentioned above, a mail server first needs to build up a reputation so that messages it sends will be less likely to be considered as spam, which is difficult to achieve on private servers with comparatively low activity.
If your internet connection only has a dynamic IP address, you can set up the Raspberry Pi mail server via DDNS, at least with the basic functions – even if your mails are likely to frequently end up in the recipient’s spam folder. Therefore, it is important to let the recipient know that they should configure their spam filter so that your e-mails don’t end up in the spam folder. This is usually only worth it if a manageable group of people (such as within a company, work group, etc.) is to be reached via the mail server. However, if all recipients are connected to the same local network, creating an internal mail server especially pays off.
One of the biggest advantages of your own e-mail server not being connected to an e-mail provider is complete data integrity. If it’s not that important for you to set up and operate your own e-mail server, the effort and cost of managing and updating the server isn’t worth it. In this case, using a larger mail provider for e-mail traffic is usually the better option. Otherwise, technology enthusiasts and those curious to learn could benefit from a private mail server if they want to understand the technology behind an e-mail server with Raspberry Pi.