Skip to content

Tutorial for secure emailing with personal domain,Cloudflare, virtualmin and postfix

Unsolved Linux
30 2 12.0k 1
  • @phenomlab said in Tutorial for secure emailing with personal domain,Cloudflare, virtualmin and postfix:

    By default, Virtualmin based domains have email which is accessible at https://yourserver.com:20000

    hmmm acess seem to work, I log with root but Inbox doesn’t seem to load correctly.

    fd195731-4b44-4671-a6e3-9740be4ebd70-image.png

    After a moment I have this message :

    f3455b91-f7d0-4ed8-80cd-447248289046-image.png

    If I log with my root account like always, I have this :

    e27442e8-fd73-478f-b8ca-62e274b5413a-image.png

    EDIT: seems Ok with other account. Seems root account doesn’t have inbox


    @phenomlab said in Tutorial for secure emailing with personal domain,Cloudflare, virtualmin and postfix:

    The MX record root.phenomlab.com is my VPS server

    what is root.phenomlab.com on your virtualmin? it’s not a virtual server, jsut your hostname i guess

    For example, I am login to virtualmin on adm.xxxx.fr (hostname of my server) so my mx field should be adm.xxxx.fr and not root.xxxx.fr right?

    for dmarc and dkim, i’am not see for the moment, i see later

    — EDIT:

    my Dmarc configuration

    fe134949-48ad-4b52-96d8-00dd32f12762-image.png

    wrote on last edited by phenomlab
    #14

    @DownPW said in Tutorial for secure emailing with personal domain,Cloudflare, virtualmin and postfix:

    For example, I am login to virtualmin on adm.xxxx.fr (hostname of my server) so my mx field should be adm.xxxx.fr and not root.xxxx.fr right?

    Yes, correct.

    @DownPW said in Tutorial for secure emailing with personal domain,Cloudflare, virtualmin and postfix:

    For DKIM, I don’t quite understand. Once generated in the tools you gave, I understand for the DNS entry in CF but what do I do with the private and public key?

    The private and public key can simply be stored. You do not have to do anything with these.

  • Seems port 25 OK

    image.png

    wrote on last edited by phenomlab
    #15

    @DownPW said in Tutorial for secure emailing with personal domain,Cloudflare, virtualmin and postfix:

    Seems port 25 OK

    Not sure about that - see below from your server. When sending a telnet request on port 25, there is no response. This typically means the port is closed on your side.

    71978ee1-8be0-41d5-ae6b-68742f02cbd5-image.png

    What SHOULD happen is this

    990ed97c-4449-4936-8c78-95268828839e-image.png

    However, it DOES respond on port 587

    236cd744-7126-4c72-b67e-40b53b2b70f0-image.png

    From recollection, your VPS is being hosted by Hetzner. Although you have no firewall rules in place to prevent outbound connections on port 25, Hetzner by default will block this port until you’ve paid at least one month’s billing, and will only release the block if you formally request it. You’ll need to get the port unblocked before you can proceed - see below

    https://docs.hetzner.com/cloud/servers/faq/#why-can-i-not-send-any-mails-from-my-server

    Unfortunately, email spammers and scammers like to use cloud hosting providers. And we at Hetzner naturally want to prevent this. That’s why we block ports 25 and 465 by default on all cloud servers. This is a very common practice in the cloud hosting industry because it prevents abuse. We want to build trust with our new customers before we unblock these mail ports. Once you have been with us for a month and paid your first invoice, you can create a limit request to unblock these ports for a valid use case. In your request, you can tell us details about your use case. We make decisions on a case-by-case basis.

    As an alternative, you can also use port 587 to send emails via external mail delivery services. Port 587 is not blocked and can be used without sending a limit request.

  • wrote on last edited by DownPW
    #16

    OUPS 🙂

    Ok so I think it’s Hetzner who is blocking.
    I will make them an unblocking request.

  • OUPS 🙂

    Ok so I think it’s Hetzner who is blocking.
    I will make them an unblocking request.

    wrote on last edited by
    #17

    @DownPW Yep 🙂

  • wrote on last edited by
    #18

    Indeed. +1 for telnet.

    I just trusted the netstats which told me that everything is OK which is certainly the case on the server.

    since I didn’t have Telnet on hand I tested a website which told me OK

    ba38b6b1-1bbc-497a-b787-81edf7662a6b-image.png

  • Indeed. +1 for telnet.

    I just trusted the netstats which told me that everything is OK which is certainly the case on the server.

    since I didn’t have Telnet on hand I tested a website which told me OK

    ba38b6b1-1bbc-497a-b787-81edf7662a6b-image.png

    wrote on last edited by
    #19

    @DownPW said in Tutorial for secure emailing with personal domain,Cloudflare, virtualmin and postfix:

    since I didn’t have Telnet on hand I tested a website which told me OK

    I have to confess, I installed the telnet-client on your server for diagnostic purposes.

  • OUPS 🙂

    Ok so I think it’s Hetzner who is blocking.
    I will make them an unblocking request.

    wrote on last edited by
    #20

    @DownPW said in Tutorial for secure emailing with personal domain,Cloudflare, virtualmin and postfix:

    I will make them an unblocking request.

    Curious to know how you got on with this…

  • wrote on last edited by DownPW
    #21

    sorry for the late response my friends. They unblocked port 25 very quickly and I can send emails;

    Just that the domains in caramail.com refused my sending of email for obscure reasons and protonmail, I receive them but in spam with an error message

    I will share all its errors with you to see and I would like to deepen that the DMARC, and DKIM puts the private/public key which I do not really understand (see my request above)

    https://sudonix.org/post/8462

  • sorry for the late response my friends. They unblocked port 25 very quickly and I can send emails;

    Just that the domains in caramail.com refused my sending of email for obscure reasons and protonmail, I receive them but in spam with an error message

    I will share all its errors with you to see and I would like to deepen that the DMARC, and DKIM puts the private/public key which I do not really understand (see my request above)

    https://sudonix.org/post/8462

    wrote on last edited by
    #22

    @DownPW emails are going to junk because of missing DNS records as I mentioned previously. You won’t need to use the public and private keys unless you need extended and/or advanced functions.

  • wrote on last edited by
    #23

    I have the DNS pointers present

    image.png

  • I have the DNS pointers present

    image.png

    wrote on last edited by
    #24

    @DownPW not all are there. The SPF record is missing. That’s enough to place email you sent into junk at the recipient end.

  • wrote on last edited by DownPW
    #25

    Spf is on the screenshot

  • Spf is on the screenshot

    wrote on last edited by
    #26

    @DownPW sorry, yes, it is. Completely missed that.

  • Spf is on the screenshot

    wrote on last edited by
    #27

    @DownPW Can you PM me your domain name so I can run a few tests?

  • wrote on last edited by
    #28

    Yep no problem

  • Yep no problem

    wrote on last edited by phenomlab
    #29

    @DownPW thanks. See PM. You can validate your domain in terms of its email suitability by using the checker below

    https://emailhealthcheckup.com/

    In addition, there are some great generators and checkers here

    https://dmarcly.com/tools/

  • Yep no problem

    wrote on last edited by
    #30

    @DownPW any update?


