Ispconfig3 (current) on Centos 7 - No email in or out after upgrade

Discussion in 'ISPConfig 3 Priority Support' started by vestport, Sep 1, 2016.

  1. vestport

    vestport Member HowtoForge Supporter

    I was having problems before with errors in squirrelmail where I had to hit send several times before it would actually go out. I wanted to try to solve the problem and thought it may have been an upgrade issue so I upgraded to the latest ISPCONFIG 3 (from a prior version of 3) and now I get nothing in or out. I also reinstalled postfix, dovecot and mariadb and no luck. At this point I just would like to reinstall anything to do with mail that won't overwrite mail accounts or loose mail. I see mail in mailq but it won't release.

    Here is my "netstat -tap":

    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 0.0.0.0:imaps 0.0.0.0:* LISTEN 1136/dovecot
    tcp 0 0 0.0.0.0:pop3s 0.0.0.0:* LISTEN 1136/dovecot
    tcp 0 0 localhost:10024 0.0.0.0:* LISTEN 2546/amavisd (maste
    tcp 0 0 localhost:cslistener 0.0.0.0:* LISTEN 1050/php-fpm: maste
    tcp 0 0 0.0.0.0:mysql 0.0.0.0:* LISTEN 2171/mysqld
    tcp 0 0 0.0.0.0:pop3 0.0.0.0:* LISTEN 1136/dovecot
    tcp 0 0 0.0.0.0:imap 0.0.0.0:* LISTEN 1136/dovecot
    tcp 0 0 ns1.mydomain.com:domain 0.0.0.0:* LISTEN 2375/named
    tcp 0 0 ns1.mydomain.com:domain 0.0.0.0:* LISTEN 2375/named
    tcp 0 0 localhost:domain 0.0.0.0:* LISTEN 2375/named
    tcp 0 0 0.0.0.0:ftp 0.0.0.0:* LISTEN 1052/pure-ftpd (SER
    tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN 1026/sshd
    tcp 0 0 localhost:smtp 0.0.0.0:* LISTEN 2655/master
    tcp 0 0 localhost:rndc 0.0.0.0:* LISTEN 2375/named
    tcp 0 7 ns1.mydomain.com:47251 mailin-05.mail.aol:smtp LAST_ACK -
    tcp 0 7 ns1.mydomain.com:49743 mailin-05.mail.aol:smtp LAST_ACK -
    tcp 0 7 ns1.mydomain.com:60729 mtain-a-atc-b.mx.a:smtp LAST_ACK -
    tcp 0 0 ns1.mydomain.com:ssh mail.psfleasing.c:49842 ESTABLISHED 2920/sshd: [email protected]
    tcp 0 7 ns1.mydomain.com:52861 mailin-05.mail.aol:smtp LAST_ACK -
    tcp 0 64 ns1.mydomain.com:ssh mail.psfleasing.c:50317 ESTABLISHED 5061/sshd: [email protected]
    tcp 0 0 ns1.mydomain.com:ssh 116.31.116.48:22310 ESTABLISHED 12632/sshd: [accept
    tcp 0 7 ns1.mydomain.com:49174 mtain-b-atc-a.mx.a:smtp LAST_ACK -
    tcp6 0 0 [::]:imaps [::]:* LISTEN 1136/dovecot
    tcp6 0 0 [::]:pop3s [::]:* LISTEN 1136/dovecot
    tcp6 0 0 localhost:10024 [::]:* LISTEN 2546/amavisd (maste
    tcp6 0 0 [::]:pop3 [::]:* LISTEN 1136/dovecot
    tcp6 0 0 [::]:imap [::]:* LISTEN 1136/dovecot
    tcp6 0 0 [::]:webcache [::]:* LISTEN 2397/httpd
    tcp6 0 0 [::]:http [::]:* LISTEN 2397/httpd
    tcp6 0 0 [::]:tproxy [::]:* LISTEN 2397/httpd
    tcp6 0 0 [::]:domain [::]:* LISTEN 2375/named
    tcp6 0 0 [::]:ftp [::]:* LISTEN 1052/pure-ftpd (SER
    tcp6 0 0 [::]:ssh [::]:* LISTEN 1026/sshd
    tcp6 0 0 localhost:smtp [::]:* LISTEN 2655/master
    tcp6 0 0 localhost:rndc [::]:* LISTEN 2375/named
    tcp6 0 0 [::]:https [::]:* LISTEN 2397/httpd
    tcp6 0 0 ns1.mydomain.com:http crawl-66-249-79-8:59300 TIME_WAIT -

    Please help before I replace the whole server and copy whatever mail in mailbox I can recover. That will take days and this server is hugely mission critical here.

    Thanks,

    Art
     
    Last edited: Sep 15, 2016
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    First, which exact ISPConfig version do you have installed?

    A reinstall of services like postfix requires that you run an ispconfig update again after you reinstalled postfix , otherwise the mailsystem is unconfigured and can not work. Chose to reconfigure services during update so that the updater can configure the services.

    Take a look into the maillog file to see wwhich errors you get there in case that the mail system does not work after you run the ispconfig update with reconfigre services.
     
  3. vestport

    vestport Member HowtoForge Supporter

  4. vestport

    vestport Member HowtoForge Supporter


    Hi Till,

    I am running ISPConfig 3.0.5.4p9 (updated to current)

    ISPCONFIG won't let me update again because it is the current version. How do I force it to run again without loosing all other settings? Or how do I downgrade then upgrade again?

    I just wanted to add that I did to the backups before running the ISPCONFIG update as follows:


    ****START*****

    Create a backup folder:

    mkdir /home/backup
    chmod 700 /home/backup
    cd /home/backup
    Backup the database

    mysqldump -u root -p dbispconfig > dbispconfig.sql
    Backup the ISPConfig software

    tar pcfz ispconfig_software.tar.gz /usr/local/ispconfig
    Backup the configuration files in /etc

    tar pcfz etc.tar.gz /etc
    This backup does not include the emails and website data.

    *****END*****

    If I need to reinstall the backup first can you please give me specific instructions to untar etc. to the right directory. I'm just not sure how to approach this without causing more problems by accident.



    Let me know,


    Thanks,


    Art
     
    Last edited: Sep 1, 2016
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Jut run these commands to redo the update:

    Code:
    cd /tmp
    wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
    tar xvfz ISPConfig-3-stable.tar.gz
    cd ispconfig3_install/install
    php -q update.php
    
    You don't have to restore the backups.
     
  6. vestport

    vestport Member HowtoForge Supporter

    Thanks so much for the above procedure! Unfortunately I am back to where I was before my update. This is also why I updated. I am still getting the following errors sending mail:

    Code:
    Connection refused
    111 Can't open SMTP stream.
    
    ISPCONFIG 3 still reporting SMTP-SERVER is offline in STATUS OF SERVICES

    Here is my current netstat -tap

    Code:
    [[email protected] log]# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address  Foreign Address  State  PID/Program name
    tcp  0  0 0.0.0.0:imaps  0.0.0.0:*  LISTEN  1155/dovecot
    tcp  0  0 0.0.0.0:pop3s  0.0.0.0:*  LISTEN  1155/dovecot
    tcp  0  0 localhost:10024  0.0.0.0:*  LISTEN  2560/amavisd (maste
    tcp  0  0 localhost:cslistener  0.0.0.0:*  LISTEN  1049/php-fpm: maste
    tcp  0  0 0.0.0.0:mysql  0.0.0.0:*  LISTEN  2014/mysqld
    tcp  0  0 0.0.0.0:pop3  0.0.0.0:*  LISTEN  1155/dovecot
    tcp  0  0 0.0.0.0:imap  0.0.0.0:*  LISTEN  1155/dovecot
    tcp  0  0 ns1.mydomain.com:http  41.58.81.72:63837  SYN_RECV  -
    tcp  0  0 ns1.mydomain.com:domain  0.0.0.0:*  LISTEN  2378/named
    tcp  0  0 ns1.mydomain.com:domain  0.0.0.0:*  LISTEN  2378/named
    tcp  0  0 localhost:domain  0.0.0.0:*  LISTEN  2378/named
    tcp  0  0 0.0.0.0:ftp  0.0.0.0:*  LISTEN  1051/pure-ftpd (SER
    tcp  0  0 0.0.0.0:ssh  0.0.0.0:*  LISTEN  1025/sshd
    tcp  0  0 localhost:rndc  0.0.0.0:*  LISTEN  2378/named
    tcp  0  272 ns1.mydomain.com:ssh  mail.psfleasing.c:50246 ESTABLISHED 3831/sshd: [email protected]
    tcp6  0  0 [::]:imaps  [::]:*  LISTEN  1155/dovecot
    tcp6  0  0 [::]:pop3s  [::]:*  LISTEN  1155/dovecot
    tcp6  0  0 localhost:10024  [::]:*  LISTEN  2560/amavisd (maste
    tcp6  0  0 [::]:pop3  [::]:*  LISTEN  1155/dovecot
    tcp6  0  0 [::]:imap  [::]:*  LISTEN  1155/dovecot
    tcp6  0  0 [::]:webcache  [::]:*  LISTEN  2402/httpd
    tcp6  0  0 [::]:http  [::]:*  LISTEN  2402/httpd
    tcp6  0  0 [::]:tproxy  [::]:*  LISTEN  2402/httpd
    tcp6  0  0 [::]:domain  [::]:*  LISTEN  2378/named
    tcp6  0  0 [::]:ftp  [::]:*  LISTEN  1051/pure-ftpd (SER
    tcp6  0  0 [::]:ssh  [::]:*  LISTEN  1025/sshd
    tcp6  0  0 localhost:rndc  [::]:*  LISTEN  2378/named
    tcp6  0  0 [::]:https  [::]:*  LISTEN  2402/httpd
    tcp6  0  0 ns1.mydomain.com:http  180.252.164.223:59969  TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  216.144.225.9:nifty-hmi TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  185.48.37.127:61155  TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  103.66.178.246:61048  TIME_WAIT  -
    tcp6  0  1 ns1.mydomain.com:http  108.61.122.50.cho:14289 CLOSING  -
    tcp6  0  0 localhost:imap  localhost:38176  TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  b110049.yse.yahoo:54783 TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  98.143.145.28.sta:ssrip TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  crawl-66-249-66-1:62434 TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  185.57.73.103.alt:49390 TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  adsl.viettel.:prm-nm-np TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  tor-exit7-readme.:23337 TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  tor-exit0-readme.:38945 TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  65.19.167.131:33845  TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  customer.worldstr:53489 TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  p3nlhg1351.shr.pr:17264 TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  customer.worldstr:43596 TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  crawl-66-249-66-2:60587 TIME_WAIT  -
    tcp6  0  0 ns1.mydomain.com:http  apache2-argon.es:candrp TIME_WAIT  -
    [[email protected] log]#
    
    Not sure what to do here to get things going again.

    Also, when I type "mailq" there are tons of emails there that won't release.

    Here are some errors in maillog:

    Code:
    Sep  2 10:30:12 ns1 postfix/error[6441]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
    Sep  2 10:30:12 ns1 postfix/error[6874]: warning: connect to mysql server 127.0.0.1: Too many connections
    Sep  2 10:30:12 ns1 postfix/error[6320]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
    Sep  2 10:30:12 ns1 postfix/error[6853]: warning: connect to mysql server 127.0.0.1: Too many connections
    Sep  2 10:30:12 ns1 postfix/error[6339]: warning: 1F8E91280F639A: flush service failure
    Sep  2 10:30:12 ns1 postfix/error[6445]: warning: 118821281B0AA2: flush service failure
    Sep  2 10:30:12 ns1 postfix/error[6441]: warning: 13D681281EC681: flush service failure
    Sep  2 10:30:12 ns1 postfix/error[6877]: warning: connect to mysql server 127.0.0.1: Too many connections
    Sep  2 10:30:12 ns1 postfix/error[6865]: warning: connect to mysql server 127.0.0.1: Too many connections
    Sep  2 10:30:12 ns1 postfix/error[6435]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
    Sep  2 10:30:12 ns1 postfix/error[6357]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
    Sep  2 10:30:12 ns1 postfix/error[6875]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
    Sep  2 10:30:12 ns1 postfix/error[6874]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
    Sep  2 10:30:12 ns1 postfix/error[6856]: warning: connect to mysql server 127.0.0.1: Too many connections
    Sep  2 10:30:12 ns1 postfix/error[6320]: warning: 1E5CC1281E03E7: flush service failure
    Sep  2 10:30:12 ns1 postfix/error[6853]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
    Sep  2 10:30:12 ns1 postfix/error[6877]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
    Sep  2 10:30:12 ns1 postfix/error[6865]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
    Sep  2 10:30:12 ns1 postfix/error[6435]: warning: 146B91280E83B2: flush service failure
    Sep  2 10:30:12 ns1 postfix/error[6357]: warning: 1771C12819B393: flush service failure
    Sep  2 10:30:12 ns1 postfix/error[6875]: warning: 1114D128191BF8: flush service failure
    Sep  2 10:30:12 ns1 postfix/error[6874]: warning: 109EB1281B1EC8: flush service failure
    Sep  2 10:30:12 ns1 postfix/error[6856]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
    [[email protected] log]#
    
    my /etc/postfix/mysql-virtual_relaydomains.cf is:

    Code:
    user = ispconfig
    password = MYPASSWORD
    dbname = dbispconfig
    table = mail_transport
    select_field = domain
    where_field = domain
    additional_conditions = and active = 'y' and server_id = 1
    hosts = 127.0.0.1
    
    Just wanted to add that I always get lots and lots and lots of spam on several accounts despite setting up rules etc. Seems like there is always traffic and people trying to relay. Also, lots of failed login attempts from hackers all eating up cpu time I'm sure and maybe overloading and causing a denial of services?

    Here is a small clip from root getting mailed with a spoofed sender from one of my domains "leaseoffcampus.com" who is not a user:

    Code:
    
    Message 73:
    From [email protected]  Fri Sep  2 10:43:23 2016
    Return-Path: <[email protected]>
    X-Original-To: postmaster
    Delivered-To: [email protected]
    Date: Fri,  2 Sep 2016 14:36:32 +0000 (UTC)
    From: [email protected] (Mail Delivery System)
    To: [email protected] (Postmaster)
    Subject: Postfix SMTP server: errors from unknown[127.0.0.1]
    Status: RO
    
    Transcript of session follows.
    
    Out: 220 ns1.mydomain.com ESMTP Postfix
    In:  EHLO localhost
    Out: 250-ns1.mydomain.com
    Out: 250-PIPELINING
    Out: 250-SIZE 10240000
    Out: 250-VRFY
    Out: 250-ETRN
    Out: 250-STARTTLS
    Out: 250-AUTH PLAIN LOGIN
    Out: 250-AUTH=PLAIN LOGIN
    Out: 250-ENHANCEDSTATUSCODES
    Out: 250-8BITMIME
    Out: 250 DSN
    In:  MAIL FROM:<[email protected]> BODY=7BIT
    Out: 250 2.1.0 Ok
    In:  RCPT TO:<[email protected]> ORCPT=rfc822;[email protected]
    Out: 250 2.1.5 Ok
    In:  DATA
    Out: 354 End data with <CR><LF>.<CR><LF>
    Out: 451 4.3.0 Error: queue file write error
    
    Session aborted, reason: lost connection
    
    For other details, see the local mail logfile
    
    There is no "[email protected]" in my mail users.

    mailq is not flushing in any case and can still not send mail in or out.

    Now after a few minutes I see my "Server State" in ISPCONFIG 3 all green but still no mail in or out.
    Not sure what to do.
     
    Last edited: Sep 15, 2016
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Postfix seems to be not started at the moment. Restart postfix with:

    service postfix restart

    then check with:

    netstat -tap | grep smtp

    if postfix is running now. If it s not running, check which errors in /var/log/maillog have been added by the postfix restart and post any error that you might have got on the console during postfix restart.
     
  8. vestport

    vestport Member HowtoForge Supporter

    Here is the result of netstat -tap | grep smtp
    that is after "service postfix restart"

    Code:
    tcp  0  0 0.0.0.0:smtp  0.0.0.0:*  LISTEN  27190/master
    tcp  0  0 localhost:smtp  localhost:34171  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33884  TIME_WAIT  -
    tcp  0  0 localhost:33909  localhost:mysql  ESTABLISHED 27755/smtpd
    tcp  0  0 localhost:33580  localhost:mysql  ESTABLISHED 27729/smtpd
    tcp  0  0 localhost:smtp  localhost:34290  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33721  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33718  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33922  TIME_WAIT  -
    

    I had to cut out some of the midde here as the system complained of too many characters

    Code:
    tcp  0  0 localhost:smtp  localhost:34452  TIME_WAIT  -
    tcp  0  0 localhost:34104  localhost:mysql  ESTABLISHED 27204/smtpd
    tcp  0  0 localhost:smtp  localhost:33563  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33550  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33608  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34209  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33831  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34307  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34251  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33855  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34228  TIME_WAIT  -
    tcp  0  0 localhost:34535  localhost:mysql  ESTABLISHED 27427/smtpd
    tcp  0  0 localhost:smtp  localhost:34160  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33935  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34353  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34192  TIME_WAIT  -
    tcp  0  0 localhost:60038  localhost:mysql  ESTABLISHED 27222/smtp
    tcp  0  0 localhost:smtp  localhost:33924  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34082  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34204  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33570  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34136  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34059  TIME_WAIT  -
    tcp  0  0 localhost:59975  localhost:mysql  ESTABLISHED 27354/smtpd
    tcp  0  0 localhost:smtp  localhost:34304  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34050  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33592  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33906  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34431  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34183  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34245  TIME_WAIT  -
    tcp  0  0 localhost:59998  localhost:mysql  ESTABLISHED 27381/smtpd
    tcp  0  0 localhost:smtp  localhost:33629  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34385  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34012  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34302  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33710  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33865  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34173  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34078  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34142  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34000  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34176  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34384  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34222  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34450  TIME_WAIT  -
    tcp  0  0 localhost:34362  localhost:mysql  ESTABLISHED 27305/smtpd
    tcp  0  0 localhost:smtp  localhost:33716  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33610  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33715  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:33871  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34009  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34449  TIME_WAIT  -
    tcp  0  0 localhost:smtp  localhost:34301  TIME_WAIT  -
    tcp  0  0 localhost:60113  localhost:mysql  ESTABLISHED 27441/smtpd
    tcp6  0  0 [::]:smtp  [::]:*  LISTEN  27190/master
    [[email protected] ~]#
    
    
    
    Here are messages from /var/log/maillog after restart:

    Code:
    Sep  2 11:58:38 ns1 postfix/qmgr[30140]: warning: you may need to increase the master.cf amavis process limit
    Sep  2 11:58:38 ns1 postfix/qmgr[30140]: warning: please avoid flushing the whole queue when you have
    Sep  2 11:58:38 ns1 postfix/qmgr[30140]: warning: lots of deferred mail, that is bad for performance
    Sep  2 11:58:38 ns1 postfix/qmgr[30140]: warning: to turn off these warnings specify: qmgr_clog_warn_time = 0
    Sep  2 11:58:38 ns1 amavis[30144]: (30144-01) Blocked SPAM {DiscardedOutbound,Quarantined}, MYNETS LOCAL [127.0.0.1]:33917 <[email protected]> -> <[email protected]>, Queue-ID: C15841281917B6, Message-ID: <[email protected]@contacts.co.il>, mail_id: udq8uEhBVkbx, Hits: 10.089, size: 848, 1381 ms
    Sep  2 11:58:39 ns1 amavis[30092]: (30092-02) Passed CLEAN {RelayedOpenRelay}, <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: ZRqASN-dJLD9, Hits: 1.8, size: 1372, queued_as: 361321281E2243, 718 ms
    Sep  2 11:58:39 ns1 amavis[30144]: (30144-02) Passed SPAMMY {RelayedOutbound}, MYNETS LOCAL [127.0.0.1]:58531 <[email protected]> -> <[email protected]>, Queue-ID: 2DD961281D6F03, Message-ID: <[email protected]@sharpfibre.com>, mail_id: Ft9Cl7hG6g6d, Hits: 6.576, size: 714, queued_as: E45051281E2780, 1119 ms
    Sep  2 11:58:40 ns1 amavis[30092]: (30092-02-2) Passed SPAMMY {RelayedOutbound}, MYNETS LOCAL [127.0.0.1]:58624 <[email protected]> -> <[email protected]>, Queue-ID: 079711281D78AF, Message-ID: <[email protected]@hwmartin.com>, mail_id: 7K0xpHwP7fYF, Hits: 6.675, size: 992, queued_as: 11AF51281E2784, 841 ms
    Sep  2 11:58:40 ns1 amavis[30092]: (30092-02-3) Passed CLEAN {RelayedOpenRelay}, <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: XxHq79CvUpt5, Hits: 0.1, size: 1197, queued_as: E4DD31281E2788, 852 ms
    Sep  2 11:58:41 ns1 amavis[30144]: (30144-02-2) Blocked SPAM {DiscardedOutbound,Quarantined}, MYNETS LOCAL [127.0.0.1]:59429 <[email protected]> -> <[email protected]>, Queue-ID: E22581281D9034, Message-ID: <[email protected]@nrca.net>, mail_id: AzbZlS9tIiLl, Hits: 10.799, size: 781, 1049 ms
    
    Squirrel mail generating the following errors during send:

    Code:
    Message not sent. Server replied: Requested action aborted: error in processing
    451 4.3.0 <[email protected]>: Temporary lookup failure
    
    Still no test messages in or out but some mail has come in from other parties that I usually get. Some real and some spam.

    My test mails to and from my yahoo account do not appear working.

    451 4.3.0 <[email protected]>: Temporary lookup failure
     
    Last edited: Sep 15, 2016
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Fine, so postfix is working again. There is probably a lot of mail in the queue (you can check that with the command "postqueue -p"), it will take some tome until it is processed and your test message will be sent after the old mail in the queue has been processed.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    You should increase (or add them if not exist) the max_connections and max_user_connections parameter in MySQL my.cnf file in the [mysqld] section of the file, set both e.g. to 500 and restart MySQL to get rid of the max connections error that you posted above.
     
  11. vestport

    vestport Member HowtoForge Supporter

    I executed "postqueue -p" and increased both settings as you said in my.cnf but (and I hate to admit this) cannot restart mysqld. Here is what I tried:

    Code:
    [[email protected] etc]# service mysqld restart
    Redirecting to /bin/systemctl restart  mysqld.service
    Failed to issue method call: Unit mysqld.service failed to load: No such file or directory.
    
    and

    Code:
    [[email protected] etc]# /etc.init.d/mysql restart
    -bash: /etc.init.d/mysql: No such file or directory
    
    I finally just rebooted but getting the following error sending mail with squirrelmail:

    Code:
    Message not sent. Server replied: Connection refused
    111 Can't open SMTP stream.
    
    Here is the tail -100 of /var/log/maillog

    Code:
    [[email protected] ~]# tail -100 /var/log/maillog
    Sep  2 13:06:53 ns1 amavis[2609]: Module Socket  2.010
    Sep  2 13:06:53 ns1 amavis[2609]: Module Socket6  0.23
    Sep  2 13:06:53 ns1 amavis[2609]: Module Time::HiRes  1.9725
    Sep  2 13:06:53 ns1 amavis[2609]: Module URI  1.60
    Sep  2 13:06:53 ns1 amavis[2609]: Module Unix::Syslog  1.1
    Sep  2 13:06:53 ns1 amavis[2609]: Amavis::ZMQ code  NOT loaded
    Sep  2 13:06:53 ns1 amavis[2609]: Amavis::DB code  loaded
    Sep  2 13:06:53 ns1 amavis[2609]: SQL base code  NOT loaded
    Sep  2 13:06:53 ns1 amavis[2609]: SQL::Log code  NOT loaded
    Sep  2 13:06:53 ns1 amavis[2609]: SQL::Quarantine  NOT loaded
    Sep  2 13:06:53 ns1 amavis[2609]: Lookup::SQL code  NOT loaded
    Sep  2 13:06:53 ns1 amavis[2609]: Lookup::LDAP code  NOT loaded
    Sep  2 13:06:53 ns1 amavis[2609]: AM.PDP-in proto code loaded
    Sep  2 13:06:53 ns1 amavis[2609]: SMTP-in proto code  loaded
    Sep  2 13:06:53 ns1 amavis[2609]: Courier proto code  NOT loaded
    Sep  2 13:06:53 ns1 amavis[2609]: SMTP-out proto code  loaded
    Sep  2 13:06:53 ns1 amavis[2609]: Pipe-out proto code  NOT loaded
    Sep  2 13:06:53 ns1 amavis[2609]: BSMTP-out proto code NOT loaded
    Sep  2 13:06:53 ns1 amavis[2609]: Local-out proto code loaded
    Sep  2 13:06:53 ns1 amavis[2609]: OS_Fingerprint code  NOT loaded
    Sep  2 13:06:53 ns1 amavis[2609]: ANTI-VIRUS code  loaded
    Sep  2 13:06:53 ns1 amavis[2609]: ANTI-SPAM code  loaded
    Sep  2 13:06:53 ns1 amavis[2609]: ANTI-SPAM-EXT code  NOT loaded
    Sep  2 13:06:53 ns1 amavis[2609]: ANTI-SPAM-C code  NOT loaded
    Sep  2 13:06:53 ns1 amavis[2609]: ANTI-SPAM-SA code  loaded
    Sep  2 13:06:53 ns1 amavis[2609]: Unpackers code  loaded
    Sep  2 13:06:53 ns1 amavis[2609]: DKIM code  loaded
    Sep  2 13:06:53 ns1 amavis[2609]: Tools code  NOT loaded
    Sep  2 13:06:53 ns1 amavis[2609]: Found $file  at /usr/bin/file
    Sep  2 13:06:53 ns1 amavis[2609]: Found $altermime  at /usr/bin/altermime
    Sep  2 13:06:53 ns1 amavis[2609]: Internal decoder for .mail
    Sep  2 13:06:53 ns1 amavis[2609]: Found decoder for  .F  at /usr/bin/unfreeze
    Sep  2 13:06:53 ns1 amavis[2609]: Found decoder for  .Z  at /usr/bin/gzip -d
    Sep  2 13:06:53 ns1 amavis[2609]: Found decoder for  .gz  at /usr/bin/gzip -d
    Sep  2 13:06:53 ns1 amavis[2609]: Found decoder for  .bz2  at /usr/bin/bzip2 -d
    Sep  2 13:06:53 ns1 amavis[2609]: Found decoder for  .xz  at /usr/bin/xzdec
    Sep  2 13:06:53 ns1 amavis[2609]: Found decoder for  .lzma at /usr/bin/xz -dc --format=lzma
    Sep  2 13:06:53 ns1 amavis[2609]: Found decoder for  .lrz  at /usr/bin/lrzip -q -k -d -o -
    Sep  2 13:06:53 ns1 amavis[2609]: Found decoder for  .lzo  at /usr/bin/lzop -d
    Sep  2 13:06:53 ns1 amavis[2609]: Found decoder for  .rpm  at /usr/bin/rpm2cpio
    Sep  2 13:06:53 ns1 amavis[2609]: Found decoder for  .cpio at /usr/bin/cpio
    Sep  2 13:06:53 ns1 amavis[2609]: Found decoder for  .tar  at /usr/bin/cpio
    Sep  2 13:06:53 ns1 amavis[2609]: Found decoder for  .deb  at /usr/bin/ar
    Sep  2 13:06:53 ns1 amavis[2609]: No ext program for  .rar, tried: unrar, rar
    Sep  2 13:06:53 ns1 amavis[2609]: Found decoder for  .arj  at /usr/bin/unarj
    Sep  2 13:06:53 ns1 amavis[2609]: Found decoder for  .arc  at /usr/bin/nomarch
    Sep  2 13:06:53 ns1 amavis[2609]: Found decoder for  .zoo  at /usr/bin/unzoo
    Sep  2 13:06:54 ns1 amavis[2609]: Found decoder for  .cab  at /usr/bin/cabextract
    Sep  2 13:06:54 ns1 amavis[2609]: Internal decoder for .tnef
    Sep  2 13:06:54 ns1 amavis[2609]: Found decoder for  .zip  at /usr/bin/7za
    Sep  2 13:06:54 ns1 amavis[2609]: Found decoder for  .kmz  at /usr/bin/7za
    Sep  2 13:06:54 ns1 amavis[2609]: Found decoder for  .7z  at /usr/bin/7za
    Sep  2 13:06:54 ns1 amavis[2609]: Found decoder for  .jar  at /usr/bin/7z
    Sep  2 13:06:54 ns1 amavis[2609]: Found decoder for  .rar  at /usr/bin/7z
    Sep  2 13:06:54 ns1 amavis[2609]: Found decoder for  .swf  at /usr/bin/7z
    Sep  2 13:06:54 ns1 amavis[2609]: Found decoder for  .lha  at /usr/bin/7z
    Sep  2 13:06:54 ns1 amavis[2609]: Found decoder for  .iso  at /usr/bin/7z
    Sep  2 13:06:54 ns1 amavis[2609]: Found decoder for  .exe  at /usr/bin/unarj
    Sep  2 13:06:54 ns1 amavis[2609]: Using primary internal av scanner code for ClamAV-clamd
    Sep  2 13:06:54 ns1 amavis[2609]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
    Sep  2 13:06:54 ns1 amavis[2609]: Deleting db files __db.001,__db.002,__db.003,snmp.db,nanny.db in /var/spool/amavisd/db
    Sep  2 13:06:54 ns1 amavis[2609]: Creating db in /var/spool/amavisd/db/; BerkeleyDB 0.51, libdb 5.3
    Sep  2 13:07:05 ns1 clamd[2426]: Loaded 4786669 signatures.
    Sep  2 13:07:08 ns1 clamd[2426]: LOCAL: Unix socket file /var/run/clamd.amavisd/clamd.sock
    Sep  2 13:07:08 ns1 clamd[2426]: LOCAL: Setting connection queue length to 200
    Sep  2 13:07:08 ns1 clamd[2426]: Limits: Global size limit set to 104857600 bytes.
    Sep  2 13:07:08 ns1 clamd[2426]: Limits: File size limit set to 26214400 bytes.
    Sep  2 13:07:08 ns1 clamd[2426]: Limits: Recursion level limit set to 16.
    Sep  2 13:07:08 ns1 clamd[2426]: Limits: Files limit set to 10000.
    Sep  2 13:07:08 ns1 clamd[2426]: Limits: MaxEmbeddedPE limit set to 10485760 bytes.
    Sep  2 13:07:08 ns1 clamd[2426]: Limits: MaxHTMLNormalize limit set to 10485760 bytes.
    Sep  2 13:07:08 ns1 clamd[2426]: Limits: MaxHTMLNoTags limit set to 2097152 bytes.
    Sep  2 13:07:08 ns1 clamd[2426]: Limits: MaxScriptNormalize limit set to 5242880 bytes.
    Sep  2 13:07:08 ns1 clamd[2426]: Limits: MaxZipTypeRcg limit set to 1048576 bytes.
    Sep  2 13:07:08 ns1 clamd[2426]: Limits: MaxPartitions limit set to 50.
    Sep  2 13:07:08 ns1 clamd[2426]: Limits: MaxIconsPE limit set to 100.
    Sep  2 13:07:08 ns1 clamd[2426]: Archive support enabled.
    Sep  2 13:07:08 ns1 clamd[2426]: Algorithmic detection enabled.
    Sep  2 13:07:08 ns1 clamd[2426]: Portable Executable support enabled.
    Sep  2 13:07:08 ns1 clamd[2426]: ELF support enabled.
    Sep  2 13:07:08 ns1 clamd[2426]: Mail files support enabled.
    Sep  2 13:07:08 ns1 clamd[2426]: OLE2 support enabled.
    Sep  2 13:07:08 ns1 clamd[2426]: PDF support enabled.
    Sep  2 13:07:08 ns1 clamd[2426]: SWF support enabled.
    Sep  2 13:07:08 ns1 clamd[2426]: HTML support enabled.
    Sep  2 13:07:08 ns1 clamd[2426]: Self checking every 600 seconds.
    Sep  2 13:08:32 ns1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=2917, secured, session=<u+ZPYYk7UQAAAAAAAAAAAAAAAAAAAAAB>
    Sep  2 13:08:33 ns1 dovecot: imap([email protected]): Disconnected: Logged out in=44 out=843
    Sep  2 13:08:33 ns1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=2919, secured, session=<CvtgYYk7UgAAAAAAAAAAAAAAAAAAAAAB>
    Sep  2 13:08:34 ns1 dovecot: imap([email protected]): Disconnected: Logged out in=3791 out=13319
    Sep  2 13:08:34 ns1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=2921, secured, session=<OJ9xYYk7UwAAAAAAAAAAAAAAAAAAAAAB>
    Sep  2 13:08:37 ns1 dovecot: imap([email protected]): Disconnected: Logged out in=298 out=1538732
    Sep  2 13:08:54 ns1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=2934, secured, session=<O7CXYok75QAAAAAAAAAAAAAAAAAAAAAB>
    Sep  2 13:08:54 ns1 dovecot: imap([email protected]): Disconnected: Logged out in=187 out=1334
    Sep  2 13:08:55 ns1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=2936, secured, session=<JoukYok75gAAAAAAAAAAAAAAAAAAAAAB>
    Sep  2 13:08:57 ns1 dovecot: imap([email protected]): Disconnected: Logged out in=298 out=1536499
    Sep  2 13:09:14 ns1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=2968, secured, session=<v8PTY4k7PwAAAAAAAAAAAAAAAAAAAAAB>
    Sep  2 13:09:15 ns1 dovecot: imap([email protected]): Disconnected: Logged out in=155 out=6378
    Sep  2 13:09:21 ns1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=2970, secured, session=<Rf82ZIk7QAAAAAAAAAAAAAAAAAAAAAAB>
    Sep  2 13:09:21 ns1 dovecot: imap([email protected]): Disconnected: Logged out in=155 out=5415
    [[email protected] ~]#
    
    Not sure what do do from here and how to start mysql manually next time too.

    Some mail is coming in but not quickly like before

    Also, SMTP server is offline again in ISPCONFIG MONITOR
     
    Last edited: Sep 15, 2016
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Postfix is not running, see post #7 on how to start it.

    Regrading mysql. try:

    service mysql restart

    (without the d).
     
  13. vestport

    vestport Member HowtoForge Supporter

    Code:
    [[email protected] ~]# service mysql restart
    Redirecting to /bin/systemctl restart  mysql.service
    Failed to issue method call: Unit mysql.service failed to load: No such file or directory.
    [[email protected] ~]#
    
    If I just type "mysql" at the prompt it appears to be running but "service mysql restart" is not working.

    Code:
    [[email protected] ~]# mysql
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    [[email protected] ~]#
    
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Use:

    service mariadb restart
     
  15. vestport

    vestport Member HowtoForge Supporter

    Everything is green under ISPCONFIG3 Monitor but mail does not seem to be going out at all. Some email has been trickling in but replies to sender are not being received.

    Thanks,

    Art
     
    Last edited: Sep 7, 2016
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you start / restart postfix after the reboot?

    If yes, does it solve the issue? If no, which errors do you get now in the /var/log/maillog?
     
  17. vestport

    vestport Member HowtoForge Supporter

    Postfix is running. I checked like in response #7. Lots of mail in the que so I did a postqueue -p

    The tail end of that looks like this:
    Code:
    -- 871650 Kbytes in 452924 Requests.
    [[email protected] ~]#
    
    Lots of addresses I see are spoofing my domains (probably via relay) and this is what seems to be bogging down the system and the fact that I get thousands of failed login attempts per day that I see each time I login as root.
    
    I think I need to cut bait here and just go with a new server I have been setting up and just replicate the email users/domains etc. I hate to do that but it seems like the only way to get back online with mail.
    
    Art
    I tried flushing the queue with "postfix flush"

    and deleting the queue with "postsuper -d ALL" and the mailq. Mailq eventually deleted and is immediately repopulating trying to email addresses not initiated from my systems.

    Some security setting must be compromised here. Not sure where to start looking or how to secure the system again other than reinstall and copying mail to each user.


    I
     
    Last edited: Sep 8, 2016
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe you should consider to ask Florian from schaal @it to take a look on your server directly, he is email server specialist and can fix this by remote login. You can reach him here: http://www.ispconfig.org/get-support/?type=ispconfig

    If you like to continue by forum support, then the next step would be to chec the mail headers of some of these emails to see how they get into your server (this can be an authenticated user with a weak password or a hacked website). Mail headers can be viewed with the

    postcat -q IDHASH

    command where IDHASH is the ID of an email as shown in postqueue command.
     
  19. vestport

    vestport Member HowtoForge Supporter

    Thanks Till! I tried that command and it does nothing:

    Code:
    postcat: fatal: open queue file IDHASH: No such file or directory
    
    I have a new Debian Jessie server setup on the latest version of ISPCONFIG and have been manually copying over all email addresses, websites etc. Hopefully I can get that online the next couple of days. Just not sure the best procedure to copy files from one to the other. Pretty much all the ISPCONFIG settings I manually copied. The /var/vmail directory I tgz'd and will unpack on the new server to save mail. Then I will need to do this for websites, databases etc. Hopefully that solves the problem. Do you have an easier way to move files (sites, email, users etc.)? I did do a backup as suggested on my system that is giving me problems. Just not sure how to reinstall or if I backed up everything that I need.
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to replace IDHASH with the has / ID of the email that you goz from postqueue -p command.

    You might have to adjust the owner of the files. an alternative to do the migration manually is to use the migration tool: http://www.ispconfig.org/add-ons/ispconfig-migration-tool/
     

Share This Page