smtp fails to connect

Discussion in 'Installation/Configuration' started by paka, Apr 1, 2025.

  1. paka

    paka Member

    Unfortunately I've was put in a position to move to a different VPS provided do to complete loss of connectivity outside of the VPS. Only a VNC could connect for trouble shooting.

    This is on a fresh VPS using Perfect Server Automated ISPConfig 3 Installation on Debian 11 and Debian 12, Ubuntu 22.04 and Ubuntu 24.04. I've used the automated install several months ago on a different box and it was perfect.

    ISPConfig 3.2.12p1
    Debian 12 (all updates)
    Reverse DNS is properly configured by the provided and verified.
    Have run which seems to correct most issues. No change noted after running:
    Code:
    ispconfig_update.sh --force
    The report generated is at the end of this post.

    Mail will send/receive to emails on the same VPS.
    It does not receive emails from other domains. It does appear to receive from other domains but the quantity of inbound emails seems lower than usual.

    mxtoolbox.com/SuperTool.aspx reports the following their 'test email server' tool. It returns:
    Code:
    Test: SMTP Connect  Result: Failed To Connect
    
    Connecting to 217.170.194.186
    4/1/2025 11:27:35 AM Connection attempt #1 - Unable to connect after 15 seconds. [15.04 sec]
    
    LookupServer 15134ms
    Host command run from my office machine:
    Code:
    mark@marzdesktop:~$ host writeworks.uk
    writeworks.uk has address 217.170.194.186
    writeworks.uk mail is handled by 10 mail.writeworks.uk.
    writeworks.uk mail is handled by 10 smtp.writeworks.uk.
    writeworks.uk mail is handled by 10 imap.writeworks.uk
    Excerpt from mail.log with section covering 61A0A40D03
    Code:
    root@mail:/usr/lib/systemd/system# tail -f /var/log/mail.log
    2025-04-01T15:11:44.222389+01:00 mail dovecot: lmtp([email protected])<10330><YJy/DCD062daKAAAheFSng>: sieve: msgid=<[email protected]>: stored mail into mailbox 'INBOX'
    2025-04-01T15:11:44.222977+01:00 mail postfix/lmtp[10329]: DB07040C9F: to=<[email protected]>, relay=mail.writeworks.uk[private/dovecot-lmtp], delay=0.4, delays=0.39/0.01/0/0.01, dsn=2.0.0, status=sent (250 2.0.0 <[email protected]> YJy/DCD062daKAAAheFSng Saved)
    2025-04-01T15:11:44.223442+01:00 mail dovecot: lmtp(10330): Disconnect from local: Logged out (state=READY)
    2025-04-01T15:11:44.238077+01:00 mail postfix/smtp[10355]: connect to mail.ecloud.global[2a01:4f9:c01f:1f98::1]:25: Network is unreachable
    2025-04-01T15:11:49.270640+01:00 mail postfix/submission/smtpd[10349]: disconnect from unknown[85.255.234.116] ehlo=2 starttls=1 auth=1 mail=1 rcpt=3 data=1 quit=1 commands=10
    2025-04-01T15:11:53.246847+01:00 mail postfix/qmgr[1370]: 62FD140C9D: from=<[email protected]>, size=4364, nrcpt=2 (queue active)
    2025-04-01T15:11:53.251318+01:00 mail postfix/qmgr[1370]: F120440CDD: from=<[email protected]>, size=4369, nrcpt=1 (queue active)
    2025-04-01T15:12:14.268147+01:00 mail postfix/smtp[10355]: connect to mail.ecloud.global[95.217.246.96]:25: Connection timed out
    2025-04-01T15:12:14.284134+01:00 mail postfix/smtp[10354]: connect to disroot.org[178.21.23.139]:25: Connection timed out
    2025-04-01T15:12:14.290733+01:00 mail postfix/smtp[10354]: DB07040C9F: to=<[email protected]>, relay=none, delay=30, delays=0.39/0.02/30/0, dsn=4.4.1, status=deferred (connect to disroot.org[178.21.23.139]:25: Connection timed out)
    2025-04-01T15:12:23.292346+01:00 mail postfix/smtp[10356]: connect to disroot.org[178.21.23.139]:25: Connection timed out
    2025-04-01T15:12:23.293774+01:00 mail postfix/smtp[10356]: 62FD140C9D: to=<[email protected]>, relay=none, delay=585, delays=555/0.02/30/0, dsn=4.4.1, status=deferred (connect to disroot.org[178.21.23.139]:25: Connection timed out)
    2025-04-01T15:12:23.312220+01:00 mail postfix/smtp[10357]: connect to 31045262.in1.mandrillapp.com[100.20.51.185]:25: Connection timed out
    2025-04-01T15:12:44.296204+01:00 mail postfix/smtp[10355]: connect to mail.ecloud.global[95.217.246.96]:25: Connection timed out
    2025-04-01T15:12:44.296313+01:00 mail postfix/smtp[10355]: connect to mail.ecloud.global[2a01:4f9:c01f:1f98::1]:25: Network is unreachable
    2025-04-01T15:12:44.297678+01:00 mail postfix/smtp[10355]: DB07040C9F: to=<[email protected]>, relay=none, delay=60, delays=0.39/0.03/60/0, dsn=4.4.1, status=deferred (connect to mail.ecloud.global[2a01:4f9:c01f:1f98::1]:25: Network is unreachable)
    2025-04-01T15:12:53.336230+01:00 mail postfix/smtp[10357]: connect to 31045262.in1.mandrillapp.com[44.239.226.101]:25: Connection timed out
    Suggested report on server status:
    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Debian GNU/Linux 12 (bookworm)
     
    [INFO] uptime:  17:56:31 up  4:24,  1 user,  load average: 0.00, 0.00, 0.00
     
    [INFO] memory:
                   total        used        free      shared  buff/cache   available
    Mem:           3.8Gi       2.7Gi       221Mi       131Mi       1.3Gi       1.2Gi
    Swap:             0B          0B          0B
     
    [INFO] systemd failed services status:
      UNIT             LOAD   ACTIVE SUB    DESCRIPTION
    ● rc-local.service loaded failed failed /etc/rc.local Compatibility
    
    LOAD   = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB    = The low-level unit activation state, values depend on unit type.
    1 loaded units listed.
    
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.12p1
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 8.2.28
    [INFO] php-cgi (used for cgi php in default vhost!) is version 8.2.28
    
    ##### PORT CHECK #####
    
    
    ##### MAIL SERVER CHECK #####
    
    [WARN] I found no "smtps" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer SSL for smtp (not TLS) connections you have to enable this.
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
        Apache 2 (PID 866)
    [INFO] I found the following mail server(s):
        Postfix (PID 1368)
    [INFO] I found the following pop3 server(s):
        Dovecot (PID 597)
    [INFO] I found the following imap server(s):
        Dovecot (PID 597)
    [INFO] I found the following ftp server(s):
        PureFTP (PID 1081)
    
    ##### LISTENING PORTS #####
    (only        ()
    Local        (Address)
    [anywhere]:995        (597/dovecot)
    [anywhere]:993        (597/dovecot)
    [localhost]:6060        (1619/crowdsec)
    [anywhere]:587        (1368/master)
    ***.***.***.***:53        (602/named)
    ***.***.***.***:53        (602/named)
    [localhost]:10023        (617/postgrey)
    [localhost]:11332        (659/rspamd:)
    [localhost]:11333        (659/rspamd:)
    [localhost]:11334        (659/rspamd:)
    [anywhere]:465        (1368/master)
    [anywhere]:25        (1368/master)
    [anywhere]:22        (638/sshd:)
    [anywhere]:21        (1081/pure-ftpd)
    [anywhere]:110        (597/dovecot)
    [anywhere]:4190        (597/dovecot)
    [anywhere]:143        (597/dovecot)
    [localhost]:9090        (1619/crowdsec)
    [localhost]:953        (602/named)
    [localhost]:953        (602/named)
    [localhost]:11211        (601/memcached)
    [localhost]:6379        (621/redis-server)
    [localhost]:53        (602/named)
    [localhost]:53        (602/named)
    [anywhere]:3306        (835/mariadbd)
    *:*:*:*::*:995        (597/dovecot)
    *:*:*:*::*:993        (597/dovecot)
    *:*:*:*::*:587        (1368/master)
    *:*:*:*::*:11333        (659/rspamd:)
    *:*:*:*::*:11332        (659/rspamd:)
    *:*:*:*::*:11334        (659/rspamd:)
    *:*:*:*::*:443        (866/apache2)
    *:*:*:*::*:10023        (617/postgrey)
    *:*:*:*::*:465        (1368/master)
    *:*:*:*::*:25        (1368/master)
    *:*:*:*::*:22        (638/sshd:)
    *:*:*:*::*:21        (1081/pure-ftpd)
    [localhost]10        (597/dovecot)
    *:*:*:*::*:4190        (597/dovecot)
    *:*:*:*::*:80        (866/apache2)
    [localhost]43        (597/dovecot)
    *:*:*:*::*:8080        (866/apache2)
    *:*:*:*::*:8081        (866/apache2)
    *:*:*:*::*:6379        (621/redis-server)
    *:*:*:*::*:53        (602/named)
    *:*:*:*::*:53        (602/named)
    *:*:*:*::*:953        (602/named)
    *:*:*:*::*:953        (602/named)
    *:*:*:*::**:*:*:*::*53        (602/named)
    *:*:*:*::**:*:*:*::*53        (602/named)
    *:*:*:*::*:3306        (835/mariadbd)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy DROP)
    target     prot opt source               destination         
    CROWDSEC_CHAIN  0    --  [anywhere]/0            [anywhere]/0           
    ufw-before-logging-input  0    --  [anywhere]/0            [anywhere]/0           
    ufw-before-input  0    --  [anywhere]/0            [anywhere]/0           
    ufw-after-input  0    --  [anywhere]/0            [anywhere]/0           
    ufw-after-logging-input  0    --  [anywhere]/0            [anywhere]/0           
    ufw-reject-input  0    --  [anywhere]/0            [anywhere]/0           
    ufw-track-input  0    --  [anywhere]/0            [anywhere]/0           
    
    Chain FORWARD (policy DROP)
    target     prot opt source               destination         
    ufw-before-logging-forward  0    --  [anywhere]/0            [anywhere]/0           
    ufw-before-forward  0    --  [anywhere]/0            [anywhere]/0           
    ufw-after-forward  0    --  [anywhere]/0            [anywhere]/0           
    ufw-after-logging-forward  0    --  [anywhere]/0            [anywhere]/0           
    ufw-reject-forward  0    --  [anywhere]/0            [anywhere]/0           
    ufw-track-forward  0    --  [anywhere]/0            [anywhere]/0           
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination         
    ufw-before-logging-output  0    --  [anywhere]/0            [anywhere]/0           
    ufw-before-output  0    --  [anywhere]/0            [anywhere]/0           
    ufw-after-output  0    --  [anywhere]/0            [anywhere]/0           
    ufw-after-logging-output  0    --  [anywhere]/0            [anywhere]/0           
    ufw-reject-output  0    --  [anywhere]/0            [anywhere]/0           
    ufw-track-output  0    --  [anywhere]/0            [anywhere]/0           
    
    Chain CROWDSEC_CHAIN (1 references)
    target     prot opt source               destination         
    DROP       0    --  [anywhere]/0            [anywhere]/0            match-set crowdsec-blacklists-4 src
    DROP       0    --  [anywhere]/0            [anywhere]/0            match-set crowdsec-blacklists-3 src
    DROP       0    --  [anywhere]/0            [anywhere]/0            match-set crowdsec-blacklists-2 src
    DROP       0    --  [anywhere]/0            [anywhere]/0            match-set crowdsec-blacklists-1 src
    DROP       0    --  [anywhere]/0            [anywhere]/0            match-set crowdsec-blacklists-0 src
    
    Chain ufw-after-forward (1 references)
    target     prot opt source               destination         
    
    Chain ufw-after-input (1 references)
    target     prot opt source               destination         
    ufw-skip-to-policy-input  17   --  [anywhere]/0            [anywhere]/0            udp dpt:137
    ufw-skip-to-policy-input  17   --  [anywhere]/0            [anywhere]/0            udp dpt:138
    ufw-skip-to-policy-input  6    --  [anywhere]/0            [anywhere]/0            tcp dpt:139
    ufw-skip-to-policy-input  6    --  [anywhere]/0            [anywhere]/0            tcp dpt:445
    ufw-skip-to-policy-input  17   --  [anywhere]/0            [anywhere]/0            udp dpt:67
    ufw-skip-to-policy-input  17   --  [anywhere]/0            [anywhere]/0            udp dpt:68
    ufw-skip-to-policy-input  0    --  [anywhere]/0            [anywhere]/0            ADDRTYPE match dst-type BROADCAST
    
    Chain ufw-after-logging-forward (1 references)
    target     prot opt source               destination         
    LOG        0    --  [anywhere]/0            [anywhere]/0            limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "
    
    Chain ufw-after-logging-input (1 references)
    target     prot opt source               destination         
    LOG        0    --  [anywhere]/0            [anywhere]/0            limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "
    
    Chain ufw-after-logging-output (1 references)
    target     prot opt source               destination         
    
    Chain ufw-after-output (1 references)
    target     prot opt source               destination         
    
    Chain ufw-before-forward (1 references)
    target     prot opt source               destination         
    ACCEPT     0    --  [anywhere]/0            [anywhere]/0            ctstate RELATED,ESTABLISHED
    ACCEPT     1    --  [anywhere]/0            [anywhere]/0            icmptype 3
    ACCEPT     1    --  [anywhere]/0            [anywhere]/0            icmptype 11
    ACCEPT     1    --  [anywhere]/0            [anywhere]/0            icmptype 12
    ACCEPT     1    --  [anywhere]/0            [anywhere]/0            icmptype 8
    ufw-user-forward  0    --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-before-input (1 references)
    target     prot opt source               destination         
    ACCEPT     0    --  [anywhere]/0            [anywhere]/0           
    ACCEPT     0    --  [anywhere]/0            [anywhere]/0            ctstate RELATED,ESTABLISHED
    ufw-logging-deny  0    --  [anywhere]/0            [anywhere]/0            ctstate INVALID
    DROP       0    --  [anywhere]/0            [anywhere]/0            ctstate INVALID
    ACCEPT     1    --  [anywhere]/0            [anywhere]/0            icmptype 3
    ACCEPT     1    --  [anywhere]/0            [anywhere]/0            icmptype 11
    ACCEPT     1    --  [anywhere]/0            [anywhere]/0            icmptype 12
    ACCEPT     1    --  [anywhere]/0            [anywhere]/0            icmptype 8
    ACCEPT     17   --  [anywhere]/0            [anywhere]/0            udp spt:67 dpt:68
    ufw-not-local  0    --  [anywhere]/0            [anywhere]/0           
    ACCEPT     17   --  [anywhere]/0            ***.***.***.***          udp dpt:5353
    ACCEPT     17   --  [anywhere]/0            ***.***.***.***      udp dpt:1900
    ufw-user-input  0    --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-before-logging-forward (1 references)
    target     prot opt source               destination         
    
    Chain ufw-before-logging-input (1 references)
    target     prot opt source               destination         
    
    Chain ufw-before-logging-output (1 references)
    target     prot opt source               destination         
    
    Chain ufw-before-output (1 references)
    target     prot opt source               destination         
    ACCEPT     0    --  [anywhere]/0            [anywhere]/0           
    ACCEPT     0    --  [anywhere]/0            [anywhere]/0            ctstate RELATED,ESTABLISHED
    ufw-user-output  0    --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-logging-allow (0 references)
    target     prot opt source               destination         
    LOG        0    --  [anywhere]/0            [anywhere]/0            limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW ALLOW] "
    
    Chain ufw-logging-deny (2 references)
    target     prot opt source               destination         
    RETURN     0    --  [anywhere]/0            [anywhere]/0            ctstate INVALID limit: avg 3/min burst 10
    LOG        0    --  [anywhere]/0            [anywhere]/0            limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "
    
    Chain ufw-not-local (1 references)
    target     prot opt source               destination         
    RETURN     0    --  [anywhere]/0            [anywhere]/0            ADDRTYPE match dst-type LOCAL
    RETURN     0    --  [anywhere]/0            [anywhere]/0            ADDRTYPE match dst-type MULTICAST
    RETURN     0    --  [anywhere]/0            [anywhere]/0            ADDRTYPE match dst-type BROADCAST
    ufw-logging-deny  0    --  [anywhere]/0            [anywhere]/0            limit: avg 3/min burst 10
    DROP       0    --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-reject-forward (1 references)
    target     prot opt source               destination         
    
    Chain ufw-reject-input (1 references)
    target     prot opt source               destination         
    
    Chain ufw-reject-output (1 references)
    target     prot opt source               destination         
    
    Chain ufw-skip-to-policy-forward (0 references)
    target     prot opt source               destination         
    DROP       0    --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-skip-to-policy-input (7 references)
    target     prot opt source               destination         
    DROP       0    --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-skip-to-policy-output (0 references)
    target     prot opt source               destination         
    ACCEPT     0    --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-track-forward (1 references)
    target     prot opt source               destination         
    
    Chain ufw-track-input (1 references)
    target     prot opt source               destination         
    
    Chain ufw-track-output (1 references)
    target     prot opt source               destination         
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            ctstate NEW
    ACCEPT     17   --  [anywhere]/0            [anywhere]/0            ctstate NEW
    
    Chain ufw-user-forward (1 references)
    target     prot opt source               destination         
    
    Chain ufw-user-input (1 references)
    target     prot opt source               destination         
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:20
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:21
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:22
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:25
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:53
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:80
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:110
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:143
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:443
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:465
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:587
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:993
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:995
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:3306
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:4190
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:8080
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:8081
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            multiport dports 40110:40210
    ACCEPT     17   --  [anywhere]/0            [anywhere]/0            udp dpt:53
    ACCEPT     6    --  [anywhere]/0            [anywhere]/0            tcp dpt:9090
    
    Chain ufw-user-limit (0 references)
    target     prot opt source               destination         
    LOG        0    --  [anywhere]/0            [anywhere]/0            limit: avg 3/min burst 5 LOG flags 0 level 4 prefix "[UFW LIMIT BLOCK] "
    REJECT     0    --  [anywhere]/0            [anywhere]/0            reject-with icmp-port-unreachable
    
    Chain ufw-user-limit-accept (0 references)
    target     prot opt source               destination         
    ACCEPT     0    --  [anywhere]/0            [anywhere]/0           
    
    Chain ufw-user-logging-forward (0 references)
    target     prot opt source               destination         
    
    Chain ufw-user-logging-input (0 references)
    target     prot opt source               destination         
    
    Chain ufw-user-logging-output (0 references)
    target     prot opt source               destination         
    
    Chain ufw-user-output (1 references)
    target     prot opt source               destination         
    
    
    
    
    ##### LET'S ENCRYPT #####
    acme.sh is installed in /root/.acme.sh/acme.sh
    
    Looking for some suggestions of what to have a look at.
     
    Last edited: Apr 1, 2025

Share This Page