Learn about Centmin Mod LEMP Stack today
Register Now

Install Mail Server on Centminmod

Discussion in 'Add Ons' started by brijendrasial, Aug 16, 2019.

  1. brijendrasial

    brijendrasial Active Member

    161
    127
    43
    Mar 21, 2018
    Ratings:
    +198
    Local Time:
    3:40 PM
    1.13.9
    10.0.22-MariaDB
  2. eva2000

    eva2000 Administrator Staff Member

    50,459
    11,659
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,079
    Local Time:
    8:10 PM
    Nginx 1.25.x
    MariaDB 10.x
    Nice thanks for sharing. Will test when I set aside some free time :)

    Though why install postfix for centplus repo instead of base when CentOS 7 has the same version ? Or you accounting for CentOS 6 ?
    Code (Text):
    yum list postfix --enablerepo=centosplus --showduplicates --disableplugin=priorities -q | tr -s ' '
    Installed Packages
    postfix.x86_64 2:2.10.1-7.el7 @base 
    Available Packages
    postfix.x86_64 2:2.10.1-7.el7 base 
    postfix.x86_64 2:2.10.1-7.0.1.el7.centos centosplus
    
     
  3. brijendrasial

    brijendrasial Active Member

    161
    127
    43
    Mar 21, 2018
    Ratings:
    +198
    Local Time:
    3:40 PM
    1.13.9
    10.0.22-MariaDB
    trying to support both versions. I dont have centos 6 machine but hope it will support latest for centos 6 also thats why I am starting services with service postfix restart not systemctl restart postfix
     
  4. eva2000

    eva2000 Administrator Staff Member

    50,459
    11,659
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,079
    Local Time:
    8:10 PM
    Nginx 1.25.x
    MariaDB 10.x
    ok.

    FYI, here's centos 6 postfix versions on Centmin Mod - basically centosplus has same version as native centos 6
    Code (Text):
    yum list postfix --enablerepo=centosplus --showduplicates --disableplugin=priorities -q | tr -s ' '
    Installed Packages
    postfix.x86_64 2:2.6.6-8.el6 @base 
    Available Packages
    postfix.x86_64 2:2.6.6-8.el6 base 
    postfix.x86_64 2:2.6.6-8.el6.centos.plus centosplus
    
     
  5. brijendrasial

    brijendrasial Active Member

    161
    127
    43
    Mar 21, 2018
    Ratings:
    +198
    Local Time:
    3:40 PM
    1.13.9
    10.0.22-MariaDB
    ah got it. better to use base repo. I will update thanks :)
     
  6. pamamolf

    pamamolf Well-Known Member

    4,022
    421
    83
    May 31, 2014
    Ratings:
    +816
    Local Time:
    1:10 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    It may be better to let out Opendkim as we already have that and all related info as Centminmod addon.... ?

    Or maybe use that Centminmod script?

    Unless that is doing the same thing and will not conflict .....

    Other than that thank you very much !!!!!
     
  7. eva2000

    eva2000 Administrator Staff Member

    50,459
    11,659
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,079
    Local Time:
    8:10 PM
    Nginx 1.25.x
    MariaDB 10.x
    ah yes addons/opendkim.sh centminmod/centminmod outlined at Beta Branch - Automated DKIM setup with opendkim which is mainly for main hostname email outbound for @yourhostname.domain.com and not really for @domain.com used in @brijendrasial. But how opendkim is configured may differ which may conflict. Haven't looked at the differences yet though

    edit: @brijendrasial's opendkim install and configuration from first glance, looks to be using the same install/configure setup as addons/opendkim.sh so should be fine just he's supporting @domain.com domains other than just hostname.domain.com for main server hostname
     
  8. pamamolf

    pamamolf Well-Known Member

    4,022
    421
    83
    May 31, 2014
    Ratings:
    +816
    Local Time:
    1:10 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    It will be good to have a check if Opendkim already exists and if yes to bypass the setup/configuration....

    But yes it is good to be able to set the Opendkim for domains !
     
  9. brijendrasial

    brijendrasial Active Member

    161
    127
    43
    Mar 21, 2018
    Ratings:
    +198
    Local Time:
    3:40 PM
    1.13.9
    10.0.22-MariaDB
    both comes from repo. If its already installed then its fine.
     
  10. eva2000

    eva2000 Administrator Staff Member

    50,459
    11,659
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,079
    Local Time:
    8:10 PM
    Nginx 1.25.x
    MariaDB 10.x
    adding a check is easy if you know what to expect i.e.
    Code (Text):
    rpm -ql opendkim
    package opendkim is not installed
    
    rpm -ql opendkim | grep -o /etc/opendkim/KeyTable
    /etc/opendkim/KeyTable
    
     
  11. brijendrasial

    brijendrasial Active Member

    161
    127
    43
    Mar 21, 2018
    Ratings:
    +198
    Local Time:
    3:40 PM
    1.13.9
    10.0.22-MariaDB
    Let me add a check to see if opendkim is already installed.
     
  12. brijendrasial

    brijendrasial Active Member

    161
    127
    43
    Mar 21, 2018
    Ratings:
    +198
    Local Time:
    3:40 PM
    1.13.9
    10.0.22-MariaDB
    opendkim check and spamassassin added.
     
  13. pamamolf

    pamamolf Well-Known Member

    4,022
    421
    83
    May 31, 2014
    Ratings:
    +816
    Local Time:
    1:10 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Can you please add a check for Postfix also as it is already there from Centminmod setup?

    Thank you !
     
  14. brijendrasial

    brijendrasial Active Member

    161
    127
    43
    Mar 21, 2018
    Ratings:
    +198
    Local Time:
    3:40 PM
    1.13.9
    10.0.22-MariaDB
    added check for postfix also
     
  15. pamamolf

    pamamolf Well-Known Member

    4,022
    421
    83
    May 31, 2014
    Ratings:
    +816
    Local Time:
    1:10 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Maybe a menu option to delete a domain email ?
     
  16. brijendrasial

    brijendrasial Active Member

    161
    127
    43
    Mar 21, 2018
    Ratings:
    +198
    Local Time:
    3:40 PM
    1.13.9
    10.0.22-MariaDB
    Added amavisd, spamassasin and clamav support in menu option 2
     
  17. pamamolf

    pamamolf Well-Known Member

    4,022
    421
    83
    May 31, 2014
    Ratings:
    +816
    Local Time:
    1:10 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Are they optional?
     
  18. brijendrasial

    brijendrasial Active Member

    161
    127
    43
    Mar 21, 2018
    Ratings:
    +198
    Local Time:
    3:40 PM
    1.13.9
    10.0.22-MariaDB
    yes it can be installed if needed
     
  19. pamamolf

    pamamolf Well-Known Member

    4,022
    421
    83
    May 31, 2014
    Ratings:
    +816
    Local Time:
    1:10 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    The description on top should be changed :)

    Also when the script waits for a user input it will be better to have something:

    from this:

    Code:
    #?
    to
    Code:
    Please enter your selection:
    For this option:

    5) Remove Mail Server (Postfix, Dovecot, OpenDKIM and RoundCube)

    Centminmod Postfix and OpenDkim installation/configuration should NOT be removed ....

    Thank you
     
    Last edited: Aug 18, 2019
  20. eva2000

    eva2000 Administrator Staff Member

    50,459
    11,659
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,079
    Local Time:
    8:10 PM
    Nginx 1.25.x
    MariaDB 10.x
    yeah you could add to the postfix and opendkim yum already installed check, a new variable i.e. existing_postfix=y and existing_opendkim=y when they're detected to already exist and then on package removal only remove postfix and opendkimm if existing_postfix != y and existing_opendkim != y so it won't removal them if they were originally detected as installed already.