Welcome to Centmin Mod Community
Become a Member

[Solved] 123.07beta21 - postfix

Discussion in 'Bug Reports' started by dorobo, Jun 14, 2014.

  1. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +162
    Local Time:
    2:59 PM
    latest
    latest
    This is from a new OpenVZ VPS. CentOS release 6.5 (Final) 32 bit

    After installation of centmin.sh

    # /etc/init.d/postfix status
    bash: /etc/init.d/postfix: No such file or directory

    from install.log


    Code:
    Gracefully shutting down php-fpm . done
    Starting php-fpm  done
    *************************************************
    [1;32;40m* Installing sendmail
    [m*************************************************
    Package sendmail-8.14.4-8.el6.i686 already installed and latest version
    Package mailx-12.4-7.el6.i686 already installed and latest version
    Package sendmail-cf-8.14.4-8.el6.noarch already installed and latest version
    m4:sendmail.mc:176: Warning: end of file treated as newline
    Shutting down sm-client: [60G[[0;32m  OK  [0;39m]
    Shutting down sendmail: [60G[[0;32m  OK  [0;39m]
    Starting sendmail: [60G[[0;32m  OK  [0;39m]
    Starting sm-client: [60G[[0;32m  OK  [0;39m]
    *************************************************
    [1;32;40m* sendmail installed
    [m*************************************************
    *************************************************
    [1;32;40mPostfix already detected, sendmail install aborted
    [m*************************************************
    *************************************************
    [1;32;40m* Installing CSF firewall... 
    [m*************************************************
    Installing...
    
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,110
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,739
    Local Time:
    4:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what does the following commands show

    Code:
    yum list postfix
    Code:
    yum list postfix --disableplugin=priorities
     
  3. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +162
    Local Time:
    2:59 PM
    latest
    latest
    Code:
    # yum list postfix --disableplugin=priorities
    Loaded plugins: downloadonly, fastestmirror
    Loading mirror speeds from cached hostfile
     * base: centos.mirror.triple-it.nl
     * epel: nl.mirror.eurid.eu
     * extras: centos.mirror.triple-it.nl
     * rpmforge: nl.mirror.eurid.eu
     * updates: mirror.yourwebhoster.eu
    Available Packages
    postfix.i686                       2:2.6.6-6.el6_5                       updates
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,110
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,739
    Local Time:
    4:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Looks to be correct, Centmin Mod .07 beta 21 right now will do the following on initial install
    • If /etc/init.d/postfix not detected, it will install sendmail as default
    • If /etc/init.d/postfix detected, it will not install sendmail
    • So postfix won't be installed automatically, unless your CentOS OS image/template already had postfix installed in the first place.
    I guess the problem is in my logic, as I work from whatever get's installed from the default CentOS OS template provided by your web host. Some default to sendmail while others default to postfix. I miss the scenario where someone would want postfix installed but don't have postfix installed at time of initial Centmin Mod install.
     
  5. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +162
    Local Time:
    2:59 PM
    latest
    latest
    My bad George. I realized that it is functioning as it should be. However, I wanted postfix to be installed and postfixsetup to run

    would this do the trick

    Code:
    yum${CACHESKIP} -y -q install mailx postfix
    		postfixsetup
     
  6. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +162
    Local Time:
    2:59 PM
    latest
    latest
    or this

    Code:
    if [[ ! -f /etc/init.d/postfix ]]; then
    		echo "*************************************************"
    		cecho "* Installing sendmail" $boldgreen
    		echo "*************************************************"
    		yum${CACHESKIP} -y -q install sendmail mailx sendmail-cf postfix
    		chkconfig --levels 235 sendmail on
    		funct_sendmailmc
    		#/etc/init.d/sendmail start
    		postfixsetup
    		echo "*************************************************"
    		cecho "* sendmail installed" $boldgreen
    		echo "*************************************************"
    	
    	else
            yum${CACHESKIP} -y -q install mailx
    		postfixsetup
    	fi
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,110
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,739
    Local Time:
    4:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    working on the revised code ;)
     
  8. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +162
    Local Time:
    2:59 PM
    latest
    latest
    Last edited: Jun 14, 2014
  9. eva2000

    eva2000 Administrator Staff Member

    54,110
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,739
    Local Time:
    4:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah this forum is also using Mandrill https://community.centminmod.com/threads/forums-switched-over-to-mandrill-for-email-smtp.384/.

    So made the change by adding a new variable POSTFIX_INSTALL=y which changes the default Centmin Mod install to installing postfix by default instead of sendmail. Added this in latest .07 beta 21 https://github.com/centminmod/centminmod/commits/123.07beta21. Specific commit https://github.com/centminmod/centminmod/commit/11141514e78800882fe0c760b9727573e429dc6f and https://community.centminmod.com/th...rom-sendmail-to-postfix-as-default.474/unread.