{"id":4507,"date":"2021-02-24T16:51:59","date_gmt":"2021-02-24T16:51:59","guid":{"rendered":"https:\/\/www.s-sols.com\/?p=4507"},"modified":"2021-02-27T15:51:43","modified_gmt":"2021-02-27T15:51:43","slug":"setup-own-mail-server","status":"publish","type":"post","link":"https:\/\/www.s-sols.com\/setup-own-mail-server","title":{"rendered":"How to setup free own mail server"},"content":{"rendered":"<p style=\"text-align:justify\">\n  If there is a need to create your own email server for your company or personal use for free (it\u2019s actual for small businesses) so this information gives the point of interest. As a result, the mail can be sent over the world via your free mail server for the domain.\n<\/p>\n<p style=\"text-align:justify\">\n  Why could we make our own email server?\n<\/p>\n<h3><a id=\"pros\"><\/a>Pros<br \/>\n<\/h3>\n<ul>\n<li>\n<div style=\"text-align:justify\"><strong>Our own mail domain<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      Sending a company\u2019s mail from its domain is a good idea to be business attractive. E.g. sales@mycompany.com.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><strong>Unlimited users<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      We can create as many users as we want without extra pay.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><strong>Unlimited targeting<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      Unlimited target addresses while sending mail. In external paid services we have to pay per user.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><strong>All the data is under our control<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      Nobody will be able to see our internal business conversation.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><strong>Transmission control<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      Some public mail servers couldn\u2019t send mail to some domains, e.g. protonmail.com due to country limitations. Hosting your own email server gives us the ability to manage such limitations.\n    <\/p>\n<\/li>\n<\/ul>\n<h3><a id=\"cons\"><\/a>Cons<br \/>\n<\/h3>\n<ul>\n<li>\n<div style=\"text-align:justify\"><strong>Support effort<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      Yes, this is the same headache as establishing our own web server such as keeping the service online, administration, etc.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><strong>Manual setup<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      Special knowledge is required to set up all properly. But, if you are ready for this, we will give it in this article.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><strong>Probably sending limitations<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      Some static address ranges can be blacklisted. But there is a <a href=\"#whitelist\">solution to avoid this<\/a>.\n    <\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align:justify\">\n  There are <strong>three main steps<\/strong> to establish and set up a self-hosted mail server.\n<\/p>\n<ul>\n<li style=\"text-align:justify\"><a href=\"#ip_dns\"><strong>Setting up IP and DNS<\/strong><\/a>.\n  <\/li>\n<li style=\"text-align:justify\"><a href=\"#mail_app\"><strong>Choosing and running a mail server application<\/strong><\/a>.\n  <\/li>\n<li style=\"text-align:justify\"><a href=\"#whitelist\"><strong>Whitelisting your own email server<\/strong><\/a>.\n  <\/li>\n<\/ul>\n<h2><a id=\"ip_dns\"><\/a>Setting up IP and DNS<br \/>\n<\/h2>\n<h3>\n  Ensure public static IP, public domain, and PTR record<br \/>\n<\/h3>\n<p style=\"text-align:justify\">\n  These are the main requirements to run your own email server.\n<\/p>\n<ul>\n<li>\n<div style=\"text-align:justify\"><strong>Public and static IP address<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      The IP address of our own email server should be public and the same in time. <strong>Ensure<\/strong> it from your <strong>hosting<\/strong> or <strong>internet service provider<\/strong>.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><strong>The domain name points to the IP<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      DNS record of the public <a href=\"#dns_mx\">domain name of our own mail server<\/a> should point to that IP address. It can be <strong>managed<\/strong> under the DNS settings of your <strong>domain <\/strong>name<strong> provider<\/strong>.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><strong>The IP points to the domain name<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      Further, the back DNS record (named <a href=\"https:\/\/en.wikipedia.org\/wiki\/Reverse_DNS_lookup\" rel=\"nofollow noopener\" target=\"_blank\">PTR<\/a>) must point our IP to the domain name of our own mail server. You can <strong>ask<\/strong> your <strong>hosting or internet service provider<\/strong> to set up it to your public domain name. It can be easily checked by your IP via a special online checker like <a href=\"https:\/\/mxtoolbox.com\/ReverseLookup.aspx\" rel=\"nofollow noopener\" target=\"_blank\">this<\/a>, or Windows\u2019s \u2018nslookup\u2019 tool and \u2018host\u2018 command in UNIX-based systems.\n    <\/p>\n<\/li>\n<\/ul>\n<h3><a id=\"dns_mx\"><\/a>Configure DNS MX record<br \/>\n<\/h3>\n<p style=\"text-align:justify\">\n  A mail exchanger record (<a href=\"https:\/\/en.wikipedia.org\/wiki\/MX_record\" rel=\"nofollow noopener\" target=\"_blank\">MX<\/a>) specifies the mail server responsible for accepting email messages on behalf of a domain name.\n<\/p>\n<p style=\"text-align:justify\">\n  So, we need to point <strong>domain name<\/strong> <strong>of<\/strong> our self-hosted <strong>mail server<\/strong> that will process mail of our <strong>main domain<\/strong>. E.g. if our domain is <em>mycompany.com<\/em>, the mail server is <em>mail.mycompany.com<\/em>, then the DNS record for <em>mycompany.com<\/em> will be:\n<\/p>\n<table>\n<tbody>\n<tr>\n<th style=\"vertical-align:top\">\n<p style=\"text-align:justify\"><strong>Type<\/strong>\n        <\/p>\n<\/th>\n<th style=\"vertical-align:top\">\n<p style=\"text-align:justify\"><strong>Host<\/strong>\n        <\/p>\n<\/th>\n<th style=\"vertical-align:top\">\n<p style=\"text-align:justify\"><strong>Value<\/strong>\n        <\/p>\n<\/th>\n<th style=\"vertical-align:top\">\n<p style=\"text-align:justify\"><strong>Priority<\/strong>\n        <\/p>\n<\/th>\n<th style=\"vertical-align:top\">\n<p style=\"text-align:justify\"><strong>TTL<\/strong>\n        <\/p>\n<\/th>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top\">\n<p style=\"text-align:justify\">\n          MX\n        <\/p>\n<\/td>\n<td style=\"vertical-align:top\">\n<p style=\"text-align:justify\">\n          @\n        <\/p>\n<\/td>\n<td style=\"vertical-align:top\">\n<p style=\"text-align:justify\">\n          mail.mycompany.com\n        <\/p>\n<\/td>\n<td style=\"vertical-align:top\">\n<p style=\"text-align:justify\">\n          10\n        <\/p>\n<\/td>\n<td style=\"vertical-align:top\">\n<p style=\"text-align:justify\">\n          1 min\n        <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align:justify\"><a id=\"dns_dkim\"><\/a>where:\n<\/p>\n<ul start=\"4\">\n<li style=\"text-align:justify\"><strong>Priority<\/strong> is used when our domain has more than one mail server.\n  <\/li>\n<li style=\"text-align:justify\"><strong>TTL<\/strong> can be set to any preferable value and the lowest value is used to apply DNS changes as soon as possible while setting up our own email server.\n  <\/li>\n<\/ul>\n<h3>\n  Configure DNS DKIM record<br \/>\n<\/h3>\n<p style=\"text-align:justify\">\n  DomainKeys Identified Mail (<a href=\"https:\/\/en.wikipedia.org\/wiki\/DomainKeys_Identified_Mail\" rel=\"nofollow noopener\" target=\"_blank\">DKIM<\/a>) is an email security protocol that attaches an encrypted digital signature to an email. The receiving server verifies it with a public key to ensure the email hasn\u2019t been tampered with.\n<\/p>\n<p style=\"text-align:justify\">\n  So, we need private and public keys. It can be generated by an online tool like <a href=\"https:\/\/powerdmarc.com\/power-dmarc-toolbox\" rel=\"nofollow noopener\" target=\"_blank\">Power DMARC Toolbox &#8211; DKIM Record Generator<\/a>, or by <a href=\"https:\/\/bintray.com\/vszakats\/generic\/openssl\" rel=\"nofollow noopener\" target=\"_blank\">OpenSSL<\/a> commands (provided for Windows):\n<\/p>\n<ul start=\"6\">\n<li>\n<div style=\"text-align:justify\"><strong>Create private key<\/strong>\n    <\/div>\n<p style=\"text-align:left\">\n      openssl.exe genrsa -out private.key 2048\n    <\/p>\n<\/li>\n<li><strong>Create public key from private<\/strong>\n<p style=\"text-align:left\">\n      openssl.exe rsa -in private.key -pubout -outform der 2&gt;nul | openssl.exe base64 -A &gt; public.key.txt\n    <\/p>\n<\/li>\n<\/ul>\n<p>\n  And our DNS record will look like this:\n<\/p>\n<table>\n<tbody>\n<tr>\n<th style=\"vertical-align:top\">\n<p style=\"text-align:justify\"><strong>Type<\/strong>\n        <\/p>\n<\/th>\n<th style=\"vertical-align:top\">\n<p style=\"text-align:justify\"><strong>Host<\/strong>\n        <\/p>\n<\/th>\n<th style=\"vertical-align:top\">\n<p style=\"text-align:justify\"><strong>Value<\/strong>\n        <\/p>\n<\/th>\n<th style=\"vertical-align:top\">\n<p style=\"text-align:justify\"><strong>TTL<\/strong>\n        <\/p>\n<\/th>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top\">\n<p style=\"text-align:justify\">\n          TXT\n        <\/p>\n<\/td>\n<td style=\"vertical-align:top\">\n<p style=\"text-align:justify\"><strong><em>selector<\/em><\/strong>._domainkey\n        <\/p>\n<\/td>\n<td style=\"vertical-align:top\">\n        v=DKIM1; k=rsa; p=<strong><em>public_key<\/em><\/strong>\n      <\/td>\n<td style=\"vertical-align:top\">\n<p style=\"text-align:justify\">\n          1 min\n        <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align:justify\">\n  where:\n<\/p>\n<ul start=\"8\">\n<li style=\"text-align:justify\"><strong><em>selector<\/em><\/strong> &#8211; self-chosen identifier e.g. \u2018mysrv\u2019 that will be used in our <a href=\"#mail_app_dkim\">mail server application<\/a>.\n  <\/li>\n<li style=\"text-align:justify\"><strong><em>public_key<\/em><\/strong> &#8211; our public key encoded by base64 algorithm.\n  <\/li>\n<li style=\"text-align:justify\"><strong>TTL<\/strong> has the same meaning as in the <a href=\"#dns_mx\">previous paragraph<\/a>.\n  <\/li>\n<\/ul>\n<h3><a id=\"dns_spf\"><\/a>Configure DNS SPF record<br \/>\n<\/h3>\n<p style=\"text-align:justify\">\n  Sender Policy Framework (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Sender_Policy_Framework\" rel=\"nofollow noopener\" target=\"_blank\">SPF<\/a>) is an email authentication standard that checks the sender\u2019s IP address against a list of the domain owner\u2019s authorized IPs to validate incoming email.\n<\/p>\n<p>\n  Our DNS record will look like this:\n<\/p>\n<table>\n<tbody>\n<tr>\n<th style=\"vertical-align:top\">\n<p style=\"text-align:justify\"><strong>Type<\/strong>\n        <\/p>\n<\/th>\n<th style=\"vertical-align:top\">\n<p style=\"text-align:justify\"><strong>Host<\/strong>\n        <\/p>\n<\/th>\n<th style=\"vertical-align:top\">\n<p style=\"text-align:justify\"><strong>Value<\/strong>\n        <\/p>\n<\/th>\n<th style=\"vertical-align:top\">\n<p style=\"text-align:justify\"><strong>TTL<\/strong>\n        <\/p>\n<\/th>\n<\/tr>\n<tr>\n<td style=\"vertical-align:top\">\n<p style=\"text-align:justify\">\n          TXT\n        <\/p>\n<\/td>\n<td style=\"vertical-align:top\">\n<p style=\"text-align:justify\">\n          @\n        <\/p>\n<\/td>\n<td style=\"vertical-align:top\">\n        v=spf1 a mx include:<strong><em>relayer_name<\/em><\/strong> -all\n      <\/td>\n<td style=\"vertical-align:top\">\n<p style=\"text-align:justify\">\n          1 min\n        <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align:justify\"><a id=\"dns_other\"><\/a>where:\n<\/p>\n<ul start=\"11\">\n<li style=\"text-align:justify\"><strong><em>relayer_name<\/em><\/strong> &#8211; optional external <a href=\"#smtp_relayers\">mail relay server<\/a> name.\n  <\/li>\n<li style=\"text-align:justify\"><strong>TTL<\/strong> has the same meaning as in the <a href=\"#dns_mx\">previous paragraph<\/a>.\n  <\/li>\n<\/ul>\n<p style=\"text-align:justify\">\n  The handy SPF record <a href=\"https:\/\/powerdmarc.com\/power-dmarc-toolbox\" rel=\"nofollow noopener\" target=\"_blank\">online generator<\/a> can be used.\n<\/p>\n<h3>\n  Optional DNS stuff<br \/>\n<\/h3>\n<p style=\"text-align:justify\">\n  Some fields are not necessary but nice to have.\n<\/p>\n<ul start=\"13\">\n<li>\n<div style=\"text-align:justify\"><strong>DMARC<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      Domain-based Message Authentication, Reporting, and Conformance (<a href=\"https:\/\/en.wikipedia.org\/wiki\/DMARC\" rel=\"nofollow noopener\" target=\"_blank\">DMARC<\/a>) record enables our hosted own email server to declare a policy on how other email servers should react to inauthentic messages.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><strong>BIMI<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      Brand Indicators for Message Identification (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Brand_Indicators_for_Message_Identification\" rel=\"nofollow noopener\" target=\"_blank\">BIMI<\/a>) is a new standard created to make it easier to get our logo displayed next to our message in the inbox. Additionally, BIMI is designed to prevent fraudulent emails and aid deliverability as well.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><strong>TLS-RPT<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      TLS Reporting (<a href=\"https:\/\/powerdmarc.com\/what-is-tls-rpt\" rel=\"nofollow noopener\" target=\"_blank\">TLS-RPT<\/a>) gives daily aggregate reports with information on emails that don&#8217;t get encrypted and fail to deliver.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><strong>MTA-STS<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      Mail Transfer Agent Strict Transport Security (<a href=\"https:\/\/www.hardenize.com\/blog\/mta-sts\" rel=\"nofollow noopener\" target=\"_blank\">MTA-STS<\/a>) is a new standard that aims to improve the security of SMTP by enabling domain names to opt into strict transport layer security mode that requires authentication and encryption.\n    <\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align:justify\">\n  All these records except MTA-STS can be generated via <a href=\"https:\/\/powerdmarc.com\/power-dmarc-toolbox\" rel=\"nofollow noopener\" target=\"_blank\">Power DMARC Toolbox<\/a>. Configuration of MTA-STS is similar to <a href=\"https:\/\/support.google.com\/a\/answer\/9276419?hl=en\" rel=\"nofollow noopener\" target=\"_blank\">Google<\/a> and finally can be checked by <a href=\"https:\/\/www.hardenize.com\" rel=\"nofollow noopener\" target=\"_blank\">Hardenize<\/a>.\n<\/p>\n<h2><a id=\"mail_app\"><\/a>Choosing and running a mail server application<br \/>\n<\/h2>\n<p style=\"text-align:justify\">\n  Check that your hosting allows installing other software. If so, any appropriate email server application can be used. E.g. there is a <strong>free<\/strong> <a href=\"https:\/\/www.hmailserver.com\" rel=\"nofollow noopener\" target=\"_blank\">hMailServer<\/a> for <strong>Windows<\/strong> that provides all needed functions with minimum resource usage. For <strong>UNIX<\/strong>-based systems, there are many <strong>free<\/strong> email servers such as <a href=\"https:\/\/www.exim.org\" rel=\"nofollow noopener\" target=\"_blank\">Exim Internet Mailer<\/a> or <a href=\"https:\/\/www.iredmail.org\/\" rel=\"nofollow noopener\" target=\"_blank\">iRedMail<\/a>.\n<\/p>\n<p style=\"text-align:justify\">\n  You are welcome to put another good software in the comments <a href=\"#comments\">below<\/a>. Detailed choosing of such software deserves a separate article.\n<\/p>\n<p style=\"text-align:justify\">\n  For <strong>Windows,<\/strong> we recommend using <a href=\"https:\/\/www.hmailserver.com\" rel=\"nofollow noopener\" target=\"_blank\">hMailServer<\/a> due to its correlation with our <a href=\"\/about#principles\">principles of small and effective software<\/a>.\n<\/p>\n<h3>\n  Initializing<br \/>\n<\/h3>\n<p style=\"text-align:justify\">\n  When the software is chosen and installed, it&#8217;s a time setting up your own email server application.\n<\/p>\n<ul>\n<li>\n<div style=\"text-align:justify\"><strong>Domain and users<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      We should add users of our free mail server for the domain. They can be added or removed at any time.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><strong>Security<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      To provide an appropriate level of security we should add an SSL certificate for our domain. SSL configuration can be checked <a href=\"https:\/\/www.ssllabs.com\/ssltest\" rel=\"nofollow noopener\" target=\"_blank\">here<\/a>.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><a id=\"mail_app_dkim\"><\/a><strong>Message signing<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      Next, DKIM should be configured. We need to add the <em>private key<\/em> and <em>selector<\/em> <a href=\"#dns_dkim\">obtained above<\/a>. Also, header and body methods should be set to \u2018relaxed\u2019, signing algorithm should be set to \u2018SHA256\u2019 for compatibility with modern <a href=\"#check\">mail transmission checking<\/a>.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><strong>Spam protection<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      Finally, don\u2019t forget to set up antispam checking by special blacklist hosts such as <a href=\"https:\/\/www.spamhaus.org\" rel=\"nofollow noopener\" target=\"_blank\">spamhaus.org<\/a> to protect our mail server users from spam messages.\n    <\/p>\n<\/li>\n<\/ul>\n<h3>\n  E-mail protocols<br \/>\n<\/h3>\n<p style=\"text-align:justify\">\n  We should set up three e-mail protocols that are needed to send and receive mail.\n<\/p>\n<h4>\n  SMTP<br \/>\n<\/h4>\n<p style=\"text-align:justify\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Simple_Mail_Transfer_Protocol\" rel=\"nofollow noopener\" target=\"_blank\">SMTP<\/a> is used to receive incoming and send outgoing mail from\/to other mail servers. And it allows our domain users to send their messages.\n<\/p>\n<ul>\n<li>\n<div style=\"text-align:justify\"><strong>25 port<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      This port is required to manage incoming connections from other mail servers. The secure method should be set to STARTTLS.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><strong>587 port<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      It is needed for the mail clients of our own mail server. The secure method should be set to STARTTLS.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><strong>465 port<\/strong>\n    <\/div>\n<p style=\"text-align:justify\">\n      It can be needed for the <strong>legacy<\/strong> mail clients of our self-hosted mail server. So, the secure method should be set to SSL\/TLS.\n    <\/p>\n<\/li>\n<\/ul>\n<h4>\n  POP3, IMAP<br \/>\n<\/h4>\n<p style=\"text-align:justify\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Post_Office_Protocol\" rel=\"nofollow noopener\" target=\"_blank\">POP3<\/a> and <a href=\"https:\/\/en.wikipedia.org\/wiki\/Internet_Message_Access_Protocol\" rel=\"nofollow noopener\" target=\"_blank\">IMAP<\/a> are used by separate mail clients like Outlook on PC or any mail client on our mobiles. It allows our domain users to manage their messages.\n<\/p>\n<p style=\"text-align:justify\">\n  The 993 port should be used for secured IMAP connections and 995 for POP3. The secure method should be set to SSL\/TLS (not STARTTLS) to be compatible with most clients.\n<\/p>\n<p style=\"text-align:justify\">\n  The ports 143 for IMAP and 110 for POP3 can be set as well but they are not recommended for use due to their insecurity.\n<\/p>\n<h3><a id=\"check\"><\/a>Checking<br \/>\n<\/h3>\n<p style=\"text-align:justify\">\n  So, when all is set up, we can test our own email server by sending an email to somebody from our users&#8217; list. Additionally, some email application has self-diagnostic like <a href=\"https:\/\/www.hmailserver.com\" rel=\"nofollow noopener\" target=\"_blank\">hMailServer<\/a> that shows the work-ready status of all subsystems (see below).\n<\/p>\n<p style=\"text-align:center\">\n  <img decoding=\"async\" src=\"\/data\/content\/post\/solutions\/setup-own-mail-server\/hmailsrv-diag.png\" alt=\"hmailsrv-diag\" title=\"hmailsrv-diag - How to setup free own mail server\" \/>\n<\/p>\n<p style=\"text-align:justify\">\n  Now, it&#8217;s time to check sending to an external address.\n<\/p>\n<h4>\n  Gmail.com account<br \/>\n<\/h4>\n<p style=\"text-align:justify\">\n  If we have a Gmail.com account, we can also send a test email to our Gmail address. Then open our email in Gmail webmail, click \u2018show details\u2019.\n<\/p>\n<p style=\"text-align:center\">\n  <img decoding=\"async\" src=\"\/data\/content\/post\/solutions\/setup-own-mail-server\/gmail-web-message-details-en.png\" alt=\"Graphical user interface, text, application\n\nDescription automatically generated\" title=\"Graphical user interface, text, application\n\nDescription automatically generated - How to setup free own mail server\" \/>\n<\/p>\n<p style=\"text-align:justify\">\n  If there is \u2018signed-by: our domain\u2019, our DKIM signature is well configured. If there is \u2018mailed-by: our domain\u2019, our SPF is OK.\n<\/p>\n<p style=\"text-align:justify\">\n  Then, ensure passed verification status of our sending in the raw headers.\n<\/p>\n<p style=\"text-align:center\">\n  <img decoding=\"async\" src=\"\/data\/content\/post\/solutions\/setup-own-mail-server\/gmail-web-message-headers.png\" alt=\"Gmail web message headers\" title=\"Gmail web message headers - How to setup free own mail server\" \/>\n<\/p>\n<p style=\"text-align:justify\">\n  Also, in Outlook we can see the same headers in the message properties.\n<\/p>\n<p style=\"text-align:center\">\n  <img decoding=\"async\" src=\"\/data\/content\/post\/solutions\/setup-own-mail-server\/gmail-outlook-message-headers.png\" alt=\"Gmail outlook message headers\" title=\"Gmail outlook message headers - How to setup free own mail server\" \/>\n<\/p>\n<h4>\n  Special online services<br \/>\n<\/h4>\n<p style=\"text-align:justify\">\n  There are a lot of online services that can check email sending. Below are some of them.\n<\/p>\n<ul start=\"4\">\n<li>\n<div style=\"text-align:justify\"><a href=\"https:\/\/www.appmaildev.com\" rel=\"nofollow noopener\" target=\"_blank\"><strong>AppMailDev<\/strong><\/a>\n    <\/div>\n<p style=\"text-align:justify\">\n      This service allows testing email server configuration such as DKIM and SPF by sending the email to provided generated mail address. We need just to follow the on-screen instructions and the test results will be displayed there.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><a href=\"https:\/\/dkimvalidator.com\" rel=\"nofollow noopener\" target=\"_blank\"><strong>DKIMValidator<\/strong><\/a>\n    <\/div>\n<p style=\"text-align:justify\">\n      Provides the same functionality as the previous service. The test results will be sent to the sender\u2019s address.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><a href=\"https:\/\/email-test.had.dnsops.gov\/\" rel=\"nofollow noopener\" target=\"_blank\"><strong>HAD Email Auth Tester<\/strong><\/a>\n    <\/div>\n<p style=\"text-align:justify\">\n      To test message sending here we need to <a href=\"mailto:tester@email-test.had.dnsops.gov?subject=test\">send a special message to tester@email-test.had.dnsops.gov<\/a>. The test results will be sent to the sender\u2019s address.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><a href=\"https:\/\/powerdmarc.com\/power-dmarc-toolbox\" rel=\"nofollow noopener\" target=\"_blank\"><strong>PowerDMARC<\/strong><\/a>\n    <\/div>\n<p style=\"text-align:justify\">\n      This service provides only lite checking of all attributes, but it has the <a href=\"#dns_dkim\">handy tools<\/a> listed above.\n    <\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align:justify\">\n  So, if all are configured correctly but our server exists in spam blacklists we should <a href=\"#whitelist\">whitelist our own mail server<\/a>. See below.\n<\/p>\n<h2><a id=\"whitelist\"><\/a>Whitelisting your own email server<br \/>\n<\/h2>\n<p style=\"text-align:justify\">\n  So, if all mentioned above are tuned correctly, other email servers still could mark messages as spam and reject them. It happens when the IP (or its range) of our domain is included in some blacklist. The most often reason for that is some neighbor IPs were used to send spam messages.\n<\/p>\n<h3>\n  Whitelisting in most known sources<br \/>\n<\/h3>\n<p style=\"text-align:justify\">\n  So first, let\u2019s check IP (and domain if necessary) online for existence in any blacklists. E.g. it can be checked in any online checker that can be found via search. E.g. <a href=\"https:\/\/mxtoolbox.com\/blacklists.aspx\" rel=\"nofollow noopener\" target=\"_blank\">MXToolBox<\/a> does checking in the most popular blacklists. And we recommend checking it in <a href=\"http:\/\/multirbl.valli.org\/lookup\" rel=\"nofollow noopener\" target=\"_blank\">multirbl.valli.org<\/a> too due to it shows many blacklist sources and show trust of each one.\n<\/p>\n<p style=\"text-align:justify\">\n  Then, we should sequentially look at each result item and read recommendations on how to whitelist our IP in a particular blacklist source. But not all of them can\u00a0allow to do it for free, for example, <a href=\"http:\/\/www.uceprotect.net\/en\" rel=\"nofollow noopener\" target=\"_blank\">UCEPROTECT <sup>\u00ae<\/sup> -Network<\/a>.\n<\/p>\n<h3>\n  Whitelisting in particular mail servers<br \/>\n<\/h3>\n<p style=\"text-align:justify\">\n  Some servers like <a href=\"https:\/\/outlook.com\" rel=\"nofollow noopener\" target=\"_blank\">Outlook<\/a> have their own blacklists. The checking is easy \u2013 your mail server app will notify you about failed delivery in the mail client. Most mail servers provide unblock URLs in the response. So, we need to go by such URLs and follow the instructions like <a href=\"https:\/\/sender.office.com\" rel=\"nofollow noopener\" target=\"_blank\">this<\/a>.\n<\/p>\n<h3><a id=\"smtp_relayers\"><\/a>Bypassing blacklists<br \/>\n<\/h3>\n<p style=\"text-align:justify\">\n  If some official blacklist doesn\u2019t allow whitelisting or someday mail stops sending to a particular email domain &#8211; don\u2019t panic \u2013 we can use external <a href=\"https:\/\/www.wpoven.com\/blog\/free-smtp-servers-sending-emails\/#Free%20SMTP%20Services\" rel=\"nofollow noopener\" target=\"_blank\">SMTP relay services<\/a>. They allow use them as gateways or proxies while sending mail.\n<\/p>\n<ul start=\"8\">\n<li>\n<div style=\"text-align:justify\"><a href=\"https:\/\/mailersend.com\" rel=\"nofollow noopener\" target=\"_blank\"><strong>MailerSend<\/strong><\/a>\n    <\/div>\n<p style=\"text-align:justify\">\n      We recommend using it as the cheapest \u2013 it allows sending 20K emails for free per month and has a <a href=\"https:\/\/www.mailersend.com\/pricing\" rel=\"nofollow noopener\" target=\"_blank\">low cost<\/a> for extra sending. Peculiarity: CC and BCC fields haven\u2019t been supported yet.\n    <\/p>\n<\/li>\n<li>\n<div style=\"text-align:justify\"><a href=\"https:\/\/www.sendinblue.com\" rel=\"nofollow noopener\" target=\"_blank\"><strong>SendInBlue<\/strong><\/a>\n    <\/div>\n<p style=\"text-align:justify\">\n      It\u2019s another good service that allows sending 9K emails for free per month with a limit of 200 per day. Peculiarity: embedded e-mail tracking can\u2019t be turned off.\n    <\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align:justify\">\n  In each service, we should register and get approve of our <a href=\"#ip_dns\">mail server domain<\/a>. After approving, each one provides instructions on what should be adjusted to <a href=\"#ip_dns\">our DNS<\/a> and our <a href=\"#mail_app\">own mail server application<\/a> setting. For DNS it\u2019s a <a href=\"#dns_dkim\">DKIM<\/a>, <a href=\"#dns_spf\">SPF<\/a>, and <a href=\"#dns_other\">DMARK<\/a> settings, for application is an SMTP relay server address, port, and credentials.\n<\/p>\n<h2>\n  Conclusion<br \/>\n<\/h2>\n<p style=\"text-align:justify\">\n  So, now we can use <a href=\"#pros\">all benefits<\/a> of running your own email server. We hope that this material will help you reach your goal most efficiently. If you have any questions or suggestions according to this theme welcome to the discussion in our comments or via our <a href=\"mailto:support@s-sols.com\">email<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to create our own email server for free for a company or personal use.<\/p>\n","protected":false},"author":17,"featured_media":4508,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[1],"tags":[846,13,849,848,65,847],"class_list":["post-4507","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-solutions","tag-email","tag-free","tag-imap","tag-pop3","tag-server","tag-smtp"],"_links":{"self":[{"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/posts\/4507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/comments?post=4507"}],"version-history":[{"count":0,"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/posts\/4507\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/media\/4508"}],"wp:attachment":[{"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/media?parent=4507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/categories?post=4507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/tags?post=4507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}