Problem with mail receiving

I have a problem with setting up email receiving on various servers and setups.
Ports are open. MX is setuped. Spam filtering disabled, dkim sign check disabled
On vhost’s user page, it seems that it receives the sent emails and shows the time that received one (and it’s true, as i sent the test emails), but nothing appears on the user’s inbox (checked usermin, roundcube and Maildir folder).
Senting emails works.

The senter receives this error after some hour

Reporting-MTA: dns; mx.zohomail.eu Arrival-Date: Wed, 14 Feb 2024 00:11:37 +0200 Original-Recipient: rfc822; info@****.com Final-Recipient: rfc822; info@****.com Status: 421 Action: failed Last-Attempt-Date: 13 Feb 2024 22:57:03 GMT Diagnostic-Code: Host not reachable. Remote-MTA: dns; mail.****.com

SYSTEM INFORMATION
OS type and version Debian 11+12, Rocky/Alma 8+9
Webmin version Latest stable
Virtualmin version Latest stable

That your issue, probably port is blocks by a firewall, maybe your providers.

Mxtoolbox has a tool to check, add your domain in there.

As i am writing on first post, MX records is properly configured, and firewall has open ports for email.
Moreover, Hetzner is not blocking us any port, we have contacted them already


By default virtualmin will receive/send emails (with firewall set as open), did you run the mxtools to “test email server” as in my screenshot!!
DMARC policy has nothing to do with receiving emails.

A easy test is to ping mail.****.com are you getting the correct IP response.

1 Like

Yes i can ping to mail.domain.com properly.
MXtoolbox test mail server says: Unable to Connect to SMTP Host Add smtp monitor for mail.***.com
I can’t understand what smtp has to do with receiving. May i miss something here.

Also, on my first post i am saying that postfix receives mails for the user, as it is shown on the screenshot, but doesn’t deliver them to user’s maildir

Simple Mail Transfer Protocol, its transfer mail. MTA’s like postfix use it to transfer mail from one server to another.
If you can’t do a SMTP connection you cant recieve mail.

Alright. What do i have to do to fix it? SMTP ports are also open on server. And i am able to send emails

Its not normal, hard to know. Maybe a bad install but that not normal.
You say use tried on Debian 11 and 12, Rocky/Alma 8 and 9 with same issue.
I’d have to blame your provider as I’ve install dozens of time on Vultr with no issues.

Outgoing is a different issue, unless you have been using them for some time they block outgoing.
https://docs.hetzner.com/cloud/servers/faq/

1 Like

Yeah i know it’s not normal… How could i confirm that hetzner is blocking or not the smtp traffic, except from reasking them by ticket? My problem is the port 25?

Won’t harm, if they not blocking they can point out what might be wrong.
They should have alot more knowledge of they network then you and me.

Hetzner says it’s configuration problem

PORT STATE SERVICE
25/tcp closed smtp
587/tcp closed submission

but i have followed the default configuration of virtualmin always, and postfix service is running according to systemd

What are the saying its your configuration? Not sure what they mean by Port State Service closed as you posted Service smtp is open in firewallD.

Use this to see if it open

All ports are open in portchecker

It seems it’s a problem in virtualmin, or something i am missing regarding virtualmin email configuration

I’m sure if there is something wrong with Virtualmin alot more people wound be complaining :slight_smile:
As long as you did a standard install as per doc it should all work, no extra config is needed except for creating your virtual servers
https://www.virtualmin.com/download/
use this command

Virtualmin is not a mail server. Obviously the problem is not in Virtualmin.

Virtualmin, in a default install, sets up Postfix as the MTA and opens the necessary ports in the default firewall it sets up.

@stefan1959 yeah right, but i have started feeling stupid as i have installed virtualmin dozens times in many different servers and never managed to get email (but actually i had never researched the reason, as i always was using zoho for mails).

root@srv:~# lsof -i:25
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
master 750533 root 13u IPv4 8294170 0t0 TCP *:smtp (LISTEN)
master 750533 root 14u IPv6 8294171 0t0 TCP *:smtp (LISTEN)

@Joe Sure, i don’t mean Virtualmin is a mail server, but that probably the setup it does on postfix.
But i cannot find anything, and i am not an expert on email servers.

What i see is that virtualmin on User list, in Email settings, shows the time that user received the last email correctly, but the email is not in the Maildir directory. What service is responsible for this?

None of that matters as long as an outside mail server cannot connect to port 25 on your server. You’re wasting time looking at anything other than why that is.

Procmail is responsible for mail delivery in a default Virtualmin configuration.

But, Procmail cannot matter as long as mail servers on the internet cannot connect to your server on port 25.

I have fixed the ports by Hetzner, but on one server still same problem as above. Port 25 is open and accessible from outside.

Status Warning SMTP Banner Check Reverse DNS does not match SMTP Banner Information More Info
Status Ok SMTP Reverse DNS Mismatch OK - host_ip resolves to static.***.clients.your-server.de
Status Ok SMTP Valid Hostname OK - Reverse DNS is a valid Hostname
Status Ok SMTP TLS OK - Supports TLS.
Status Ok SMTP Connection Time 0.349 seconds - Good on Connection time
Status Ok SMTP Open Relay OK - Not an open relay.
Status Ok SMTP Transaction Time 1.129 seconds - Good on Transaction Time

Connecting to host_ip

220 srv.host.gr ESMTP Postfix (Debian/GNU) [219 ms]
EHLO keeper-us-east-1d.mxtoolbox.com
250-srv.host.gr
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250 CHUNKING [232 ms]
MAIL FROM:supertool@mxtoolboxsmtpdiag.com
250 2.1.0 Ok [237 ms]
RCPT TO:test@mxtoolboxsmtpdiag.com
454 4.7.1 test@mxtoolboxsmtpdiag.com: Relay access denied [217 ms]

LookupServer 2045ms

On other server, i can receive mails from the same server (ex. sending mail to myself) but not from outside.

Well, i ll sum up the problems again next days, with details per server, as the two i m working on right now, have different problem as mentioned