[PLUGIN] CustomBuild 2.0

trix.hosting

Verified User
Joined
Jun 21, 2016
Messages
65
Location
Tucuman - Argentina
mail_compress=yes should be safe to use, it just gzips new emails received, old emails are left untouched. To gzip old emails, dovecot_compress.sh should be used. It worked fine in testing environment to compress old emails, however, it hasn't been extensively tested (no feedback from production boxes yet), so there might be minor issues with it :)
Works Well, it's do what it's have to do.
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
Hi everyone,

I wrote a script to run the compression against every user/domain/email on the server (all at once or a specific one).

Code:
#!/bin/bash

if [ "$1" != "" ]; then
        USERS=$1
        if [ ! -d /usr/local/directadmin/data/users/$USERS ]; then
                echo "Invalid system user."
                exit 1;
        fi
else
        USERS="`ls /usr/local/directadmin/data/users/`"
fi

if [ "$2" != "" ]; then
        DOMAINS=$2
        if [ ! -d /home/$USERS/imap/$DOMAINS ]; then
                echo "Invalid domain."
                exit 2;
        fi
fi

if [ "$3" != "" ]; then
        ACCOUNTS=$3
        if [ ! -d /home/$USERS/imap/$DOMAINS/$ACCOUNTS ]; then
                echo "Invalid account."
                exit 3;
        fi
fi

for USER in $USERS;
        do
        echo "Starting user $USER"
        if [ "$2" = "" ]; then
                DOMAINS="`ls /home/$USER/imap/`"
        fi
        for DOMAIN in $DOMAINS;
                do
                echo "Checking domain $DOMAIN"
                if [ "`ls /home/$USER/imap/$DOMAIN/`" != "" ]; then
                        if [ -d /home/$USER/imap/$DOMAIN -a "$3" = "" ]; then
                                ACCOUNTS="`ls /home/$USER/imap/$DOMAIN/`"
                        fi
                        for ACCOUNT in $ACCOUNTS;
                                do
                                if [ -d /home/$USER/imap/$DOMAIN/$ACCOUNT/Maildir/cur ]; then
                                        echo "Processing E-Mail Address $ACCOUNT@$DOMAIN"
                                        /usr/local/directadmin/scripts/dovecot_compress.sh /home/$USER/imap/$DOMAIN/$ACCOUNT/Maildir
                                else
                                        echo "E-Mail Address $ACCOUNT@$DOMAIN have no stored E-mails"
                                fi
                        done
                        ACCOUNT=""
                else
                        echo "Domain $DOMAIN have no E-Mail Addresses"
                fi
        done
        DOMAIN=""
        echo ""
done
#EDIT: I have improved the script so that you now can run it per user, per domain, per email
Ex:
./dovecot_compress.sh # Will process all users with all domains and all email accounts
./dovecot_compress.sh USER1 # Will process USER1 with all domains and all email accounts
./dovecot_compress.sh USER1 DOMAIN2 # Will process domain DOMAIN2 for USER1 and all email accounts
./dovecot_compress.sh USER1 DOMAIN2 EMAIL3 # Will process only EMAIL3 for DOMAIN2 of USER1

Please note, EMAIL is considered to be only the part before the @, so for andrea@test-domain.it it would be andrea.
Let's pretend that domain it's owned by user zxy, the command to check only that email would be:
./dovecot_compress.sh zxy test-domain.it andrea

Hope this helps.

Best regards
 
Last edited:

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
Additional note, the "dovecot_compress.sh" seems to have a problem with folder with a white space in the name.
Not exactly the script, but the for loop doesn't store in the "directory" variable the whole folder name, it cut it at the white space.
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
Please note everyone.
If you have a custom dovecot config for plugins in: /usr/local/directadmin/custombuild/custom/dovecot/conf/mail_plugins.conf
Make sure it does include "zlib" in the list :)
 

DewlanceVPS

Verified User
Joined
Oct 3, 2016
Messages
86
Hello,
Please let me know your feedback, feature requests, bugs etc.
Lot of thanks for creating this, Very useful for us.

Where config file of changes in "Edit Options" save?


I want to copy that file and transfer it in my new DA server and then ran build all command ;)
 

D9Dan

New member
Joined
Jul 9, 2019
Messages
2
I've just come across this thread after playing around with DA for the past few days using nothing but the CLI. I'm interested to have a play around with the GUI but I'm having real trouble getting the plugin to show up in the admin GUI.

I've verified that I do have custombuild 2.0 installed:

Code:
[root@datest custombuild]# ./build | grep Version
 | Version: 2.0.0 (rev: 2153)
And that PHP is working correctly on the server, but nothing is showing up in the control panel.

Is there some really obvious step I'm missing to get things working correctly?

Thanks!
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,328
Location
LT, EU
I've just come across this thread after playing around with DA for the past few days using nothing but the CLI. I'm interested to have a play around with the GUI but I'm having real trouble getting the plugin to show up in the admin GUI.

I've verified that I do have custombuild 2.0 installed:

Code:
[root@datest custombuild]# ./build | grep Version
 | Version: 2.0.0 (rev: 2153)
