SELF-HOSTED | Set up and run your own Mailserver with Mailcow | DNS, Security, Installation, Test

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 มิ.ย. 2024
  • THEY always tell you it is too hard and too complicated to run your own mailserver. Well, that's a lie.
    In this video we are going to set up our own mailserver. We discuss reasons to do that, prerequisites, recommendations, security, the actual installation process, setting the required DNS-entries (including DKIM, SPF, and DMARC), setup of mailboxes, and what to do after the installation.
    This video is a bit longer, but this is time well spent if you want to run your own mailserver! Please apologize the sound quality - I had some issues with the microphone. :-(
    Resources:
    GIST with firewall commands:
    gist.github.com/opentaq/2ce85...
    Mailcow Documentation:
    mailcow.github.io/mailcow-doc...
    Chapters:
    00:00 - Intro
    00:36 - Why running your own mailserver?
    02:59 - Prerequisites
    04:32 - VPS- / VM-Setup
    08:17 - Securing the System
    10:57 - Reverse DNS
    11:51 - Basic DNS
    13:49 - Installing the Mailserver
    16:10 - Changing the Admin-Password
    17:09 - Adding a Domain and Finishing the DNS-Setup
    24:05 - Adding a Mailbox
    25:38 - Checking the Configuration
    27:29 - Using the Mailserver
    28:45 - What's Next?
    30:28 - What do YOU think?
    Let me know your thoughts in the comments below. And while you are there, don't forget to like, to subscribe, and to hit the notification bell - since it helps!
    Don't forget: Let's make the world a better place - Now more than ever!
    #StandWithUkraine #SelfHosted #Mailserver
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 203

  • @boss0killer
    @boss0killer ปีที่แล้ว +49

    This is what a tutorial is supposed to look like! Thank you!

  • @ze3rax
    @ze3rax หลายเดือนก่อน +1

    You are amazing in teaching, period. I've spent numerous hours reading this, reading that, many enthusiasts' websites on "How to", yet none of them were able to share the information the way I find it right - sharing it in such a way in order to teach the other side. Thank you! You did great! My server is running right now and it's receiving all the emails (tested).

  • @WokCorner
    @WokCorner 11 หลายเดือนก่อน +5

    25:48 - you just made me flashback to a Better Call Saul scene with that word "truly". "is there no other way, truly?" this sentence lives in my heart rent-free

  • @nura943
    @nura943 9 หลายเดือนก่อน +6

    Hi Karsten, das ist das genialste Tutorial, dass ich jemals zu dem Thema gesehen habe. Du hast damit meinem Mailserver Projekt krassen Rückenwind gegeben. Tausend Dank dafür. Das ist so kurzweilig und cool gemacht und hat zwischen den Parts, die ich schon kannte, die Brücken gebaut. Genial.

  • @Star-egy
    @Star-egy ปีที่แล้ว +5

    you are so great, please come back with more self hosted series we need the great way of explaination, also let me say we miss you :)

  • @PeterBatah
    @PeterBatah 4 หลายเดือนก่อน

    By far one of the better mail server tutorials that I have had the pleasure of sitting through. Wonderful. Thank you for sharing your time and expertise with us. Much appreciated.

  • @ishi92
    @ishi92 ปีที่แล้ว +3

    thank you! mailcow has made the process so easy that its a no brainer for a tech company to run their own mail server - especially if privacy matters to your organization.
    now need to look into backups.

  • @dwrout
    @dwrout ปีที่แล้ว +7

    Awesome tutorial, I did this as self-hosted on proxmox vm. I only needed additional port forwarding, edits to my reverse proxy and also my domain name host screen layout looked different to the one used, but it came up as in the tutorial. Scored 10/10 on the email test. Great job on the video.

  • @raven325i
    @raven325i ปีที่แล้ว +13

    Seriously good job at explaining the process - although I installed mine on a ubuntu platform, most of it was the same - so thanks for your video tutorial. It helped a lot!

  • @sideshowlol
    @sideshowlol 7 หลายเดือนก่อน +1

    Thank you for your excellent tutorial, Mr Opentaq. 🙏😎 Sound quality was plenty good enough and your explanations were very helpful.
    One thing I ran into after the main installation was done was the need to set up an SMTP relay server for my VPS. I couldn't send any email without doing this. This can now be done in the Mailcow UI. There's a section in the mailcow docs under Postfix and Relayhosts. Apart from this, I had a few other things to sort out. I'm testing mailcow on a 2GB RAM server which meant I had to disable ClamAV to prevent out-of-memory situations. I realise this is not recommended for a production email server but it has seemingly been fine for testing and has allowed me to familiarise myself with the rest of the mailcow services.

  • @James_Alfonso
    @James_Alfonso 4 วันที่ผ่านมา

    This is the first tutorial I was able to fulfill my mail server without a glitch

  • @commievoyager
    @commievoyager ปีที่แล้ว +2

    Awesome video! It's just a great job! I'll try this manual tomorrow. I hope it will work. Thanks for your efforts.

  • @CipherOne
    @CipherOne ปีที่แล้ว +6

    I love the content. I have one bit of unsolicited constructive criticism though, and I only am saying this because I believe you will succeed in this TH-cam game: I would back off a bit on the zoom cuts. If you do it too often, it can become distracting. I would use it to add emphasis only on particular points or when the subject is changing or taking a slight detour. Great camera angle and your technique is on point too, just over used. Most important of all, you're a good speaker and the content is top notch. Keep up the good work, my friend! I'm your 777th subscriber!

  • @Epicvids61
    @Epicvids61 ปีที่แล้ว +2

    Amazing content, thank you for the tips! Got a 8.7 on the spam meter, and setup my first mailserver!!

  • @akiyai
    @akiyai 4 หลายเดือนก่อน

    Very nice, useful and complete tutorial. Thank you. I will give a trial and install this server. You have convinced me of having my own mail server!

  • @3rdClaude
    @3rdClaude ปีที่แล้ว +2

    Thanks so much for this video. Every other video I found about a mail server was installing a server that had no GUI. Thisa make it so much easier. Liked & subscribed!

  • @gf6h75fghfghfghdfh7
    @gf6h75fghfghfghdfh7 ปีที่แล้ว +3

    Great video! Very well explained. My only concern is email reachability these days (aka oligopoly). Did you have any big issue?

  • @patrickscheel2033
    @patrickscheel2033 2 ปีที่แล้ว +9

    As always, a wonderful and inspiring video! Keep it up!

    • @opentaq
      @opentaq  2 ปีที่แล้ว +6

      Thank you so much!

  • @viniciostorres
    @viniciostorres 4 หลายเดือนก่อน

    Great tutorial! The only problem I faced was the time propagation of DNS updates. Thank you very much for your video.

  • @jim7smith
    @jim7smith ปีที่แล้ว +3

    One of the best tutorials I have seen in years of watching. No extraneous babbling, just the facts. Seriously, this was excellent. My only mild complaint is the background music, especially one part where it had vocals. I am hard of hearing anyway, and have to focus to hear the narration. Thanks so much, and praying for your safety in these troubled times for the Ukraine!

  • @fransvanderwerf7485
    @fransvanderwerf7485 11 หลายเดือนก่อน

    Excellent tutorial from Germany! You've been a great help here :) Many many thanks

  • @frankuchan3080
    @frankuchan3080 ปีที่แล้ว +2

    Thank you!
    I was able to successfully set up my own mailserver!

  • @francesco4143
    @francesco4143 ปีที่แล้ว +2

    Hello and thank you very much for the clear and simple guide, but I wanted to ask you if you could also add the guide for port forwarding that needs to be done on your home router (provided that you always need to have a static public address) and if NGINX Proxy is also present Manager what should he manage and how?
    Sorry for too many questions but I think this part should be explored :-)
    Thank you very much

  • @pharaohstudiosllc
    @pharaohstudiosllc 4 หลายเดือนก่อน +1

    Great Tutorial! Time for us to take control of our own data & businesses moving forward..

  • @AlexS-so7wk
    @AlexS-so7wk 3 หลายเดือนก่อน

    You are a marvellous person, thank you for the video.
    I understand almost everything that you said, and it was quite useful for me.
    A few times I skiped a content, and got lot of waste of time then, so It was a little funny to find solution of my problem in a passage of the video that I skiped :)

  • @geoffgates8264
    @geoffgates8264 ปีที่แล้ว

    proper tutorial and no stupid loud music. cheers, by the way I did it and it works.

  • @danielrdugan
    @danielrdugan ปีที่แล้ว +1

    Great tutorial!! Question tho.. would using a service like no-ip or duckdns work for setting this up in my home lab? I really dislike the idea of having a monthly bill of using a VPS and I find the cost of using no-ip way more affordable

  • @MichaelSharpTechniSmart
    @MichaelSharpTechniSmart ปีที่แล้ว +1

    I liked, subscribed and HIT the notification bell!
    Can you go a bit deeper on the rest of the DNS settings?
    btw, I like the female vocalist's voice in your background music. What is it?

  • @ADHDOCD
    @ADHDOCD ปีที่แล้ว +3

    This is a great tutorial. Can you also make a video on domain/email reputation & deliverability?

  • @phobes
    @phobes ปีที่แล้ว +1

    I've started using Cloudflare Tunnel for 3 of my domains, and it effectively masks your home IP and does not require a static IP. Would this work for a mailserver as well?

  • @sparti89
    @sparti89 ปีที่แล้ว +2

    Nice, and now i have a domain where i can host my own website. Looking forward for more videos to recycle domains :)

  • @DNAblue2112
    @DNAblue2112 10 หลายเดือนก่อน

    I managed to get everything but the DNS setup by myself. But this tutorial is awesome and I wish I had used it for the whole setup. Regardless, thanks for the help with the DNS portion!

  • @zekarov
    @zekarov ปีที่แล้ว +5

    A fantastic tutorial! Thank you

  • @CodinTest
    @CodinTest หลายเดือนก่อน

    salam alaikoum,
    Thank you for this wonderful tutorial, I hope doing well, I just have question after searching for what reason allowing the port 4190 (ManageSieve Protocol).

  • @donboscow9291
    @donboscow9291 4 หลายเดือนก่อน

    THE tutorial on this topic! No other tutorial comes close!

  • @gomo5628
    @gomo5628 2 หลายเดือนก่อน

    thanks for the detailed vid man. I wonder how this works if i host multi websites/domains on the same server.

  • @dallascao
    @dallascao 2 หลายเดือนก่อน

    Thank you! By the way if you get a "unbound test fail" error, replace the unbound image with
    unbound-mailcow:
    image: mvance/unbound:latest

  • @sirwrad
    @sirwrad 8 หลายเดือนก่อน +1

    the best tutorial to build a mail server that i've seen! thanks a lot!

    • @opentaq
      @opentaq  8 หลายเดือนก่อน +1

      Thank you!

  • @romainrochas1474
    @romainrochas1474 หลายเดือนก่อน

    Mooohooooo it works !!!! Thank you so much ! (I am on this for almost 1 month already...) I still have to fix these anoying email blocking and spam categorization, but I can send and receive mails :)

    • @saranyasreedharan480
      @saranyasreedharan480 หลายเดือนก่อน

      I setup the same in ec2 instance and one more local machine. It is working fine. When I am working on the production it is not working ans expected. After adding the DNS. while clicking in the DNS ( to see the record). It is showing 504 gateway time out error. Do have any idea?

  • @GrundGad
    @GrundGad 3 หลายเดือนก่อน

    Followed the same steps as you did but getting 5/10 for the mail-tester.
    My lowest scores are in the dmarc and dkim, any suggestions ?

  • @CliffordHepplethwaite
    @CliffordHepplethwaite 10 หลายเดือนก่อน

    Wonderful video, Sir. Many thanks!

  • @essanhaji
    @essanhaji 8 หลายเดือนก่อน

    Hi there thank you. I followed along everything is working fine except for ma domain it is not secured no https.please help

  • @comoyun
    @comoyun 10 หลายเดือนก่อน

    This tutorial was indeed helpful! thank you.

  • @alexpastushok7235
    @alexpastushok7235 ปีที่แล้ว

    Thanks for tutorial, that's helped me a lot with my mailcow installation

  • @rosolovsky
    @rosolovsky ปีที่แล้ว +2

    Nice. How can i use letsencrypt certificate for secure Mailcow server?

  • @guandulin
    @guandulin 11 หลายเดือนก่อน

    Great tutorial, I got issues with mailcow's web GUIs (admin andwebmail) with port 80 and 443 since I already had a web server running, just change them on mialcow's configuration and now its fine.
    Also got problems sending emails since my server is hosted by vultr and by default they block the SMTP ports (solved by opening a ticket explaining I will not be a spammer).

  • @reformatioinpeius2743
    @reformatioinpeius2743 7 หลายเดือนก่อน +1

    Help! I can send emails but can't recieve them. Anybody have any idea of why it may be?

  • @YeloPartyHat
    @YeloPartyHat 2 หลายเดือนก่อน

    How do you check DMARC-reports and how should you action and maintain your abuse email?

  • @farmermet6242
    @farmermet6242 ปีที่แล้ว

    like to know how to use mailcow with nginx proxy manager ... didn´t find a proper configuration yet. Any pracitcal idea?

  • @ayhangunay1178
    @ayhangunay1178 2 หลายเดือนก่อน

    Hi, super Anleitung. Was aber interessant wäre - Mailcow in Verbindung mit Proxy wie z.B.: Proxmox Mail Gateway nutzen oder Mailcow selbst mit MTA-STS benutzen, was wäre sinnvoller ?

  • @jmsvigno
    @jmsvigno ปีที่แล้ว

    One question, how to setup using reverse proxy, like nginx proxy manager behind nat on private ip , with redirect ports from video?!

  • @fabienl.7569
    @fabienl.7569 ปีที่แล้ว

    I have a stupid question here. Is it possible to do this and provide email hosting services? Clients will provide their domain names and we create professional emails for them? thank you

  • @northblue8216
    @northblue8216 8 หลายเดือนก่อน

    Very nice. Thank you. What about spam? How do you block spam?

  • @decemberfrostpaindine7987
    @decemberfrostpaindine7987 3 หลายเดือนก่อน

    I am confused at 8:27 part, is it ssh from my VM to my PC? or from my PC to its VM?
    I am just confused what machine we are referring to. sorry for being newb

  • @nephygt.h.k1187
    @nephygt.h.k1187 หลายเดือนก่อน

    Can I be able to connect remotely to this mailserver with smtp credentials?

  • @bhargavaramudu-dot-com
    @bhargavaramudu-dot-com หลายเดือนก่อน

    Which hosting provider is offering reverse DNS without extra cost?

  • @miguelpalencia4386
    @miguelpalencia4386 หลายเดือนก่อน

    excelente video!!!
    Recomendado 200%
    muy facil de entender y muy funcional para ccomenzar usando seguridad ante todo.

  • @cbaservs
    @cbaservs 10 หลายเดือนก่อน

    great to learn about my own mailserver...Karsten....vielen dank

  • @user-in5fi3kp4w
    @user-in5fi3kp4w 3 หลายเดือนก่อน

    i can't able to send the mails. the mail test itself failed. i had deployed the configuration settings on gcp virtual machine

  • @FREDERICHEIM
    @FREDERICHEIM 4 หลายเดือนก่อน

    Hello THX for thus tutorial, I'm newbie I need to watch it multiple tim for sure !
    Can I connect mutliple domains, use mailcow for transactionnal email & my another email marketing software connected to my smtp server for mass/bulk email campaign ?

  • @denystry
    @denystry ปีที่แล้ว

    Hi i got an error:
    dovecot-mailcow Cannot start service dovecot-mailcow: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting rlimits for ready process: error setting rlimit type 6: operation not permitted: unknown

  • @AquaBliss_gr
    @AquaBliss_gr ปีที่แล้ว

    looks great! how can we add virus protection etc? what are the possibilities of hacking? and how? Thank you.

  • @Dvalin21
    @Dvalin21 9 วันที่ผ่านมา

    Hello, I was wondering if you could do a updated version of this video? Cloudfare and mailcow has changed a lot. Thanks in advance.

  • @reziiwastaken
    @reziiwastaken 10 หลายเดือนก่อน

    This is a fantastic tutorial. Thank you very much!

  • @VictorMongi
    @VictorMongi ปีที่แล้ว

    Hello,
    Thank you for sharing this,
    Works like a charm.
    Thank you sir....

  • @ghazixdii
    @ghazixdii 25 วันที่ผ่านมา

    CAN I USE THE EMAIL ACCOUNTS FOR SENDING COLD EMAILS?

  • @jeromealtariba7339
    @jeromealtariba7339 5 หลายเดือนก่อน

    not working for me. When sending a mail, I got "orange screen with ERROR" but no error description... When login the admin panel, I checked all logs but no error reported in postfix or any other section. So mail is not sent and I have not idea why... However thks for this very clean and detailed video

  • @_Duke0
    @_Duke0 9 หลายเดือนก่อน

    Wow this is amazing!! Can this work as smtp? Can I purchase vps from any platform I wish?

  • @YeloPartyHat
    @YeloPartyHat 2 หลายเดือนก่อน

    How do you uninstall docker when you've installed it like this?

  • @franklimmaciel
    @franklimmaciel ปีที่แล้ว +1

    Thank you very much for this excellent tutorial.

  • @Andrei-ds8qv
    @Andrei-ds8qv หลายเดือนก่อน

    Very nice, in depth tutorial, thanks

  • @myozone
    @myozone ปีที่แล้ว

    Prefect !, With German precision. I've watched lots of other videos that skip some parts so you end up without a worker server.
    A second part might add a spam filter ? Just an idea ...

  • @markanthonypadin608
    @markanthonypadin608 หลายเดือนก่อน

    I am stuck at "Reverse DNS", I want to know where to find this Hoster?

  • @NotSound.
    @NotSound. 7 หลายเดือนก่อน

    Hi, when i setup the server, i keep getting "mydomain"/debug. Any idea why?

  • @YeloPartyHat
    @YeloPartyHat 3 หลายเดือนก่อน +1

    The command that is unfortunately not in the description: sudo ufw allow 22,25,80,110,143,443,465,587,993,995,4190/tcp

  • @kamaljoshi9644
    @kamaljoshi9644 ปีที่แล้ว

    what is sending limit of this in inbox on receipient side ? can i send 100k inbox a day?

  • @ErikDuits-jy4ms
    @ErikDuits-jy4ms ปีที่แล้ว

    Thanks for this video! Maybe a stupid question. If i need to restart the server, should i first close Docker / Mailcow? or can i just sudo reboot?

  • @veroxsity2336
    @veroxsity2336 4 หลายเดือนก่อน

    Is this possible to do on a preinstalled version of debian?

  • @gustavomejia9184
    @gustavomejia9184 ปีที่แล้ว

    Can I use my websites domain or would I have to buy another one for this?

  • @VishalSharma-ri8mo
    @VishalSharma-ri8mo 3 หลายเดือนก่อน

    Can i setup it with kubernetes and ingress?

  • @laggggggggg3
    @laggggggggg3 หลายเดือนก่อน

    Do you need port 25 unblocked? or can I assign another port for this to work? I cant get in or out bound emails. I also was not able to do the RDNS

    • @felitendo
      @felitendo 22 วันที่ผ่านมา

      You can assign another Port like 26

  • @JuanFernandoGallegoGomez
    @JuanFernandoGallegoGomez 7 หลายเดือนก่อน +2

    The hardest part is migrating from a previous mail system preserving all previous data for all accounts, specially if it is a lot.

    • @connor7439
      @connor7439 6 หลายเดือนก่อน +1

      Not really. IMAP sync.

    • @nilpo
      @nilpo 5 หลายเดือนก่อน

      ​@@connor7439yep. This.

  • @notDacian
    @notDacian ปีที่แล้ว +2

    I run mailinabox for years now, and i never had problems!

    • @notDacian
      @notDacian ปีที่แล้ว

      Also it requires much less resources

    • @kennethlau8108
      @kennethlau8108 ปีที่แล้ว

      @@notDacian what server provider are u using. As alot of service providers ban the mail ports

    • @notDacian
      @notDacian ปีที่แล้ว +1

      @@kennethlau8108 In the beginning i used AWS Lightsail, but now i moved my box to Hertzner, they have better deals and overall i feel the performance is better. For Hertzner you have to wait 1 month for your account to be able to open port 25.

    • @MichaelSharpTechniSmart
      @MichaelSharpTechniSmart ปีที่แล้ว

      @@kennethlau8108 You can see he is using Hetzner, but you have to aopply after 3 months to unblock port 25.

    • @chimastudios
      @chimastudios ปีที่แล้ว

      @@notDacian if I can use AWS Lightsail I'm good then

  • @ksamaschke
    @ksamaschke 2 ปีที่แล้ว +3

    Wow, awesome video!

  • @mohammadhosseingholizadeh
    @mohammadhosseingholizadeh 5 หลายเดือนก่อน

    Thank you so much. It was really really helpful for me.

  • @erbmur
    @erbmur ปีที่แล้ว +1

    This is incredible! I am now able to send emails through my own domain, but I don't seem to be able to recieve anything. Any pointers as to what I might be doing wrong or missing?

    • @zk321
      @zk321 6 หลายเดือนก่อน

      inapparopiate picture

    • @erbmur
      @erbmur 6 หลายเดือนก่อน

      grow up@@zk321

  • @michaelcooper5490
    @michaelcooper5490 2 หลายเดือนก่อน

    May I ask how get around the residential block the ISP has on port 25 and 110?

    • @HiltonT69
      @HiltonT69 หลายเดือนก่อน

      Check with your ISP. Or use something like Cloudflare Tunnels.

  • @smalltimer4370
    @smalltimer4370 5 หลายเดือนก่อน

    Would love a tutorial on how to use and configure wildcard SSL on mailcow and mail domains

  • @reneb.248
    @reneb.248 29 วันที่ผ่านมา

    Why do you use a VM instead of a Debian CT?

  • @yourlinuxguy
    @yourlinuxguy 8 หลายเดือนก่อน

    Why didn't you used port 587? Like these ports are supposed to used for SMPT delivery rather than port 25 which is SMPT relay and is blocked by most ISP and Cloud Providers.

  • @SerkanKoyuncu
    @SerkanKoyuncu ปีที่แล้ว

    Very good video! Thanks.

  • @goranzajec8486
    @goranzajec8486 ปีที่แล้ว

    Fantastic guide, thanks!

  • @wrzq
    @wrzq ปีที่แล้ว

    Hey Karsten, thank you for this awesome tutorial. Can I install MailCow on Ubuntu Server instead?

    • @CRK1918
      @CRK1918 ปีที่แล้ว

      Yes, you can. It's almost the same way.

  • @VishalSharma-ri8mo
    @VishalSharma-ri8mo 3 หลายเดือนก่อน

    Great tutorial sir, can you please explain how can I setup this email server with Kubernetes

  • @globalupdateofalltime2316
    @globalupdateofalltime2316 11 หลายเดือนก่อน

    How many mass emails can you send with it?

  • @bernadetterosenkreutz7805
    @bernadetterosenkreutz7805 ปีที่แล้ว +1

    This is a good video sir. I was able to learn a lot.
    However, my use case is that I already have LAMP running before I use mailcow.
    I understand mailcow installs its own webserver and database server.
    Will it result to conflicts with my existing LAMP?
    Thanks much!

    • @CRK1918
      @CRK1918 ปีที่แล้ว

      I recommend that you install email servers that are separate on a machine, because you don't want to have ports 80/443 as the same in web server, The official does not support it, but I think it is definitely possible to use Nginx. This will make your update more troublesome.

  • @MattDeezly
    @MattDeezly 2 หลายเดือนก่อน

    It takes about ~5 seconds for an email to send... is this normal? did I configure something wrong or is there something I can fix?
    I gave it 5 cores and 12GB of ram...

    • @felitendo
      @felitendo 22 วันที่ผ่านมา

      It's normal

  • @fredrik354
    @fredrik354 4 หลายเดือนก่อน

    Great tutorial, thank you!

  • @ViniDav
    @ViniDav ปีที่แล้ว

    Thank you! Great tutorial!!!

  • @TranTuan-lt8pv
    @TranTuan-lt8pv หลายเดือนก่อน

    Can we config for many mail domain