Join the community today
Register Now

Install Mail Server on Centminmod

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

  1. Kintaro

    Kintaro Member

    79
    5
    8
    Dec 2, 2016
    Italy
    Ratings:
    +19
    Local Time:
    9:16 AM
    1.15.x
    MariaDB 10
    I'm trying to install the mailserver, the script is asking me for "hostname" and "domain".

    for hostname I need to enter "host.domain.ext"

    Am I right? Or for hostname it means only the specific third level domain (in my example "host")?
     
  2. brijendrasial

    brijendrasial Active Member

    126
    94
    28
    Mar 21, 2018
    Ratings:
    +148
    Local Time:
    1:46 PM
    1.13.9
    10.0.22-MariaDB
    Hostname is hostname of your server. Like server.yourdomain.com

    uname -n will print the hostname of server and it should be valid FQDN.

    hostname.png
     
  3. EckyBrazzz

    EckyBrazzz Active Member

    873
    183
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +334
    Local Time:
    5:16 AM
    Latest
    Latest
    For those with experience in setting up and trouble shooting a mail server, I would say, go for it.

    For others, wait a bit until this script gets more mature and @brijendrasial has a manual at GitHub.

    Now every time he fixes things on my server, fix his script on GitHub to get better.
     
  4. brijendrasial

    brijendrasial Active Member

    126
    94
    28
    Mar 21, 2018
    Ratings:
    +148
    Local Time:
    1:46 PM
    1.13.9
    10.0.22-MariaDB
    Email forwarding is now supported

    ccm_email.png
     
  5. EckyBrazzz

    EckyBrazzz Active Member

    873
    183
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +334
    Local Time:
    5:16 AM
    Latest
    Latest
    Time to wait to have extra option on Centmin menu. Now 24 = exit, @eva2000 implant the script of @brijendrasial and create a option 25 to exit Centmin

    Or at least create an option with all add-ons for Centmin, that would be cool. Now option 21 TBA (without any working function), change it to all add-ons, to make things more organized.
     
    Last edited: Feb 9, 2020
  6. brainlet2000

    brainlet2000 Member

    34
    1
    8
    Jan 21, 2020
    Ratings:
    +4
    Local Time:
    9:16 AM
    1.17.7
    10.3.21
    I don't know what you mean with that. I tried to go onto the IPs/links assigned by the script at the end to access roundcube but doesn't work and gives that error.
     
  7. brijendrasial

    brijendrasial Active Member

    126
    94
    28
    Mar 21, 2018
    Ratings:
    +148
    Local Time:
    1:46 PM
    1.13.9
    10.0.22-MariaDB
    If you can privately share the IP .
     
  8. brijendrasial

    brijendrasial Active Member

    126
    94
    28
    Mar 21, 2018
    Ratings:
    +148
    Local Time:
    1:46 PM
    1.13.9
    10.0.22-MariaDB
    How to check if amavisd is blocking outgoing spam. Send email with subject
    XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X

    You will see mail wont be delivered and in logs you will find.

    bllock.png
     
  9. brainlet2000

    brainlet2000 Member

    34
    1
    8
    Jan 21, 2020
    Ratings:
    +4
    Local Time:
    9:16 AM
    1.17.7
    10.3.21
    I'd prefer not to. Can you maybe provide some documentation or share what the output of the script is supposed to be with a successful result?
     
  10. gamal

    gamal Member

    97
    8
    8
    Jan 31, 2018
    Ratings:
    +11
    Local Time:
    6:16 PM
    1.13.8
    hello,

    thank you for providing such a valuable script to centmin, i need to try it soon, but i have one question in mind:

    on my droplet i have 2 websites installed on the same droplet, can i have the mail server handle emails for both websites like:
    • info@xyz.com
    • about@123.com
    Regards
     
  11. brijendrasial

    brijendrasial Active Member

    126
    94
    28
    Mar 21, 2018
    Ratings:
    +148
    Local Time:
    1:46 PM
    1.13.9
    10.0.22-MariaDB
    Yes for N number of domains.
     
  12. gamal

    gamal Member

    97
    8
    8
    Jan 31, 2018
    Ratings:
    +11
    Local Time:
    6:16 PM
    1.13.8
    after trying to install addons, here what happens:

    Code:
    Job for clamd@scan.service failed because a fatal signal was delivered to the control process. See "systemctl status clamd@scan.service" and "journalctl -xe" for details.
    Job for clamd@amavisd.service failed because a fatal signal was delivered to the control process. See "systemctl status clamd@amavisd.service" and "journalctl -xe" for details.
    
    Code:
     systemctl status clamd                                                                                                             @amavisd.service
    ● clamd@amavisd.service - clamd scanner (amavisd) daemon
       Loaded: loaded (/usr/lib/systemd/system/clamd@.service; enabled; vendor prese                                                                                                             t: disabled)
       Active: activating (start) since Thu 2020-03-26 15:42:19 UTC; 27s ago
         Docs: man:clamd(8)
               man:clamd.conf(5)
               https://www.clamav.net/documents/
      Control: 35203 (clamd)
       CGroup: /system.slice/system-clamd.slice/clamd@amavisd.service
               └─35203 /usr/sbin/clamd -c /etc/clamd.d/amavisd.conf
    
    Mar 26 15:42:19 alpha.3alamtaney.com systemd[1]: Starting clamd scanner (ama....
    Mar 26 15:42:20 alpha.3alamtaney.com clamd[35203]: Received 0 file descriptor...
    Mar 26 15:42:20 alpha.3alamtaney.com clamd[35203]: clamd daemon 0.102.2 (OS: ...
    Mar 26 15:42:20 alpha.3alamtaney.com clamd[35203]: Running as user amavis (UI...
    Mar 26 15:42:20 alpha.3alamtaney.com clamd[35203]: Log file size limited to 1...
    Mar 26 15:42:20 alpha.3alamtaney.com clamd[35203]: Reading databases from /va...
    Mar 26 15:42:20 alpha.3alamtaney.com clamd[35203]: Not loading PUA signatures.
    Mar 26 15:42:20 alpha.3alamtaney.com clamd[35203]: Bytecode: Security mode se...
    Hint: Some lines were ellipsized, use -l to show in full.
    
    Code:
    journalctl -xe
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: [35135]    89 35135    22629      280      45        0             0 trivial-rewrite
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: [35158]    89 35158    22720      310      45        0             0 lmtp
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: [35230]    89 35230    22968      544      48        0             0 smtpd
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: [35234]     0 35234    20653      310      44        0             0 auth
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: [35236]    89 35236    22911      555      45        0             0 smtp
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: [35238]    89 35238    22637      273      44        0             0 bounce
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: [35290]  1000 35290   133698     8035     157      682             0 php-fpm
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: [35297]   992 35297   195210   164649     370        0             0 clamd
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: [35319]  1000 35319   174397    17830     202     1210             0 php-fpm
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: [35321]   991 35321   133604   109452     262        0             0 clamd
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: [35333]     0 35333    28243      301      58        0             0 sshd
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: [35355]     0 35355    28926      178      11        0             0 cminfo
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: [35356]     0 35356   105429     1606     141        0             0 php
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: [35357]     0 35357    28386       38      11        0             0 awk
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: [35358]     0 35358    26991       39      10        0             0 head
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: Out of memory: Kill process 35297 (clamd) score 274 or sacrifice child
    Mar 26 15:43:51 alpha.3alamtaney.com kernel: Killed process 35297 (clamd) total-vm:780840kB, anon-rss:658312kB, file-rss:284kB, shmem-rss:0kB
    Mar 26 15:43:52 alpha.3alamtaney.com systemd[1]: clamd@amavisd.service: control process exited, code=killed status=9
    Mar 26 15:43:52 alpha.3alamtaney.com systemd[1]: Failed to start clamd scanner (amavisd) daemon.
    -- Subject: Unit clamd@amavisd.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit clamd@amavisd.service has failed.
    --
    -- The result is failed.
    Mar 26 15:43:52 alpha.3alamtaney.com systemd[1]: Unit clamd@amavisd.service entered failed state.
    Mar 26 15:43:53 alpha.3alamtaney.com systemd[1]: clamd@amavisd.service failed.
    Mar 26 15:43:53 alpha.3alamtaney.com systemd[1]: clamd@amavisd.service holdoff time over, scheduling restart.
    Mar 26 15:43:53 alpha.3alamtaney.com systemd[1]: Stopped clamd scanner (amavisd) daemon.
    -- Subject: Unit clamd@amavisd.service has finished shutting down
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit clamd@amavisd.service has finished shutting down.
    Mar 26 15:43:53 alpha.3alamtaney.com systemd[1]: Starting clamd scanner (amavisd) daemon...
    -- Subject: Unit clamd@amavisd.service has begun start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit clamd@amavisd.service has begun starting up.
    Mar 26 15:43:53 alpha.3alamtaney.com clamd[35372]: Received 0 file descriptor(s) from systemd.
    Mar 26 15:43:53 alpha.3alamtaney.com clamd[35372]: clamd daemon 0.102.2 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
    Mar 26 15:43:53 alpha.3alamtaney.com clamd[35372]: Running as user amavis (UID 992, GID 989)
    Mar 26 15:43:53 alpha.3alamtaney.com clamd[35372]: Log file size limited to 1048576 bytes.
    Mar 26 15:43:53 alpha.3alamtaney.com clamd[35372]: Reading databases from /var/lib/clamav
    Mar 26 15:43:53 alpha.3alamtaney.com clamd[35372]: Not loading PUA signatures.
    Mar 26 15:43:53 alpha.3alamtaney.com clamd[35372]: Bytecode: Security mode set to "TrustSigned".
    
    also when trying to send mail through roundcube i got this error:


    Code:
    SMTP Error (535): Authentication failed.
     
    Last edited: Mar 27, 2020
  13. brijendrasial

    brijendrasial Active Member

    126
    94
    28
    Mar 21, 2018
    Ratings:
    +148
    Local Time:
    1:46 PM
    1.13.9
    10.0.22-MariaDB
    Its memory issue I believe.
     
  14. brijendrasial

    brijendrasial Active Member

    126
    94
    28
    Mar 21, 2018
    Ratings:
    +148
    Local Time:
    1:46 PM
    1.13.9
    10.0.22-MariaDB
    Updated the script with latest roundcube version, ssl bug and many more.
     
  15. gamal

    gamal Member

    97
    8
    8
    Jan 31, 2018
    Ratings:
    +11
    Local Time:
    6:16 PM
    1.13.8
    i have updated to the latest version 1.4.2 , still i cant send or recieve any mails so far..
     
  16. brijendrasial

    brijendrasial Active Member

    126
    94
    28
    Mar 21, 2018
    Ratings:
    +148
    Local Time:
    1:46 PM
    1.13.9
    10.0.22-MariaDB
    Can you please delete everything from option 3,8,9. Download the script again from github and then install everything and check. If that doesnt work I will request log from you.
     
  17. gamal

    gamal Member

    97
    8
    8
    Jan 31, 2018
    Ratings:
    +11
    Local Time:
    6:16 PM
    1.13.8
    i have installed the script from scratch after uninstalling 3,8,9, still same errors happens.
    how can i show you the logs ?
     
  18. brijendrasial

    brijendrasial Active Member

    126
    94
    28
    Mar 21, 2018
    Ratings:
    +148
    Local Time:
    1:46 PM
    1.13.9
    10.0.22-MariaDB
    What error exactly you are getting.
     
  19. gamal

    gamal Member

    97
    8
    8
    Jan 31, 2018
    Ratings:
    +11
    Local Time:
    6:16 PM
    1.13.8
    Can't send or recieve any emails from roundcube
    Code:
    SMTP Error (535): Authentication failed.
    
    addons dont want to install
    Code:
    [18:59][root@alpha.3alamtaney.com CentMinMod_MailServer]# journalctl -xe
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [ 2114]     0  2114    76646     1022      82      278             0 rsyslogd
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [19244]   996 19244   256945    25868     215    40546             0 mysqld
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [18381]     0 18381    38691       66      78      287             0 sshd
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [18391]     0 18391    29126       75      13      285             0 bash
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [20898]     0 20898    43195     1060      41     4600             0 lfd - sleeping
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [47898]     0 47898    45602        2      45      240             0 crond
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [47916]     0 47916    28296        0      11       47             0 freshclam-sleep
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [47926]     0 47926    26989        0      10       22             0 sleep
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [61663]   994 61663    23835        1      44      237             0 opendkim
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [61664]   994 61664    46400      122      50      240             0 opendkim
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [61791]     0 61791    10748       35      26       81             0 dovecot
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [61808]    97 61808     2437       24      10       23             0 anvil
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [61809]     0 61809     2470       28      11       59             0 log
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [61812]     0 61812     3162      136      11       72             0 config
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [62361]     0 62361    71140      626      92    14633             0 /usr/bin/spamd
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [62369]     0 62369    71578    11182      92     4508             0 spamd child
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [62370]     0 62370    71140      294      87    14965             0 spamd child
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [62471]   992 62471    90687      134     126    24473             0 /usr/sbin/amavi
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [62488]   992 62488    91922    13958     127    11481             0 /usr/sbin/amavi
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [62489]   992 62489    91286    13542     126    11286             0 /usr/sbin/amavi
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [62678]     0 62678    22602      285      42        0             0 master
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [62679]    89 62679    22628      279      42        0             0 pickup
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [62680]    89 62680    22665      303      45        0             0 qmgr
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [63036]     0 63036    43616    11685      66     4435             0 nginx
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [63038]  1000 63038    55904    18294      93     8772             0 nginx
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [63051]     0 63051   146597     1156     130      579             0 php-fpm
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [63137]    89 63137    22631       38      46      247             0 tlsmgr
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [65240]     0 65240    20653      309      41        0             0 auth
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [65500]  1000 65500   281230    45649     446      514             0 php-fpm
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [ 1800]  1000  1800   273681    37972     432      516             0 php-fpm
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [ 2368]   992  2368   182921   152497     348        0             0 clamd
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [ 2378]   991  2378   105687    84245     206        0             0 clamd
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [ 2380]  1000  2380   152424    17667     193      547             0 php-fpm
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [ 2388]     0  2388     3533       52      11        0             0 sshd
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: [ 2390]     0  2390    31581       30      16      138             0 crond
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: Out of memory: Kill process 2368 (clamd) score 254 or sacrifice child
    Mar 26 19:00:02 alpha.3alamtaney.com kernel: Killed process 2368 (clamd) total-vm:731684kB, anon-rss:609740kB, file-rss:248kB, shmem-rss:0kB
    Mar 26 19:00:02 alpha.3alamtaney.com systemd[1]: clamd@amavisd.service: control process exited, code=killed status=9
    Mar 26 19:00:02 alpha.3alamtaney.com systemd[1]: Failed to start clamd scanner (amavisd) daemon.
    -- Subject: Unit clamd@amavisd.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit clamd@amavisd.service has failed.
    --
    -- The result is failed.
    Mar 26 19:00:03 alpha.3alamtaney.com systemd[1]: Unit clamd@amavisd.service entered failed state.
    Mar 26 19:00:03 alpha.3alamtaney.com systemd[1]: clamd@amavisd.service failed.
    
    Code:
    [19:00][root@alpha.3alamtaney.com CentMinMod_MailServer]#  systemctl status clamd                                                                                                             @amavisd.service
    Unit clamd.service could not be found.
    Failed to get properties: Unit name @amavisd.service is not valid.
    
     
  20. brijendrasial

    brijendrasial Active Member

    126
    94
    28
    Mar 21, 2018
    Ratings:
    +148
    Local Time:
    1:46 PM
    1.13.9
    10.0.22-MariaDB
    Its showing out of memory.

    systemctl start clamd@scan
    systemctl start clamd@amavisd