And that PHP is working correctly on the server, but nothing is showing up in the control panel.

Is there some really obvious step I'm missing to get things working correctly?

Thanks!
Did you install it as a plugin in plugin manager? http://www.custombuild.eu/plugin/custombuild.tar.gz
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,328
Location
LT, EU
Lot of thanks for creating this, Very useful for us.

Where config file of changes in "Edit Options" save?


I want to copy that file and transfer it in my new DA server and then ran build all command ;)
/usr/local/directadmin/custombuild/options.conf
 

ebersol

Verified User
Joined
Jul 2, 2019
Messages
9
Did you install it as a plugin in plugin manager? http://www.custombuild.eu/plugin/custombuild.tar.gz
Erro install. What can it be?

Error unpacking /usr/local/directadmin/plugins/custombuild/plugin.tar.gz : Error restoring file /usr/local/directadmin/plugins/custombuild/plugin.tar.gz :
gzip: stdin: not in gzip format
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now
: tar returned error code 2
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,328
Location
LT, EU
Erro install. What can it be?

Error unpacking /usr/local/directadmin/plugins/custombuild/plugin.tar.gz : Error restoring file /usr/local/directadmin/plugins/custombuild/plugin.tar.gz :
gzip: stdin: not in gzip format
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now
: tar returned error code 2
Was this the output from "Plugin manager" ?
 

gnsw

New member
Joined
Jul 11, 2019
Messages
2
Was this the output from "Plugin manager" ?
same error here. (output from "Plugin manager")

"Error unpacking /usr/local/directadmin/plugins/custombuild/plugin.tar.gz : Error restoring file /usr/local/directadmin/plugins/custombuild/plugin.tar.gz :
gzip: stdin: not in gzip format
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now
: tar returned error code 2

No install.sh script was found. Script not executed.
Error with install script"
 

gnsw

New member
Joined
Jul 11, 2019
Messages
2
same error here. (output from "Plugin manager")

"Error unpacking /usr/local/directadmin/plugins/custombuild/plugin.tar.gz : Error restoring file /usr/local/directadmin/plugins/custombuild/plugin.tar.gz :
gzip: stdin: not in gzip format
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now
: tar returned error code 2

No install.sh script was found. Script not executed.
Error with install script"
If installed from the url the installation is completed without errors, the error occurs when the plugin is downloaded locally.
 

bdacus01

Verified User
Joined
Jul 22, 2017
Messages
475
Location
Murfreesboro
if you go into Plugin Manager >do you see it in the list at all?

if yes click on the + sign choose uninstall
repeat if that fails use delete

then go to ADD > choose url

paste in http://www.custombuild.eu/plugin/custombuild.tar.gz

enter your admin password
mark install after upload
click Install

IF you happened to have uploaded the tar.gz file to the system you may want to go and delete it before you do the above.

I have found the Local method won't work for CB plugin.

I wish there was a cmd line way for this awesome plugin.... hint hint..
 

Peter Laws

Verified User
Joined
Sep 13, 2008
Messages
1,747
Location
London UK
With the Evo skin, the output window is sooooooooo slow..... I thought why? It turns out that something is using my home connection when compiling or it's scrolling, as my download speed hits 100% .....

Not usable at all
 

frednoob

Verified User
Joined
Feb 15, 2007
Messages
92
DONE. Rebuild all back.

hello.

need help.

my DA cannot access today, after i install CustomBuild.

yesterday i can xs and update my service via control panel.

today when i want to xs control panel and my web, it gave me 503 error.

please help.

tq
 
Last edited:

bdacus01

Verified User
Joined
Jul 22, 2017
Messages
475
Location
Murfreesboro
DONE. Rebuild all back.

hello.

need help.

my DA cannot access today, after i install CustomBuild.

yesterday i can xs and update my service via control panel.

today when i want to xs control panel and my web, it gave me 503 error.

please help.

tq
so you are good?
 

aniket

New member
Joined
Jul 30, 2019
Messages
4
How to install Directadmin panel in CentOS 7 Virtual Machine

Hey! I need a little help I have Linux Manjaro OS and I created a Virtual Machine of CentOS 7 on Linux Manjaro... I generated license for Linux Manjaro and I use that license in CentOS 7 the installation succeeded but the panel didn't started... Is it possible to install Directadmin panel in CentOS Virtual Machine using license of Linux Manjaro???
If not than how can I install Directadmin in CentOS 7 Virtual Machine
 

ikkeben

Verified User
Joined
May 22, 2014
Messages
636
Location
Netherlands Germany
Wrong topic here.

This is for plugin


Don't know that VM but if you have DA license and on/behind NAT or LAN, so no fixed external ip on the DA BOX/VM

read this and follow links for those, if one or more of those topics are more apropiate then go there, if not open new topic!

https://forum.directadmin.com/showthread.php?t=58324&p=298473#post298473

Are there any messages / log files.

Normally the License have to be for the used OS for the DA BOX/VM!

EDIT: some info license and OS https://forum.directadmin.com/showthread.php?t=58433&p=299056#post299056
 
Last edited:
Top