Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Make it possible to test the i-MSCP iMSCP::Listener::Postfix::Rspamd listener
# file by triggering the afterMtaBuildConf event manually.
# How to process:
# - Install the listener file that you can find at
# under the /etc/imscp/listeners.d directory, e.g: /etc/imscp/listeners.d/
# - Download that script under the /usr/local/src directory with name
# - Run the script as follows: perl /usr/local/src/
# - Check that values from your /etc/postfix/ file were updated as expected.
use strict;
use warnings;
use lib '/var/www/imscp/engine/PerlLib', '/var/www/imscp/engine/PerlVendor';
use iMSCP::Bootstrapper;
use iMSCP::Debug;
use iMSCP::EventManager;
$main::execmode = 'setup' unless defined $main::execmode;
my $bootstrapper = iMSCP::Bootstrapper->getInstance();
exit unless $bootstrapper->lock( '/var/lock/imscp_test_rspamd_listener.lock', 'nowait' );
mode => 'setup',
nolock => 1,
config_readonly => 1
setDebug( 1 );
setVerbose( 1 );
# Trigger the afterMtaBuildConf event manually.
# Postfix configuration should be automagically reloaded.
iMSCP::EventManager->getInstance()->trigger( 'afterMtaBuildConf' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.