Email reception problem

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.4
Virtualmin version Version 7.10.0

I have a problem with receiving emails, I can send them without problems even to external domains but I can’t receive them even using the same domain. I asked the AI ​​and searched for solutions online for hours, without getting any results. The mail logs are unclear and GMAIL doesn’t send me any error messages. Can you help me? Thank you in advance. All servers are working and DNS records seem ok. I also did the Reverse DNS Management configuration by modifying the Contabo server on my main domain.

You need to look at the mail log or the journal for the postfix unit.

Reverse DNS only impacts you sending mail to other servers. No one does a PTR lookup of your IP when sending mail to you.

Does your provider block port 25 by default? Seems to be pretty common, even with commercial VPS providers. They may, or may not, open it for you. On some providers they have a client firewall that lets you control things ‘off box’. I’ve never used Contabo, but you might want to check if they are letting port 25 requests in.

Yes, but before the change I received an error from GMAIL confirming that the SPF records had to exist for the domain. To be safe, I also created an AAAA record with an IPV6 address. (They recommended it to me) Now I don’t receive any errors from GMAIL but I can’t view the emails. (Roundcube + WEBMIN)

Apr 13 17:35:42 owneruser postfix/smtpd[39324]: connect from mail-ed1-x52d.google.com[2a00:1450:4864:20::52d]
Apr 13 17:35:42 owneruser postgrey[1107]: action=pass, reason=client whitelist, client_name=mail-ed1-x52d.google.com, client_address=2A00:1450:4864:20:0:0:0:52D/128, sender=owneruser@gmail.com, recipient=admin@domain
Apr 13 17:35:42 owneruser postfix/smtpd[39324]: 637878C4EC: client=mail-ed1-x52d.google.com[2a00:1450:4864:20::52d]
Apr 13 17:35:42 owneruser postfix/cleanup[39328]: 637878C4EC: message-id=<CAAR4ciM4NTBp6FpERYDb1hgUy_+8ebA5+L00Og-_01q0s+Z-pg@mail.gmail.com>
Apr 13 17:35:42 owneruser opendkim[28517]: 637878C4EC: DKIM verification successful
Apr 13 17:35:42 owneruser opendkim[28517]: 637878C4EC: s=20230601 d=gmail.com a=rsa-sha256 SSL 
Apr 13 17:35:42 owneruser postfix/qmgr[28801]: 637878C4EC: from=<owneruser@gmail.com>, size=2891, nrcpt=1 (queue active)
Apr 13 17:35:42 owneruser postfix/smtpd[39324]: disconnect from mail-ed1-x52d.google.com[2a00:1450:4864:20::52d] ehlo=2 starttls=1 mail=1 rcpt=1 bdat=1 quit=1 commands=7
Apr 13 17:35:42 owneruser postfix/smtp[39329]: 637878C4EC: to=<owneruser@gmail.com>, orig_to=<admin@domain>, relay=gmail-smtp-in.l.google.com[2a00:1450:4025:401::1a]:25, delay=0.51, delays=0.09/0/0.14/0.27, dsn=2.0.0, status=sent (250 2.0.0 OK  1713022542 dk11-20020a170906f0cb00b00a51f7d93e93si2711123ejb.968 - gsmtp)
Apr 13 17:35:42 owneruser postfix/qmgr[28801]: 637878C4EC: removed

I noticed that admin@domain emails are being sent to my owneruser@gmail.com address with some delay. Emails sent from my gmail address (owneruser@gmail.com) are not sent to me, only those from the same server or from providers other than GMAIL arrive. Maybe I also need to do a test with a different gmail accounts for which there is no forwarding mail function.
The strange thing is that I can’t view the emails in my inbox and I don’t receive any errors.

Hi, I use Contabo and they don’t block port 25 by default. I also wanted to tell you that port 25 is often blocked only when you have to send messages to external servers, with AWS you don’t have any problems with receiving emails but a relay is required for sending.

Apr 13 17:35:42 owneruser postfix/smtp[39329]: 637878C4EC: to=<owneruser@gmail.com>, orig_to=<admin@domain>, relay=gmail-smtp-in.l.google.com[2a00:1450:4025:401::1a]:25, delay=0.51, delays=0.09/0/0.14/0.27, dsn=2.0.0, status=sent (250 2.0.0 OK  1713022542 dk11-20020a170906f0cb00b00a51f7d93e93si2711123ejb.968 - gsmtp)

That’s relaying back to GMail.

Obviously relaying through GMail is not the default behavior, so you’ve changed something somewhere.

Do your MX records for this domain point to GMail servers?

So, DNS records are not a problem, it’s as if the email went directly to my gmail address via the forwarding function. The relay to Gmail is there for that reason, rightly it wouldn’t make sense for the server to send the forward to the same email that sent the message. Can you tell me a solution to view emails in the client and disable the forwarding function? From the settings everything seems ok and even if this function was active, shouldn’t the emails appear in the webmin client? I hope you can help me resolve this problem and I thank you again for this free service that you have made available.

After a day of testing and applying complex configurations I noticed that changing a simple option was enough to solve this problem. First of all, it was confusing that only a forwarding function could deactivate reception in the webmin interface despite the size of the emails being indicated. (possible bug) On Virtualmin there are several ways to activate email forwarding, the main one is certainly in the users interface (everything was ok) In the aliases section, strangely, forwarding was activated for all email addresses, I don’t know why it was activated but it took me a day to solve the problem. I still thank the people who participated in the thread and I hope this can be of help in the future if anyone finds themselves in this situation :slight_smile:

1 Like

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