2019 Pro - Issue with saving

Issue #492 resolved
S B created an issue

Just a little note - the server is functioning, I have had this error since 2016 after removing one of the spam numbers from the boxes to mark the subject. Picture to follow. Now we have the new error pages I am submitting the information for diagnostics.

Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused. 
The command "'sudo' '-u' 'root' '/etc/cont-init.d/20-apply-server-config'" failed. Exit Code: 255(Unknown error) Working directory: /opt/admin/web Output: ================ ?[1;33m* applying /data/server.ini settings?[0m Error Output: ================ PHP Fatal error: Uncaught RuntimeException: Regex: ~^\s*munge_subject\s*=.*~ not found in [rspamd] quarantine = 12 ;munge_subject = 13 prefix = *****SPAM***** in /etc/cont-init.d/20-apply-server-config:173 Stack trace: #0 /etc/cont-init.d/20-apply-server-config(98): preg_replace_in_file('~^\\s*munge_subj...', 'munge_subject =...', Array) #1 {main} thrown in /etc/cont-init.d/20-apply-server-config on line 173 
Symfony\Component\Process\Exception\ ProcessFailedException 
in vendor/symfony/symfony/src/Symfony/Component/Process/Process.php (line 239) 
            throw new RuntimeException('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.');
        }
        $env = 1 < \func_num_args() ? func_get_arg(1) : null;

        if (0 !== $this->run($callback, $env)) {
            throw new ProcessFailedException($this);
        }

        return $this;
    }

Process->mustRun() in src/AppBundle/Server/MailServerManager.php (line 119) 
    }

    private function run($as_user, $what): Process
    {
        $pb = new Process(['sudo', '-u', $as_user, $what]);
        return $pb->mustRun();
    }
} 
MailServerManager->run('root', '/etc/cont-init.d/20-apply-server-config') in src/AppBundle/Server/MailServerManager.php (line 15) 

class MailServerManager
{
    public function applyServerIni(): void
    {
        $this->run('root', '/etc/cont-init.d/20-apply-server-config');
    }

    public function restartByArray(array $toRestart): void
    {
        if (isset($toRestart['haraka']) && $toRestart['haraka']) {
MailServerManager->applyServerIni() in src/AppBundle/Controller/ConfigController.php (line 49) 
        if ($editForm->isSubmitted() && $editForm->isValid()) {
            $config->certificate->save();

            file_put_contents('/data/server.ini', $config->export($translator));

            $this->mailServerManager->applyServerIni();
            $this->mailServerManager->restartByArray($config->getPlannedRestarts());

            $this->addFlash('notice', 'Settings updated');

            return $this->redirectToRoute('settings', ['restarted' => true]);
ConfigController->editAction(object(Request), object(Translator)) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 151) 
        $this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS, $event);
        $controller = $event->getController();
        $arguments = $event->getArguments();

        // call controller
        $response = \call_user_func_array($controller, $arguments);

        // view
        if (!$response instanceof Response) {
            $event = new GetResponseForControllerResultEvent($this, $request, $type, $response);
            $this->dispatcher->dispatch(KernelEvents::VIEW, $event);
HttpKernel->handleRaw(object(Request), 1) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 68) 
    public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
    {
        $request->headers->set('X-Php-Ob-Level', ob_get_level());

        try {
            return $this->handleRaw($request, $type);
        } catch (\Exception $e) {
            if ($e instanceof RequestExceptionInterface) {
                $e = new BadRequestHttpException($e->getMessage(), $e);
            }
            if (false === $catch) {
HttpKernel->handle(object(Request), 1, true) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php (line 200) 
        $this->boot();
        ++$this->requestStackSize;
        $this->resetServices = true;

        try {
            return $this->getHttpKernel()->handle($request, $type, $catch);
        } finally {
            --$this->requestStackSize;
        }
    }

Kernel->handle(object(Request)) in web/app.php (line 16) 
//$kernel = new AppCache($kernel);

// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
//Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

Comments (12)

  1. S B reporter

    This is the page I am submitting when receiving the error above. I have since added in the information back to the boxes. It does save, but gives the error regardless.

    posteio2019.PNG

  2. S B reporter

    And also this field is missing in RSPAMD

    posteio2019-missing-field.PNG

    Contents of /opt/haraka-smtp/config/quarantine_decide.ini

    quarantine_decidde.png

    Contents of /opt/haraka-submission/config/quarantine_decide.ini

    submission.PNG

  3. SH repo owner

    Show me content of /opt/haraka-submission/config/quarantine_decide.ini also. Are you overriding any of these files? because it should regenerate them every container init

  4. S B reporter

    I have not overwritten any files, I just went exploring. I have included the content of that file above ^^

  5. Log in to comment