How to setup local email service inside a virtual server with roundcube software

|SYSTEM INFORMATION||
OS type and version: Ubuntu Linux 20.04.3 || Hosted on Digitalocean droplet
Webmin version: 1.981
Virtualmin version: 6.16

Hi
I have several virtual servers / websites located in my virtualmin n i want to create a local webmail service for 1 virtual server within the same server

i did set up roundcube software in a subfolder like domain/webmail
The software is up and the it’s receiving emails but not sending out any

So what i have to configure to send out emails?

Note that when i tried creating a new sub server called mail.domain.com OR webmail.domain.com to setup roundcube software inside it i couldn’t create the sub-server, it responded with this “failed to create virtual server : domain is already hosted by your Apache web server”

Please simplify your answers as I’m totally new to this server setup world

Thank you community

Virtualmin uses mail.domain.tld.and webmail.domain.tld so you should consider these sub-domains reserved on a Virtualmin system and use some other sub-domain, such as rc.domain.tld, for installing Roundcube.

With Roundcube: you need to do nothing to send out e-mail. No configuration is required on your part.

Roundcube works out of the box to send and read email, if the rest of the ecosystem is working normally.

it’s not working
i tired to send out many emails to test n non of them was received by the other end.

and after 5 days of sending these emails out, i got a reply email for each of them looks like this

This is the mail system at host server. domain. net.

I’m sorry to have to inform you that your message could not
be delivered to one or more recipients. It’s attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

               The mail system
: delivery temporarily suspended: connect to alt2 .gmail-smtp-in.l .google.com[2607:f8b0:4023:c0b::1a]:25: Network is unreachable Reporting-MTA: dns; server. domain. net X-Postfix-Queue-ID: DBDE6BF909 X-Postfix-Sender: rfc822; info @domain.com Arrival-Date: Fri, 17 Sep 2021 23:59:56 +0000 (UTC)

Final-Recipient: rfc822; title @gmail.com
Original-Recipient: rfc822;title @gmail.com
Action: failed
Status: 4.4.1
Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to
alt2 .gmail-smtp-in.l .google.com[2607:f8b0:4023:c0b::1a]:25: Network is
unreachable
Return-Path: <info @domain.com>
Received: from domain.com (localhost [127.0.0.1])
by server. domain. net (Postfix) with ESMTPA id DBDE6BF909
for <title @gmail.com>; Fri, 17 Sep 2021 23:59:56 +0000 (UTC)
MIME-Version: 1.0
Date: Sat, 18 Sep 2021 02:59:56 +0300
From: “info @domain.com” <info @domain.com>
To: title @gmail.com
Subject: Testing
User-Agent: Roundcube Webmail/1.4.11
Message-ID: 387bac7e5f5a8660099be0f5eaab177d@domain.com
X-Sender: info @domain.com
Content-Type: text/plain; charset=US-ASCII;
format=flowed
Content-Transfer-Encoding: 7bit

Reporting-MTA: dns; server. domain. net
X-Postfix-Queue-ID: DBDE6BF909
X-Postfix-Sender: rfc822; info @domain.com
Arrival-Date: Fri, 17 Sep 2021 23:59:56 +0000 (UTC)

Final-Recipient: rfc822; title @gmail.com
Original-Recipient: rfc822;title @gmail.com
Action: failed
Status: 4.4.1
Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to
alt2 .gmail-smtp-in.l .google.com[2607:f8b0:4023:c0b::1a]:25: Network is
unreachable

Well, it appears that Roundcube is sending the mail out via Postfix. So the problem is not with Roundcube. Your Roundcube install is working normally.

See Free smarthost / mail relay to work around port 25 block by VPS host

webmail can be changed, it’s just a redirect to Usermin on port 20000, and changing it is harmless if you don’t use Usermin. mail wouldn’t be easy to repurpose, though.

You don’t have port 25, most likely. Many, many, many, network and hosting providers block port 25 to prevent spam. If you don’t have port 25 you don’t have a mail server (you’ll need a relay). You cannot run a mail server without port 25.

Digital Ocean blocks port 25 on all accounts. It always has to the best of my knowledge. They will NOT open it up.

Here’s a thread about that very thing that has an official response from Digital Ocean.

Relative part:
“Hello,

Stopping spam is a constant fight and due to this, your account has restrictions specifically on port 25. However, you are be able to use mail services using ports 587, 993, 995 and 465. You will need to open these ports in your firewall. Here is our guide to common iptables commands:

Even with those ports, you can’t run a mail server without port 25. You’ll still need a relay for outgoing mail. You can control how your clients connect for sending mail, but you can’t control how the rest of the internet wants to be talked to.

So, you still need a relay if you want to be able to send mail without port 25 (relay services like Mailgun, Mailjet, etc. accept mail on those other ports and relay it on your behalf).

I’m just posting the information in the thread that Digital Ocean posted, not arguing a point.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.