Not work compability cmq for directadmin

Post Reply
rfenrih
Junior Member
Posts: 1
Joined: 11 Dec 2024, 17:08

Not work compability cmq for directadmin

Post by rfenrih »

We checked the issue with CS Mail Queue Plugin closer with one of our developers and were able to apply the workaround in the same way as it is applied for CSF PlugIn. Added this 2 lines:

unless (-e "/var/lib/csf/csf.da.skip") {
...
}

root@server:~# grep -R -A22 "csf.da.skip" /usr/local/directadmin/plugins/cmq/exec/da_cmq.cgi
unless (-e "/var/lib/csf/csf.da.skip") {
if ($ENV{SESSION_ID} =~ /^\w+$/) {
open (my $SESSION, "<", "/usr/local/directadmin/data/sessions/da_sess_".$ENV{SESSION_ID}) or die "Security Error: No valid session key for [$ENV{SESSION_ID}]";
flock ($SESSION, LOCK_SH);
my @data = <$SESSION>;
close ($SESSION);
chomp @data;
foreach my $line (@data) {
my ($name, $value) = split(/\=/,$line);
$session{$name} = $value;
}
}
if (($session{key} eq "") or ($session{ip} eq "") or ($session{ip} ne $ENV{REMOTE_ADDR}) or ($session{key} ne $ENV{SESSION_KEY})) {
print "Security Error: No valid session key";
exit;
}

my ($ppid, $pexe) = &getexe(getppid());
if ($pexe ne "/usr/local/directadmin/directadmin") {
print "Security Error: Invalid parent";
exit;
}
}
root@server:~#

After that CS Mail Queue started working fine in DA version 1.672.
But it is not secure fix, so we reverted everything back.

So, the problem comes from PlugIn that is provided by ConfigServer company:

https://configserver.com/configserver-mail-queues-cmq/

and they need to fix their PlugIn.
Please try contacting them with such request.

Thank you.
Please correct plugins not work version cmq for directadmin DA version 1.672.
Post Reply