1. budgierless

    budgierless Member HowtoForge Supporter

    hi,
    Im not sure why but i noted that all of a sudden two days ago i stopped getting emails from my server.
    I found that this
    Code:
    systemctl list-units --failed
      UNIT                   LOAD   ACTIVE SUB    DESCRIPTION
    ● [email protected]      loaded failed failed Postfix Mail Transport Agent (inst
    
    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.
    I did not change anything myself but maybe a change due to an update or a hack?
    I checked the /var/log/mail.err for the last entry:
    Code:
    Sep 18 19:48:13 server1 dovecot: auth-worker(5322): Error: mysql(localhost): Connect failed to database (dbispconfig): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) - waiting for 1 seconds before retry
    Sep 18 19:48:14 server1 dovecot: auth-worker(5322): Error: mysql(localhost): Connect failed to database (dbispconfig): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) - waiting for 5 seconds before retry
    Sep 18 19:48:19 server1 dovecot: auth-worker(5322): Error: mysql(localhost): Connect failed to database (dbispconfig): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) - waiting for 25 seconds before retry
    
    /var/log/syslog looks ok from what i see, but im not sure about this:
    Code:
    Sep 19 16:32:50 server1 snmpd[2148]: error on subcontainer 'ia_addr' insert (-1)
    please advise
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if mysql/mariadb is not running. start or restart it.
     
  3. budgierless

    budgierless Member HowtoForge Supporter

    No it is running, all websites are working, including searching for contents, its only mail that is not working for some reason?
    postfix.service is working but not [email protected]
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Not sure what [email protected] is as postfix is usually postfix.service and only that service should run.
     
  5. budgierless

    budgierless Member HowtoForge Supporter

    from /lib/systemd/system
    postfix.service
    Code:
    [Unit]
    Description=Postfix Mail Transport Agent
    Conflicts=sendmail.service exim4.service
    ConditionPathExists=/etc/postfix/main.cf
    
    [Service]
    Type=oneshot
    RemainAfterExit=yes
    ExecStart=/bin/true
    ExecReload=/bin/true
    
    [Install]
    WantedBy=multi-user.target
    
    [email protected]
    Code:
    [Unit]
    Description=Postfix Mail Transport Agent (instance %i)
    Documentation=man:postfix(1)
    PartOf=postfix.service
    Before=postfix.service
    ReloadPropagatedFrom=postfix.service
    After=network-online.target nss-lookup.target
    Wants=network-online.target
    
    [Service]
    Type=forking
    GuessMainPID=no
    ExecStartPre=/usr/lib/postfix/configure-instance.sh %i
    ExecStart=/usr/sbin/postmulti -i %i -p start
    ExecStop=/usr/sbin/postmulti -i %i -p stop
    ExecReload=/usr/sbin/postmulti -i %i -p reload
    
    [Install]
    WantedBy=multi-user.target
    
    They last updated 25/02/2022 so nothing new with these files
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

  7. budgierless

    budgierless Member HowtoForge Supporter

    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Ubuntu 18.04.6 LTS
     
    [INFO] uptime:  00:49:46 up 1 day,  8:48,  2 users,  load average: 14.84, 16.68, 17.75
     
    [INFO] memory:
                  total        used        free      shared  buff/cache   available
    Mem:            62G         14G        309M        330M         48G         47G
    Swap:           31G        162M         31G
     
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.8p1
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 7.2.24-0ubuntu***.***.***.***
    [INFO] php-cgi (used for cgi php in default vhost!) is version 7.2.24
    
    ##### PORT CHECK #####
    
    [WARN] Port 22 (SSH server) seems NOT to be listening
    [WARN] Port 22 (SSH server) seems to be BLOCKED in firewall
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
        Apache 2 (PID 3528)
    [INFO] I found the following mail server(s):
        Postfix (PID 4340)
    [INFO] I found the following pop3 server(s):
        Dovecot (PID 3576)
    [INFO] I found the following imap server(s):
        Dovecot (PID 3576)
    [INFO] I found the following ftp server(s):
        PureFTP (PID 5296)
    
    ##### LISTENING PORTS #####
    (only        ()
    Local        (Address)
    [localhost]:631        (2425/cupsd)
    [anywhere]:25        (4340/master)
    [localhost]:953        (2126/named)
    [anywhere]:443        (3528/apache2)
    [anywhere]:2301        (4789/hpsmhd)
    [localhost]:8989        (2082/php-fpm:)
    [anywhere]:222        (3896/sshd)
    [localhost]:8990        (2084/php-fpm:)
    [localhost]:8991        (2066/php-fpm:)
    [localhost]:8992        (2073/php-fpm:)
    [localhost]:8993        (2081/php-fpm:)
    [anywhere]:993        (3576/dovecot)
    [anywhere]:995        (3576/dovecot)
    [localhost]:10023        (4308/postgrey)
    [localhost]:10024        (5082/amavisd-new)
    [localhost]:10025        (4340/master)
    [localhost]:10026        (5082/amavisd-new)
    [localhost]:10027        (4340/master)
    [anywhere]:587        (4340/master)
    [localhost]:11211        (2130/memcached)
    [anywhere]:2381        (4789/hpsmhd)
    [anywhere]:110        (3576/dovecot)
    [anywhere]:143        (3576/dovecot)
    [anywhere]:8080        (3528/apache2)
    [anywhere]:80        (3528/apache2)
    [anywhere]:465        (4340/master)
    [anywhere]:8081        (3528/apache2)
    [localhost]:5939        (4280/teamviewerd)
    ***.***.***.***:53        (2126/named)
    [anywhere]:21        (5296/pure-ftpd)
    ***.***.***.***:53        (2126/named)
    [localhost]:53        (2126/named)
    ***.***.***.***:53        (1197/systemd-resolv)
    *:*:*:*::*:25        (4340/master)
    *:*:*:*::*:222        (3896/sshd)
    *:*:*:*::*:3306        (2457/mysqld)
    *:*:*:*::*:587        (4340/master)
    *:*:*:*::*:465        (4340/master)
    *:*:*:*::*:21        (5296/pure-ftpd)
    *:*:*:*::*:53        (2126/named)
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination       
    DROP       all  --  ***.***.***.***        [anywhere]/0         
    
    Chain BLOCKCC0-I (1 references)
    target     prot opt source               destination       
    RETURN     all  --  [anywhere]/0            [anywhere]/0            state RELATED,ESTABLISHED
    RETURN     tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 25,587,465,53
    RETURN     udp  --  [anywhere]/0            [anywhere]/0            multiport dports 53
    RETURN     all  --  ***.***.***.***/8           [anywhere]/0         
    RETURN     all  --  ***.***.***.***/12        [anywhere]/0         
    RETURN     all  --  ***.***.***.***/16       [anywhere]/0         
    BLOCKCC0-I-1  all  --  ***.***.***.***/8            [anywhere]/0           [goto]
    BLOCKCC0-I-2  all  --  ***.***.***.***/8            [anywhere]/0           [goto]
    
    
    Chain f2b-dovecot-pop3imap (1 references)
    target     prot opt source               destination       
    RETURN     all  --  [anywhere]/0            [anywhere]/0         
    
    Chain f2b-postfix (1 references)
    target     prot opt source               destination       
    RETURN     all  --  [anywhere]/0            [anywhere]/0         
    
    Chain f2b-sshd (1 references)
    target     prot opt source               destination       
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***      [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***      [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***      [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***      [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    RETURN     all  --  [anywhere]/0            [anywhere]/0         
    
    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  udp  --  [anywhere]/0            [anywhere]/0            udp dpt:137
    ufw-skip-to-policy-input  udp  --  [anywhere]/0            [anywhere]/0            udp dpt:138
    ufw-skip-to-policy-input  tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:139
    ufw-skip-to-policy-input  tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:445
    ufw-skip-to-policy-input  udp  --  [anywhere]/0            [anywhere]/0            udp dpt:67
    ufw-skip-to-policy-input  udp  --  [anywhere]/0            [anywhere]/0            udp dpt:68
    ufw-skip-to-policy-input  all  --  [anywhere]/0            [anywhere]/0            ADDRTYPE match dst-type BROADCAST
    
    Chain ufw-after-logging-forward (1 references)
    target     prot opt source               destination       
    LOG        all  --  [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        all  --  [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     all  --  [anywhere]/0            [anywhere]/0            ctstate RELATED,ESTABLISHED
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 3
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 11
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 12
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 8
    ufw-user-forward  all  --  [anywhere]/0            [anywhere]/0         
    
    Chain ufw-before-input (1 references)
    target     prot opt source               destination       
    ACCEPT     all  --  [anywhere]/0            [anywhere]/0         
    ACCEPT     all  --  [anywhere]/0            [anywhere]/0            ctstate RELATED,ESTABLISHED
    ufw-logging-deny  all  --  [anywhere]/0            [anywhere]/0            ctstate INVALID
    DROP       all  --  [anywhere]/0            [anywhere]/0            ctstate INVALID
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 3
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 11
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 12
    ACCEPT     icmp --  [anywhere]/0            [anywhere]/0            icmptype 8
    ACCEPT     udp  --  [anywhere]/0            [anywhere]/0            udp spt:67 dpt:68
    ufw-not-local  all  --  [anywhere]/0            [anywhere]/0         
    ACCEPT     udp  --  [anywhere]/0            ***.***.***.***          udp dpt:5353
    ACCEPT     udp  --  [anywhere]/0            ***.***.***.***      udp dpt:1900
    ufw-user-input  all  --  [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     all  --  [anywhere]/0            [anywhere]/0         
    ACCEPT     all  --  [anywhere]/0            [anywhere]/0            ctstate RELATED,ESTABLISHED
    ufw-user-output  all  --  [anywhere]/0            [anywhere]/0         
    
    Chain ufw-logging-allow (0 references)
    target     prot opt source               destination       
    LOG        all  --  [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     all  --  [anywhere]/0            [anywhere]/0            ctstate INVALID limit: avg 3/min burst 10
    LOG        all  --  [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     all  --  [anywhere]/0            [anywhere]/0            ADDRTYPE match dst-type LOCAL
    RETURN     all  --  [anywhere]/0            [anywhere]/0            ADDRTYPE match dst-type MULTICAST
    RETURN     all  --  [anywhere]/0            [anywhere]/0            ADDRTYPE match dst-type BROADCAST
    ufw-logging-deny  all  --  [anywhere]/0            [anywhere]/0            limit: avg 3/min burst 10
    DROP       all  --  [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       all  --  [anywhere]/0            [anywhere]/0         
    
    Chain ufw-skip-to-policy-input (7 references)
    target     prot opt source               destination       
    DROP       all  --  [anywhere]/0            [anywhere]/0         
    
    Chain ufw-skip-to-policy-output (0 references)
    target     prot opt source               destination       
    ACCEPT     all  --  [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     tcp  --  [anywhere]/0            [anywhere]/0            ctstate NEW
    ACCEPT     udp  --  [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     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:993
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:995
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:143
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:80
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:8081
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:20
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:21
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:9000
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 10024:10025
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:631
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:10000
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:465
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:222
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:902
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:110
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:8000
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:11211
    ACCEPT     udp  --  [anywhere]/0            [anywhere]/0            udp dpt:11211
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:8080
    ACCEPT     udp  --  [anywhere]/0            [anywhere]/0            udp dpt:8080
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:53
    ACCEPT     udp  --  [anywhere]/0            [anywhere]/0            udp dpt:53
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:25
    ACCEPT     udp  --  [anywhere]/0            [anywhere]/0            udp dpt:25
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:443
    ACCEPT     udp  --  [anywhere]/0            [anywhere]/0            udp dpt:443
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:953
    ACCEPT     udp  --  [anywhere]/0            [anywhere]/0            udp dpt:953
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:587
    ACCEPT     udp  --  [anywhere]/0            [anywhere]/0            udp dpt:587
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:49152
    ACCEPT     udp  --  [anywhere]/0            [anywhere]/0            udp dpt:49152
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:1023
    ACCEPT     udp  --  [anywhere]/0            [anywhere]/0            udp dpt:1023
    ACCEPT     tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:2525
    ACCEPT     udp  --  [anywhere]/0            [anywhere]/0            udp dpt:2525
    ACCEPT     all  --  ***.***.***.***         [anywhere]/0         
    ACCEPT     all  --  ***.***.***.***         [anywhere]/0         
    ACCEPT     all  --  ***.***.***.***         [anywhere]/0         
    ACCEPT     all  --  [localhost]            [anywhere]/0         
    ACCEPT     all  --  ***.***.***.***            [anywhere]/0         
    ACCEPT     all  --  ***.***.***.***          [anywhere]/0         
    ACCEPT     all  --  [anywhere]/0            ***.***.***.***       
    DROP       all  --  ***.***.***.***       [anywhere]/0         
    DROP       tcp  --  [anywhere]/0            [anywhere]/0            tcp dpt:22
    ACCEPT     all  --  ***.***.***.***          [anywhere]/0         
    ACCEPT     all  --  ***.***.***.***         [anywhere]/0         
    ACCEPT     tcp  --  ***.***.***.***         [anywhere]/0            tcp dpt:5900
    ACCEPT     udp  --  ***.***.***.***         [anywhere]/0            udp dpt:5900
    DROP       all  --  ***.***.***.***       [anywhere]/0         
    ACCEPT     all  --  ***.***.***.***        [anywhere]/0         
    ACCEPT     all  --  ***.***.***.***        [anywhere]/0         
    ACCEPT     all  --  ***.***.***.***        [anywhere]/0         
    ACCEPT     all  --  ***.***.***.***        [anywhere]/0         
    
    Chain ufw-user-limit (0 references)
    target     prot opt source               destination       
    LOG        all  --  [anywhere]/0            [anywhere]/0            limit: avg 3/min burst 5 LOG flags 0 level 4 prefix "[UFW LIMIT BLOCK] "
    REJECT     all  --  [anywhere]/0            [anywhere]/0            reject-with icmp-port-unreachable
    
    Chain ufw-user-limit-accept (0 references)
    target     prot opt source               destination       
    ACCEPT     all  --  [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 #####
    Certbot is installed in /usr/bin/letsencrypt
    
    
    Note:
    1. Not sure wht the script cant find my IP address with ifconfig, maybe because i also have a slave DNS?
    2. My SSH port is not 22 so dont worry about that, its works as it should
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Postfix seems to be running fine and postfix is listening to the correct ports. Please login to webmail and send an email to the same address that you are logged in to webmail. Then please post the lines that got added for this action in /var/log/mail.log file.
     
  9. budgierless

    budgierless Member HowtoForge Supporter

    Yes I managed to get the postfix working again, but I think the reason for it failing was because it was overload because of a hack, im getting many failed to send emails, which i did not send, from the undelivered mail header shows:
    Code:
    X-Mailer: Infraware POLARIS Mobile Mailer v2.5
    
    but i do not know what this is, so i need to look into my web file-system and see if a hack-script has been added.
     

Share This Page