Related Topics
  • Fedora Server + Virtualmin

    Chitchat fedora server linux virtualmin
    1
    1 Votes
    1 Posts
    318 Views
    No one has replied
  • Adjusting HSTS settings for public wifi's

    Solved Security hsts cloudflare ssl
    4
    1
    2 Votes
    4 Posts
    2k Views
    phenomlab
    @Hari Ok, no issues. Keep me posted…
  • Error certification on virtualmin/Nginx

    Solved Linux cert virtualmin nginx
    17
    2
    0 Votes
    17 Posts
    7k Views
    phenomlab
    @DownPW anytime
  • Issues getting Flarum to work on new host

    Solved Configure virtualmin
    65
    14 Votes
    65 Posts
    30k Views
    phenomlab
    @crazycells huh. Thanks. Will need to check that as well.
  • SSl expired on virtualmin

    Solved Configure virtualmin ubun server ssl
    18
    3 Votes
    18 Posts
    7k Views
    phenomlab
    @justoverclock Not necessarily. You only need to use this if it fails from the Virtualmin window
  • VirtualMin create virtual server

    Solved Configure
    4
    2 Votes
    4 Posts
    2k Views
    phenomlab
    @justoverclock correct. You only need to keep an eye on the resources of the droplet itself
  • Email issue (virturalmin)

    Solved Hosting virtualmin
    5
    0 Votes
    5 Posts
    2k Views
    JAC
    @gotwf said in Email issue (virturalmin): @jac Typically you want your domain’s MX records to point to FQDN server name, e.g. foo.example.eg % drill stockportcounty.fans mx ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 63911 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;; stockportcounty.fans. IN MX ;; ANSWER SECTION: stockportcounty.fans. 600 IN MX 10 stockportcounty.fans. Yours do not. Although a bit more drillin’ and reverse lookup indicates thusly; % drill stockportcounty.fans ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 160 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;; stockportcounty.fans. IN A ;; ANSWER SECTION: stockportcounty.fans. 600 IN A 65.108.63.35 ;; AUTHORITY SECTION: ;; ADDITIONAL SECTION: ;; Query time: 127 msec ;; SERVER: 204.8.232.207 ;; WHEN: Sun Oct 10 19:37:02 2021 ;; MSG SIZE rcvd: 54 <kvg@loon:~>% drill -x 65.108.63.35 ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 57802 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;; 35.63.108.65.in-addr.arpa. IN PTR ;; ANSWER SECTION: 35.63.108.65.in-addr.arpa. 86400 IN PTR vps.stockportcounty.fans. I think you probably want your mx record to point to vps.stockportcountry.fans. It is important for forward and reverse lookups for MX records jive. Maybe you are looking like a spammer in that they do not? Edit: But at least you have a reverse record, many spammers do not, so that is a big red flag. Thanks for the advice, will look into it all later once back home.
  • Cloudflare now handling email routing, YAY 🚀

    Configure cloudflare
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied