Posts: 2
Joined: Sun May 24, 2020 12:51 am

Help! RPi4 can't do mail servers?

Sun May 24, 2020 1:23 am

I've tried two guides now and none has worked for me. They all seem to be out of date or simply just not compatible with RPi4.

These are the guides I've tried:

I really want to run my own mail server and i have a static IP so the problem shouldn't be there.
Though, I'm very new to all this so I might have made a mistake.

At first, I tried the citadel guide, but it didn't work at all. There was no errors during installation and configuration, it just refuses to work and gives no answers to why. I've read here on the forums and elsewhere that the guide doesn't work and citadel is outdated and not recommended anyway.

Samhobbs guide is even older, but has been updated to at least 2017 with corrections here and there. The first part of the guide, with postfix, works fine. I can send mail with telnet and through forms on my wordpress! However, during the configuration of dovecot, I get a completely different message from openssl.

the problem starts when i run this command:

Code: Select all

openssl s_client -connect localhost:465 -quiet
I get this text:

Code: Select all

Can't use SSL_get_servername
depth=0 CN = raspberrypi
verify error:num=18:self signed certificate
verify return:1
depth=0 CN = raspberrypi
verify return:1
220 ESMTP Postfix (Raspbian)
I asked at Riot about the line "Can't use SSL_get_servername" and they assured me it's because I am trying to connect through localhost. It is however not specified in the guide provided by samhobbs.

In the next step, squirrelmail is no longer available, and i can't find a way to install it anymore anywhere. Instead, in the comments, there is a very recent one where someone mentions Mailpile as a good alternative. I setup Mailpile without any hitch, but when I try to send mails with it, i get an STMP error.

Code: Select all

Failed to connect to 
So, I don't know what happened. the IP is directed to and shouldn't be a problem. dovecot part of the guide that is giving me the SSL_get_servername is responsible for imap and pop3? so not related to the smtp issue. I don't know where the problem is and everything is running fine when i try systemctl.

Are there any for-sure guides updated and recent for raspberry pi 4 B 4gb? or installation scripts that will set everything up for me? it's not as important for me to learn the steps as it is for me to just get the mail server running at this point. I can experiment with the configuration later, but my main priority for now is a functional mail server for my domain.

I also saw this guide: ... ail-server

I haven't gotten anywhere in it because right from the bat, when I tried to do this:

Code: Select all

nmap -p 0-65535 > /tmp/nmaptest
It just...nothing happens. I'm still waiting for it to finish? It's been an hour now. I tried to use "grep filtered /tmp/nmaptest" in a separate putty window, but nothing happens.

I don't think my ISP is blocking port 25 though, since I can send mail just fine with telnet on port 25 (as with samhobbs guide); and it seems unrelated to my issue with smtp?

Ignoring the first part of the third guide I linked which isn't working, would that guide be better than the other two for my RPi4B?

I know it's a lot to ask, but I'm grateful for any help!

Posts: 1
Joined: Sat Jun 06, 2020 11:44 am

Re: Help! RPi4 can't do mail servers?

Sat Jun 06, 2020 11:46 am


I am also following samhobbs guide and had the same issue. Did you end up solving it? Maybe you could post what the issue was for others. :D


Return to “Networking and servers”