IMAP & SMTP - clients connected but no communications with other servers

Operating system: Ubuntu
OS version: 20.04

Hi,
it is the second issue on my way to the happiness with Virtualmin :-).

  1. For outgoing mail it looks like the messages are received by postfix - I can see them in the Mail Queue but the postfix cannot connect to the recipient’s server - I see the connection timeout messages

  2. What about Dovecot - I have no idea where to look - the remote sender “successfully” send the mail without any errors but I cannot see it in my inbox.

Check first of all if your VPS provider has blocked port 25 and it is this which is preventing your system from sending out mail - and if so, see

Use Virtualmin’s webmail on port 20000 to check if the incoming mail has landed in the mailbox.

For both questions you need to check in /var/log/mail.log.
You should have log entries similar to what I have pasted below.

Outgoing:

Jan 14 14:22:16 alpha postfix/smtpd[1378310]: EA5F661222: client=unknown[xxxxxxxxx], sasl_method=PLAIN, sasl_username=xxx@domain.net
Jan 14 14:22:17 alpha postfix/cleanup[1378109]: EA5F661222: message-id=6801544a-2b5b-d4f5-b76d-611f9617f80d@domain.net
Jan 14 14:22:17 alpha postfix/qmgr[2042]: EA5F661222: from=xxx@domain.net, size=740, nrcpt=1 (queue active)
Jan 14 14:22:17 alpha postfix/smtp[1378416]: EA5F661222: to=ping@tools.mxtoolbox.com, relay=smtp.domain.no[xxxxxxxxx]:26, delay=1.1, delays=0.2/0.02/0.79/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as F12F7BFA3A)
Jan 14 14:22:17 alpha postfix/qmgr[2042]: EA5F661222: removed

Incoming:

Jan 14 15:05:29 alpha postfix/smtpd[1265556]: CC62C61217: client=sf3.domain.no[xxxxx]
Jan 14 15:05:29 alpha postfix/cleanup[1490527]: CC62C61217: message-id=0.1.235.6F9.1D6EA7E487DA94A.0@omp.email.incomfingmail.com
Jan 14 15:05:30 alpha postfix/qmgr[2042]: CC62C61217: from=newsletter@email.incomingmail.com, size=18449, nrcpt=1 (queue active)
Jan 14 15:05:30 alpha postfix/local[1490529]: CC62C61217: to=xxx-domain.net@x, orig_to=xxx@domain.net, relay=local, delay=0.85, delays=0.81/0.02/0/0.02, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Jan 14 15:05:30 alpha postfix/qmgr[2042]: CC62C61217: removed

While writing this, I noticed @calport also replied and mentioned checking port 25 like I also was going to say.
An easy way of checking that is trying to telnet port 25 of a known mailserver:

root@sf1:/var/log# telnet alt2.gmail-smtp-in.l.google.com 25
Trying 2404:6800:4008:c00::1a…
Connected to alt2.gmail-smtp-in.l.google.com.
Escape character is ‘^]’.
220 mx.google.com ESMTP bd8si6250279plb.207 - gsmtp
^]

1 Like

Yes. The port is blocked. It is AWS. But does it mean that there is no way to have my own smtp server on AWS instance?

You can take a look here.
Personally don’t use AWS but according to this it should be possible. :slight_smile:

Some more details.
On AWS instances i can open port 25 but only the incoming connections are under my control. It resolved the problem with incoming messages.
The outgoing messages are still under the big question. I will contact AWS about it.

Sounds correct. The link I gave you tells you which form to fill to request opening of outbound also.

Thank you so much. They’ve opened 25 port for me. Bud it needed some magic with dns records also.

1 Like

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