Extra parameters cannot be set in a config file. *Some* parameters can, but only those that are parsed by Restartsrv.pm which is the module that /scripts/restartsrv_* use when doing a service restart:
Code:
sub getspamdopts {
my $cpspamdconf = '/etc/cpspamd.conf';
my $spamdoptions = '';
my $socketpath = '';
my $allowedips = '--allowed-ips=127.0.0.1';
my $maxconnperchild = '';
my $maxchildren = '--max-children=5';
my $maxspare = '';
my $pidfile = '--pidfile=/var/run/spamd.pid';
my $localonly = '';
my $timeouttcp = '';
my $timeoutchild = '';
if ( -e $cpspamdconf ) {
open( SPAMD, "<", $cpspamdconf );
while (<SPAMD>) {
if ( !(/^[\s\t]*$/) && !(/^[\s\t]*\#.*$/) ) {
chomp();
my ( $option, $value ) = split( '=', $_ );
next if ( !defined $value || $value eq '' );
if ( $option eq 'allowedips' ) {
$allowedips = "--allowed-ips=${value}";
}
elsif ( $option eq 'socketpath' ) {
$socketpath = "--socketpath=${value}";
}
elsif ( $option eq 'maxconnperchild' ) {
$maxconnperchild = "--max-conn-per-child=${value}";
}
elsif ( $option eq 'maxspare' ) {
$maxspare = "--max-spare=${value}";
}
elsif ( $option eq 'maxchildren' ) {
$maxchildren = "--max-children=${value}";
}
elsif ( $option eq 'pidfile' ) {
$pidfile = "--pidfile=${value}";
}
elsif ( $option eq 'local' ) {
$localonly = '--local';
}
elsif ( $option eq 'timeouttcp' ) {
$timeouttcp = "--timeout-tcp=${value}";
}
elsif ( $option eq 'timeoutchild' ) {
$timeoutchild = "--timeout-child=${value}";
}
}
}
}
close(SPAMD);
$spamdoptions = $localonly . ' ' . $timeoutchild . ' ' . $timeouttcp . ' ' . ( $socketpath ? $socketpath : $allowedips ) . ' ' . $maxconnperchild . ' ' . $pidfile . ' ' . $maxchildren . ' ' . $maxspare;
return $spamdoptions;
}
Only the options you see in that function can be set as those are the ones returned to $spamdoptions. While yes it technically would be possible to hack that routine in Restartsrv.pm, that is outside the scope of support and very much not recommended as Restartsrv.pm is used by not just SpamAssassin.