Ditto this. I pay for a VPS because I don't want my home facing the internet. If the VPS gets hacked, that is as far as they get. 

You could do a mail server on a $5 Digital Ocean or Linode VPS if you don't run SpamAssassin. Rather than have your email server on a 10 year old laptop, you let someone else maintain the hardware. You can and should image your VPS or pay for imaging. I do both. 

My pipe to the outside world is around 800mbps. I couldn't do that at home. I don't have to worry about leaving a computer running while on vacation. 

Should the OP want to join the real world, here again in the guide I use. I like this person's approach because you can test each step. The maintenance is gui free. From start to finish figure on three hours. That includes setting up the VPS, spf, and DKIM. I strongly encourage Centos. I don't use it at home, but it is great for a server. It is a long term disty. 

I should point out for ease of maintenance, use packaged software. You don't want to be compiling code for updates. 

Stick with IPV4. 

====
I have used this person's blog for a few operating systems.
https://blog.andreev.it/?p=1975
Poke around for the correct OS. I only set up dovecot and postfix. Keep it simple. 

You then need opendkim. I think opendkim checks the incoming mail. There is another procedure to sign your mail.
When you think it works, use
https://dkimvalidator.com/

Also go to mxtools to verify you haven't created an open relay.

Regarding LetsEncrypt, I use the bash script.
https://github.com/acmesh-official/acme.sh
This saves you Python headaches.


From: gregs@sloop.net
Sent: October 26, 2020 6:01 PM
To: dovecot@dovecot.org
Reply-to: gregs@sloop.net; dovecot@dovecot.org
Subject: Re: Looking for a guide to collect all e-mail from the ISP mail server

The reason there's no pretty complete how-to is because what you're doing seems completely insane to the vast majority of people who'd look at your problem and select your way of approaching solving it.

Yeah, you can also host your own website off of a DSL line, using a rasp-pi connected via a ham data relay which is faxing pages back and forth over a couple of soup-cans and string - etc, etc, etc.

While I get, at least in principle, why you want to do it your way - you've selected a particularly painful, and super time-expensive way, IMO.

A VPS for like $10 a month would do everything you want to do. Run Ubuntu on it, and allow Ubuntu to do security updates and restarts and you'll almost certainly be fine. If you want, get a fully managed VPS for a little more, and they'll do all that for you.

Or, one of a hundred other ways to accomplish handling mail - but you've picked one of the oddest, most difficult ways...and then "complain" that there's no examples. Yeah, 'cause no-one wants to do it your way because it's crazy.

Sorry dude - I kinda get it, but no, I'd never pick your way of doing it, and I'm not surprised that there's almost no one who has cranked a complete example of it either.

Not trying to make fun of you, but dang, the time wasted in this thread could probably have paid for 5 years of hosted mailcow.

Cheers!
Do have fun.

-Greg


>> 2. install and configure OfflineIMAP to synchronize the IMAP folders between your ISP IMAP server and your Dovecot server; see for example
>> http://www.offlineimap.org/doc/quick_start.html

RD> OfflineIMAP is not the way to go. Many ISPs have very low size
RD> limits for the mailbox sizes. The one I am looking at right now does have this problem
RD> (unless you pay extra).

RD>  From what I have gathered now, your hints about Postfix and
RD> fetchmail are correct. The trouble is that those doc pages are not real-life, complete
RD> examples with Dovecot of the two possible ways: 1)
RD> multidrop/catch all, and 2) one mailbox per user.

RD> Yes, I should be able to piece it all together. I will probably
RD> try. I just find it surprising that there is no such a complete guide yet. Because I
RD> am sure that there are a few gotchas along the way.


 >> see
 >> https://blog.sys4.de/abholdienst-fur-mail-de.html

RD> Yes, getmail is an alternative, and that looks like a good way
RD> too. But it's the same problem: the article is not complete. It states "how you could
RD> arrange it". It would be nice that you did not have to manually
RD> write a getmail config file per user. And an example for multidrop is missing. There
RD> is a note at the end that you should carefully plan the transport
RD> ways, but I wouldn't know yet what to do in that respect.

RD> It's just not a guide that I can follow from top to bottom to get
RD> a first working mail server to play with. That makes it pretty hard for me at this
RD> time. I will need much more time to learn and test every little
RD> detail myself. I'm not promising anything, but I may actually invest the time if I
RD> don't find anything else more interesting in the meantime. 8-)


RD> In any case, thanks for the hints. I know now what the way to go
RD> is. Those pesky port 25 people are not going to get me! ;-)

RD> Regards,
RD>    rdiez