Yes, hooks are loaded from /etc/imscp/hooks.d/*.pl, plus the code is written better.
Posts by Zero
-
-
Hello all,
I was in need of a way to automatically include hooks when the engine is executed and I ended up with a very easy modification to achieve this.
As suggested by Nuxwin in his thread (http://forum.i-mscp.net/Thread…0-rc1-4-and-newer-version) I've made sure that the HooksManager will load all the perl scripts in {CONF_DIR}/custom.d/ at initialization.
No priorities support thought.
To apply the patch:
To remove the patch:
Use at your own risk.
-
Hello, if you don't want to post publically you can use PMs, I'm not using any messenger at this time.
-
Modify your /etc/imscp/apache/00_master.conf or /etc/imscp/apache/00_master_ssl.conf and add this vhost to the end:
Code- <VirtualHost {BASE_SERVER_IP}:80> ServerAdmin {DEFAULT_ADMIN_ADDRESS} DocumentRoot {ROOT_DIR}/gui/public/tools/webmail ServerName {BASE_SERVER_VHOST} ServerAlias webmail.* <IfModule mpm_itk_module> AssignUserID {SYSTEM_USER_PREFIX}{SYSTEM_USER_MIN_UID} {SYSTEM_USER_PREFIX}{SYSTEM_USER_MIN_UID} </IfModule> #Â Only enable suexec when not running with the itk mpm <IfModule !mpm_itk_module> <IfModule suexec_module> SuexecUserGroup {SYSTEM_USER_PREFIX}{SYSTEM_USER_MIN_UID} {SYSTEM_USER_PREFIX}{SYSTEM_USER_MIN_UID} </IfModule> </IfModule> <Directory {ROOT_DIR}/gui/public/tools/webmail> Options -Indexes Includes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> <IfModule mod_fcgid.c> <Directory {ROOT_DIR}/gui/public/tools/webmail> FCGIWrapper {PHP_STARTER_DIR}/master/php{PHP_VERSION}-fcgid-starter .php Options +ExecCGI </Directory> <Directory "{PHP_STARTER_DIR}/master"> AllowOverride None Options +ExecCGI MultiViews -Indexes Order allow,deny Allow from all </Directory> </IfModule> <IfModule mod_fastcgi.c> ScriptAlias /php5/ {PHP_STARTER_DIR}/master/ <Directory "{PHP_STARTER_DIR}/master"> AllowOverride None Options +ExecCGI MultiViews -Indexes Order allow,deny Allow from all </Directory> </IfModule> <IfModule php5_module> <Directory {ROOT_DIR}/gui/public/tools/webmail> php_admin_value sendmail_path '/usr/sbin/sendmail -f webmaster@{BASE_SERVER_VHOST} -t -i' php_admin_value open_basedir "{ROOT_DIR}/gui/:{CONF_DIR}/:{MR_LOCK_FILE}:/proc/:/bin/df:/bin/mount:{RKHUNTER_LOG$ php_admin_value session.save_path "{ROOT_DIR}/gui/data/sessions/" php_admin_value upload_tmp_dir "{ROOT_DIR}/gui/data/tmp/" php_value include_path ".:{ROOT_DIR}/gui/library/:/usr/share/php" php_admin_value suhosin.session.encrypt "off" </Directory> </IfModule></VirtualHost>
Then modify /etc/imscp/bind/parts/db_e.tpl and add this after the ftp CNAME:
Rebuild all configuration files using /var/www/imscp/engine/setup/imscp-setup and everything should be ok, if something isn't working don't panic and report any error here
-
I've created a new thread for this: http://forum.i-mscp.net/Thread…s-DKIM-support-for-i-MSCP
-
Hello,
so here's a small modification to add DomainKeys (DKIM) support to i-MSCP.
Install the OpenDKIM package:
Add these lines to the /etc/opendkim.conf file:
Create the /etc/opendkim directory and create the basic files:
Open /etc/default/opendkim and uncomment the following line:
Now we need to modify the Postfix configuration, open /etc/postfix/main.cf and add these lines at the end of the file:
Restart Postfix and start OpenDKIM:
Now open your browser, and go to your phpMyAdmin installation, login and modify the max length of the domain_text field in domain_dns to 255.
Backup your /var/www/imscp/engine/PerlLib/Servers/mta/postfix.pm and replace with the one provided here.For i-MSCP 1.1.0 Beta 1 only!
Important notes:
1. Use this modified postfix.pm at your own risk!
2. The client(s) should be allowed to use the built-in DNS manager otherwise the TXT record couldn't be generated!I'm sorry if something is wrong, but I'm tired, sorry
-
When I get home I'll try.
Thanks.
-
Hello,
I've modified the addDmn function in postfix.pm to generate dkim files, the only thing I need to do now is to contact the iMSCP daemon and tell him to regenerate the config files (the script add a record to the domain_dns table) I've tried this:
I also added this to the top of the file:
No errors when running the engine but the DNS file doesn't change.
Any advice? -
Hello all,
I'm trying to develop an addon for the backend of i-MSCP to add support for DomainKeys, I'm not a Perl developer (mainly PHP) and I'm watching the files under /var/www/imscp/engine/PerlLib to get some inputs but I'm stucked.
I would like to ask the developers some things:
There is a particoular function that get called to register the hooks inside the addon?
Hooks can be attached to all the functions inside /var/www/engine/PerlLib/Servers/mta/postfix.pm or only to some functions inside /var/www/engine/PerlLib/Servers/mta/postfix/installer.pm (I think I've seen some calls to the callbacks array) ?Thanks everyone!