Learn about Centmin Mod LEMP Stack today
Register Now

MariaDB centmin.sh postfix main.cf config missing - accidentally removed Postfix mail server

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by huaanhhuy, Jul 17, 2020.

  1. huaanhhuy

    huaanhhuy New Member

    21
    0
    1
    Jun 10, 2020
    Ratings:
    +1
    Local Time:
    1:29 AM
    Hi @eva2000 i fixed the error above but today i see another error below, please help me

    Code:
    [04:42][root@mainserver.huaanhhuy.tk centminmod]# cmdir
    /usr/local/src/centminmod /usr/local/src/centminmod
    [04:42][root@mainserver.huaanhhuy.tk centminmod]# tools/pip-updates.sh update
    [04:43][root@mainserver.huaanhhuy.tk centminmod]# centmin
    /usr/local/src/centminmod /usr/local/src/centminmod
    
    grep: /etc/postfix/main.cf: No such file or directory
    --------------------------------------------------------
         Centmin Mod Menu 123.09beta01 centminmod.com
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB MySQL Upgrade & Management
    12). Zend OpCache Install/Re-install
    13). Install/Reinstall Redis PHP Extension
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: zstd,pigz,pbzip2,lbzip2
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Install/Re-Install
    21). Data Transfer (TBA)
    22). Add Wordpress Nginx vhost + Cache Plugin
    23). Update Centmin Mod Code Base
    24). Exit
    

     
  2. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    4:29 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    are emails sent from server working ? as Postfix mail server should be installed and should have /etc/postfix/main.cf config file.

    what is output for these commands
    Code (Text):
    ls -lah /etc/postfix/main.cf

    Code (Text):
    yum history list postfix
     
  3. huaanhhuy

    huaanhhuy New Member

    21
    0
    1
    Jun 10, 2020
    Ratings:
    +1
    Local Time:
    1:29 AM
    Hi @eva2000 here is the output

    Code:
    # ls -lah /etc/postfix/main.cf
    ls: cannot access /etc/postfix/main.cf: No such file or directory
    
    # yum history list postfix
    Loaded plugins: fastestmirror, priorities, versionlock
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
        73 | remove MariaDB-* -y      | 2020-07-10 10:52 | Erase          |   15 EE
        22 | -y install postfix --dis | 2020-07-01 06:19 | Install        |    1
         4 | -y remove mariadb-libs   | 2020-07-01 06:01 | Erase          |    2
         1 | -y update                | 2020-07-01 05:55 | I, O, U        |  171 EE
    history list
    # centmin
    /usr/local/src/centminmod ~
    
    grep: /etc/postfix/main.cf: No such file or directory
    --------------------------------------------------------
         Centmin Mod Menu 123.09beta01 centminmod.com
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB MySQL Upgrade & Management
    12). Zend OpCache Install/Re-install
    13). Install/Reinstall Redis PHP Extension
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: zstd,pigz,pbzip2,lbzip2
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Install/Re-Install
    21). Data Transfer (TBA)
    22). Add Wordpress Nginx vhost + Cache Plugin
    23). Update Centmin Mod Code Base
    24). Exit
    --------------------------------------------------------
    Enter option [ 1 - 24 ]
    
    
     
  4. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    4:29 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    there is the problem you ran yum transaction id 73 for
    Code (Text):
    yum remove MariaDB-* -y
    

    on July 10, 2020 which removed MariaDB and Postfix mail server which is a dependency

    why remove MariaDB MySQL server ? you should not remove Centmin Mod installed MariaDB server packages which also removed your Postfix mail server so you can't send outbound emails now too

    post output for command below to see the details was what was removed
    Code (Text):
    yum history info 73
     
  5. huaanhhuy

    huaanhhuy New Member

    21
    0
    1
    Jun 10, 2020
    Ratings:
    +1
    Local Time:
    1:29 AM
     
  6. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    4:29 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    yup your yum remove MariaDB* also removed Postfix mail server. What is the reason you removed MariaDB MySQL server ?
     
  7. huaanhhuy

    huaanhhuy New Member

    21
    0
    1
    Jun 10, 2020
    Ratings:
    +1
    Local Time:
    1:29 AM
    I just try installing Maria DB 10.5.4 on my test server.
     
  8. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    4:29 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
  9. huaanhhuy

    huaanhhuy New Member

    21
    0
    1
    Jun 10, 2020
    Ratings:
    +1
    Local Time:
    1:29 AM
    Yes, I install 10.5.4 already. It seem a stable version, just testing it on my test server. Hope CMM can upgrade to MariaDB 10.5 soon
     
  10. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    4:29 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Ok then.
    Because your removed MariaDB, you also removed Postfix mail server and removed Pure-ftpd FTP server so you need to reinstall them
    Code (Text):
    yum -y install postfix pure-ftpd
    chkconfig postfix on
    chkconfig pure-ftpd on
    service postfix start
    service pure-ftpd start