Posts by texxasrulez

    I am working on some plugins that needs unique URL's for each user. Specifically it is for xtraroundcubeplugins with caldav calendar and carddav contact plugin.

    Does anyone know how to pass that info within the config file? I have looked through forum and cannot find any documentation spelling that out. Looking at listener files, that info is passed as "https://$data->{'DOMAIN_NAME'}" or "'BASE_SERVER_VHOST'" but I throw an exception using these methods. Any help would be appreciated ...


    I am using https://www.%d and am achieving most of what I want. I will figure this out ...

    i-MSCP Control Panel Installation & Configuration Tips & Tricks for Debian 9

    Plugin Installation & Setup Tips

    All information contained in this post can be found throughout this forum. I have consolidated all in one place & added what I have learned since 2016 when I discovered i-MSCP.

    Before attempting to install & activate plugins, it is highly recommended to install, if not installed at the beginning of your server setup, ALL packages required by i-MSCP Plugins IMHO ...

    I tried to break it down in a very detailed, simplistic manner below to have a quick, easy & hopefully pain free install & configuration of your system.

    ___________________________________________________________________________________________________________________________________

    Required Package Install Information

    Open a SSH Terminal Session with an account that has SU privileges & execute the following commands for the plugins you wish to use

    ClamAV

    `sudo apt-get install clamav clamav-base clamav-daemon clamav-freshclam`

    `clamav-milter`

    `sudo service clamav-freshclam stop`

    `sudo freshclam`

    `sudo service clamav-freshclam start`

    `sudo service clamav-daemon restart`


    Cron Jobs

    `sudo apt-get install msmtp`


    Instant SSH

    `sudo apt-get install flex libpam-chroot python-magic strace`


    LetsEncrypt

    `sudo apt-get install certbot python-certbot-apache`


    Mailgraph

    `sudo apt-get --no-install-recommends install mailgraph`


    Mailman

    `sudo apt-get install mailman`

    `newlist mailman`

    `service mailman restart`


    Monitorix

    `apt-get install mailgraph librrds-perl`

    `apt-get install rrdtool libmime-lite-perl libhttp-server-simple-perl libhttp-server-simple-perl libconfig-general-perl librrds-perl`

    `cd /usr/local/src`

    `wget https://www.monitorix.org/monitorix_version-izzy1_all.deb`

    `dpkg -i monitorix_version-izzy1_all.deb`


    OpenDKIM

    `sudo apt-get install opendkim opendkim-tools`


    PhpSwitcher

    All packages for this plugin should already be installed. Detailed instructions to install & configure multiple PHP Versions & a couple modules shown below.


    Policy SPF

    `sudo apt-get install postfix-policyd-spf-perl`


    PolicyD Weight

    `sudo apt-get install policyd-weight`


    Postgrey

    `sudo apt-get install postgrey`


    Spamassassin

    `sudo apt-get install spamassassin spamass-milter libmail-dkim-perl libnet-ident-perl libencode-detect-perl pyzor razor`

    `/etc/init.d/spamass-milter stop`

    `/etc/init.d/spamassassin stop`

    `/etc/init.d/spamass-milter start`

    `/etc/init.d/spamassassin start`


    Now you should be able to install & activate plugins from the i-MSCP Panel Plugin Management Page without any errors or issues.


    ___________________________________________________________________________________________________________________________________

    Detailed PHP Switcher Plugin Setup & Configuration

    Add Additional PHP Versions

    This is the best method as it downloads, installs & registers selected PHP Version automatically

    PHP 7.2

    `sudo perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --register 7.2`


    PHP 7.3

    `sudo perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --register 7.3`


    PHP 7.4

    `sudo perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --register 7.4`


    Multiple PHP Versions should be available to choose from within i-MSCP PHP Switcher Page.


    Installing PHP Modules


    Install Imagick

    `sudo apt-get update`

    `sudo apt-get -y install libmagickwand-dev imagemagick`


    PHP 7.2

    `/opt/phpswitcher/YYYYMMDD/php7.2/bin/pecl install imagick`

    `echo 'extension = imagick.so' > /opt/phpswitcher/YYYYMMDD/php7.2/etc/php/conf.d/imagick.ini`


    PHP 7.3

    `/opt/phpswitcher/YYYYMMDD/php7.3/bin/pecl install imagick`

    `echo 'extension = imagick.so' > /opt/phpswitcher/YYYYMMDD/php7.3/etc/php/conf.d/imagick.ini`


    PHP 7.4

    `/opt/phpswitcher/YYYYMMDD/php7.4/bin/pecl install imagick`

    `echo 'extension = imagick.so' > /opt/phpswitcher/YYYYMMDD/php7.4/etc/php/conf.d/imagick.ini`


    Install APCu

    `cd /opt/phpswitcher/YYYYMMDD/php7.X/bin`

    `./pecl install channel://pecl.php.net/apcu-5.1.18`


    PHP 7.2

    `PHP_EXT_DIR=$(/opt/phpswitcher/YYYYMMDD/php7.2/bin/php-config --extension-dir)`

    `echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/YYYYMMDD/php7.2/etc/php/conf.d/02_apcu.ini`


    PHP 7.3

    `PHP_EXT_DIR=$(/opt/phpswitcher/YYYYMMDD/php7.3/bin/php-config --extension-dir)`

    `echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/YYYYMMDD/php7.3/etc/php/conf.d/02_apcu.ini`


    PHP 7.4

    `PHP_EXT_DIR=$(/opt/phpswitcher/YYYYMMDD/php7.4/bin/php-config --extension-dir)`

    `echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/YYYYMMDD/php7.4/etc/php/conf.d/02_apcu.ini`


    VERY IMPORTANT Tip!!!

    If you are using PHP Switcher & Instant SSH Plugin & have SSH enabled for Customers, all users SHOULD do the following:


    `touch ~/.profile`

    `nano ~/.profile`

    `export PATH=/opt/phpswitcher/YYYYMMDD/phpX.X/bin:$PATH`

    `source ~/.profile`

    `php -v` Not Necessary, but will verify your changes have taken effect

    In order for your SSH terminal sessions & domains PHP Version to match each other, this will make that happen and is a persistent solution.


    ___________________________________________________________________________________________________________________________________


    i-MSCP Configuration Information


    Usage: perl imscp-autoinstall [OPTION]...


    Options Expanded Options Process/Task Description
    -b, --build-only Process build steps only
    -f, --force-reinstall Force re-installation of distro packages
    -s, --skip-distro-packages Do not install/update distro packages
    -a --skip-package-update Skip i-MSCP packages update
    -c --clean-package-cache Cleanup i-MSCP package cache
    -d, --debug Force debug mode
    -h,-? --help Show this help
    -l, --listener Path to listener file
    -n, --noprompt Switch to non-interactive mode
    -p, --preseed Path to precede file
    -r, --reconfigure [item] Type help for list of allowed items
    -v --verbose Enable verbose mode
    -x, --fix-permissions Fix permissions recursively


    Reconfigure option usage

    Without any argument, this option allows to reconfigure all items. You can reconfigure a specific item by passing its name as argument.


    Available items are:

    admin | all | antirootkits | backup | filemanager | ftpd | hostnames | httpd | mailfilters | mta

    named | panel | panel_hostname | panel_ports | panel_ssl | php | po | primary_ip | servers

    services_ssl | sql | sqlmanager | ssl | system_hostname | timezone | webmails | webstats


    Listener file location & loading information


    Listener files are provided with i-MSCP download

    Within the i-MSCP release you downloaded to install i-MSCP, the listeners are in 'configs\debian\listeners.d' folder.


    Adding/Creating listener files

    `cd /etc/imscp/listeners.d` Listener file location


    Create listener file

    `nano listener_file_name.pl` Edit listener file to your needs, save & exit.


    Load Listener file to implement changes

    `perl /var/www/imscp/engine/setup/imscp-reconfigure -danv`


    ___________________________________________________________________________________________________________________________________


    Bonus Material


    Good to know Information


    How to Manually Disable Plugins using DB Server in a terminal


    In case you have issues with plugin management within i-MSCP Panel Plugin Management Page for some reason, or if you are like me, sometimes this old man forgets to disable 'CronJobs' before running imscp-reconfigure & the script fails making i-MSCP Panel inaccessible to plugin management within the Panel. The following will allow you to disable plugins from a terminal. Knowing this little tidbit of information will save you lots of time & all of your sanity.


    `mysql -u root -p` Enter root sql password when prompted


    Change to imscp database - This is IMPORTANT

    `use imscp;`


    Manually disable plugin

    `UPDATE plugin SET plugin_status = 'disabled' WHERE plugin_name = 'PluginName';` Replace 'PluginName' with the plugin name you need to disable. It is case sensitive so use the same case & spacing for the plugin name as it is displayed on the Plugin Management Page.


    Set Expiration & deletion of messages in Trash & Junk folders


    In i-MSCP Panel logged in as admin, under System Tools/Cron Jobs, create the following cronjobs set for once daily. This example will affect ALL users.


    `doveadm expunge -A mailbox INBOX.Trash savedbefore 30d`

    `doveadm expunge -A mailbox INBOX.Junk savedbefore 7d`


    More Infomation at Dovecot Wiki


    EMail Server Cert Check

    `openssl s_client -showcerts -connect mail.yourdomain.com:993 -servername mail.yourdomain.com`

    `openssl s_client -starttls smtp -showcerts -connect mail.yourdomain.com:25 -servername mail.yourdomain.com`

    ___________________________________________________________________________________________________________________________________


    More to come as I remember stuff or break something & learn something new in the process of fixing my server

    If you have any information to add to this little tutorial, I would surely appreciate it.

    I thank you all & have a great day ... :cool:
    ___________________________________________________________________________________________________________________________________

    System Details

    Debian GNU/Linux 9 (Stretch)

    PHP Ver: 7.1.33 (Default)

    MYSQL Ver: 5.7.29

    FPM/FastCGI

    ProFTPD Version 1.3.5b

    i-MSCP 1.5.3 | Build: 2018120800 | Codename: Ennio Morricone


    Plugins Installed & Active

    ClamAV - Ver. 1.3.0

    CronJobs - Ver. 1.4.1

    InstantSSH - Ver. 5.0.1

    LetsEncrypt - Ver. 3.5.0

    Mailgraph - Ver. 1.1.1

    Mailman - Ver. 2.0.4

    Monitorix - Ver. 1.2.2

    OpenDKIM - Ver. 2.0.0

    PhpSwitcher - Ver. 5.0.5 (Compiled versions installed: php7.2, php7.3, php7.4)

    PolicydSPF - Ver. 1.2.0

    PolicydWeight - Ver. 1.3.0

    Postgrey - Ver. 1.3.0

    Postscreen - Ver. 1.2.0

    RoundcubePlugins - Ver. 2.0.2

    SpamAssassin - Ver. 2.0.1

    Great quick solution provided by kess . A bit different, but a more permanent solution, is to setup your terminal to always use the PHP version to match the version you have installed via PHPSwitcher. This can be achieved by opening a SSH terminal and logging in with your domain username and execute the following:


    Create a profile file:

    touch ~/.profile


    Open that file:

    nano ~/.profile


    Add this line to file: (Use directory structure from your system to match PHP Versions you have installed)

    export PATH=/opt/phpswitcher/YYYYMMDD/phpX.X/bin:$PATH

    Save and Exit nano


    Load your profile:

    source ~/.profile


    Check your PHP Version:

    php -v


    If all went smoothly, you should be using the same version of PHP you chose in GUI for your domain in your terminal now. Your PHP Version will stay persistent every time you open a new terminal session. You shouldn't have to worry about it again until you change PHP Versions in the future.

    you are sure about this? Nuxwin stated 1 Month ago to deliver a update to thecry for testing in the "next week"... but nothing happened

    Just my humble opinion, but we all are in a crazy terrible time at the moment and maybe Nuxwin is otherwise occupied with serious issues. I don't even want to post this, but as a developer (even though small time) of OSS Projects, this stuff takes time and largly done for zero pay and very little kudos or credit.


    Give the developers the benefit of the doubt, especially now and be patient. Want to really help out? Buy some plugins or donate. I have done both and will continue to do so.

    Since Godaddy is still only offering Debian 8 for their GEN4 Servers and LTS is over in two months of this posting, I had quite the ride updating and installing my system. Only snag I ran into was an intermittent issue sending emails. I could reply, but not compose. Then the very next day, I could compose but not reply. Truly a headscratcher. Godaddy support pages or their tech support will offer ZERO info on their SMTP Relay config requirements outside of a URL. So with a little patience and a lot of time, I figured out the optimal listener file to use. I am using the USA Relay, but I am sure this will work for other regions.

    I am providing my installation steps from a fresh provisioned server with Debian 8 all the way to a completed system running Debian 9 with most plugins offered by the i-MSCP team installed and working as expected.

    Anyway, I have a great running system and here is what I did ...


    Upgrade Debian 8 to Debian 9

    sudo apt-get update

    sudo apt-get upgrade

    sudo apt-get dist-upgrade


    Edit Sources for upgrade to 9

    sudo nano /etc/apt/sources.list


    Change all instances of jessie to stretch, save, exit and continue with upgrade to 9


    sudo apt-get update

    sudo apt-get upgrade

    sudo apt-get dist-upgrade


    I took all maintaners versions and when completed, I did a manual reboot.


    Once rebooted, you can run cat /etc/os-release to verify successful upgrade to Debian 9

    Then I ran sudo apt-get autoremove to clean up some files


    Setup i-MSCP:

    Super Easy

    Run the following commands:


    cd /usr/local/src

    sudo apt-get update

    sudo apt-get --assume-yes --auto-remove --no-install-recommends dist-upgrade

    sudo apt-get -y --auto-remove --no-install-recommends install ca-certificates perl \

    whiptail wget

    sudo wget https://github.com/i-MSCP/imsc…e/1.5.3-2018120800.tar.gz

    sudo tar -xzf 1.5.3-2018120800.tar.gz

    cd imscp-1.5.3-2018120800

    sudo perl imscp-autoinstall -d


    I chose not to install Bind for my install, since I am running on my domain registrars network, but chose the options you want and let the install script complete.


    After successful installation, open a web browser and go to http://panel.yourdomain.com:8080

    The first thing I always do is install LetsEncrypt Plugin which is as simple as uploading plugin and activating it.

    Create SSL Certs for your Control Panel and Services located under the "System Tools - Let's Encrypt" tab in your control panel.

    Log out and go to https://panel.yourdomain.com:4443 for your new secure connection and install the rest of your plugins and configure i-MSCP for your needs.


    List of Plugins I use and the packages required prior to activation of plugins.


    ClamAV Install

    sudo apt-get install clamav clamav-base clamav-daemon clamav-freshclam clamav-milter

    sudo service clamav-freshclam stop

    sudo freshclam

    sudo service clamav-freshclam start

    sudo service clamav-daemon restart


    Cron Jobs Install

    sudo apt-get install msmtp


    Instant SSH Install

    sudo apt-get install flex libpam-chroot python-magic strace


    Mailgraph Install

    sudo apt-get --no-install-recommends install mailgraph


    Mailman Install

    sudo apt-get install mailman

    newlist mailman

    service mailman restart


    Monitorix Install

    apt-get install mailgraph librrds-perl

    cd /usr/local/src

    wget https://www.monitorix.org/monitorix_3.12.0-izzy1_all.deb

    apt-get install rrdtool libmime-lite-perl libhttp-server-simple-perl libhttp-server-simple-perl libconfig-general-perl librrds-perl

    dpkg -i monitorix_3.12.0-izzy1_all.deb


    OpenDKIM Install

    sudo apt-get install opendkim opendkim-tools


    PhpSwitcher

    Easy as uploading and activating plugin


    Policy SPF Install

    sudo apt-get install postfix-policyd-spf-perl


    PolicyD Weight Install

    sudo apt-get install policyd-weight


    Postgrey Install

    sudo apt-get install postgrey


    Spamassassin Install

    sudo apt-get install spamassassin spamass-milter libmail-dkim-perl libnet-ident-perl libencode-detect-perl pyzor razor


    If you were lucky, you should have a working system at this point.

    After setting up basics (reseller, customers, etc) use listener file 10_postfix_tuning.pl shown below with slight modifications to be able to send email through Godaddy's SMTP Relay. Some entries seem redundant, but didn't work reliably until I added everything shown in Example below.

    Save 10_postfix_tuning.pl in /etc/imscp/listeners.d ..

    Disable CronJobs plugin in Admin Control Panel ...

    Run the following command:

    sudo perl /var/www/imscp/engine/setup/imscp-reconfigure -danv


    Let the script do its thing and you should be good to go. (Remember to enable CronJobs Plugin)


    Example of what I used. Just change 'smtp_bind_address' to your servers public ip and/or the relayhost URL if located outside the United States.



    I have been sending, replying and every other way email can fly that I can think of with no issues.


    I hope this helps anyone who is stuck with Godaddy and having to update their outdated systems to run modern software.


    As always, I want to thank the developers for a wonderful control panel and look forward to the future.

    Have a great day! :thumbsup:



    System Details

    Debian GNU/Linux 9 (Stretch)

    PHP Ver: 7.1.33 (Default)

    MYSQL Ver: 5.7.29

    FPM/FastCGI

    ProFTPD Version 1.3.5b

    i-MSCP 1.5.3 | Build: 2018120800 | Codename: Ennio Morricone


    Plugins Installed and Active

    ClamAV - Ver. 1.3.0

    CronJobs - Ver. 1.4.1

    InstantSSH - Ver. 5.0.1

    LetsEncrypt - Ver. 3.5.0

    Mailgraph - Ver. 1.1.1

    Mailman - Ver. 2.0.4

    Monitorix - Ver. 1.2.2

    OpenDKIM - Ver. 2.0.0

    PhpSwitcher - Ver. 5.0.5 (Compiled versions installed: php7.2, php7.3, php7.4)

    PolicydSPF - Ver. 1.2.0

    PolicydWeight - Ver. 1.3.0

    Postgrey - Ver. 1.3.0

    Postscreen - Ver. 1.2.0

    RoundcubePlugins - Ver. 2.0.2

    SpamAssassin - Ver. 2.0.1

    I was wondering if there is some documentation on some specifics for the listener file 10_postfix_smarthost.pl. I am just looking for clarification on how to implement $saslAuthUser and $saslAuthPasswd entires. Do I need to specify a single username and password or does this support parameters such as %u for username and %p for password? I do appreciate some assistance and love the work you do.


    System Details

    Debian GNU/Linux 9 (Stretch)

    PHP Ver: 7.1.33 (Default)

    MYSQL Ver: 5.7.29

    FPM/FastCGI

    ProFTPD Version 1.3.5b

    i-MSCP 1.5.3 | Build: 2018120800 | Codename: Ennio Morricone


    Plugins Installed and Active

    AdminerSQL - Ver. 1.1.0

    ClamAV - Ver. 1.3.0

    CronJobs - Ver. 1.4.1

    InstantSSH - Ver. 5.0.1

    LetsEncrypt - Ver. 3.5.0

    Mailgraph - Ver. 1.1.1

    Mailman - Ver. 2.0.4

    Monitorix - Ver. 1.2.2

    OpenDKIM - Ver. 2.0.0

    PhpSwitcher - Ver. 5.0.5

    PolicydSPF - Ver. 1.2.0

    PolicydWeight - Ver. 1.3.0

    Postgrey - Ver. 1.3.0

    Postscreen - Ver. 1.2.0

    RoundcubePlugins - Ver. 2.0.2

    SpamAssassin - Ver. 2.0.1

    I am back after almost 3 years of no server of my own, now I have one again.

    I do want to say that I missed i-MSCP and how awesome and easy it is to setup and get running. Frees up more time to work on my own OSS projects. Great Job on the continued development.


    I have one minor little issue/request. I do not remember from a while back and maybe I missed something, and I did do a search but couldn't find anything in forum pertaining to this, so I apologize if this is duplicated ... :(


    I use sauserprefs (1.18.1) with Roundcube (1.4.3) and have it configured to use the database i-MSCP creates for spamassassin upon plugin install and every time I run a reconfig or update, the database password changes. It is easy as pie to find the password (/etc/spamassassin/00_imscp.cf) and change the RC Plugin password accordingly but it would be nice to be able to specify that password and let it be persistent within the plugin install so I don't have to remember to change sauserprefs password too. I am getting older and have CRS disorder and I know this old man would appreciate it. Just my humble opinion.


    As I always like to add, Thank you very much for your hard work and keep up the great work ... :thumbsup:



    System Details

    Debian GNU/Linux 9 (Stretch)

    PHP Ver: 7.1.33 (Default)

    MYSQL Ver: 5.7.29

    FPM/FastCGI

    ProFTPD Version 1.3.5b

    i-MSCP 1.5.3 | Build: 2018120800 | Codename: Ennio Morricone


    Plugins Installed and Active

    AdminerSQL - Ver. 1.1.0

    ClamAV - Ver. 1.3.0

    CronJobs - Ver. 1.4.1

    InstantSSH - Ver. 5.0.1

    LetsEncrypt - Ver. 3.5.0

    Mailgraph - Ver. 1.1.1

    Mailman - Ver. 2.0.4

    Monitorix - Ver. 1.2.2

    OpenDKIM - Ver. 2.0.0

    PhpSwitcher - Ver. 5.0.5

    PolicydSPF - Ver. 1.2.0

    PolicydWeight - Ver. 1.3.0

    Postgrey - Ver. 1.3.0

    Postscreen - Ver. 1.2.0

    RoundcubePlugins - Ver. 2.0.2

    SpamAssassin - Ver. 2.0.1