]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
ids.cgi: Allow to configure new mail alert system
authorStefan Schantl <stefan.schantl@ipfire.org>
Sat, 9 Aug 2025 11:28:35 +0000 (13:28 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sat, 9 Aug 2025 11:28:35 +0000 (13:28 +0200)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/ids.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

index 960e72ef1cd44d9e08ef1354d859f191c1a24b46..8d9fbfc16b42c343ebf15c4ecdef45c12c471dca 100644 (file)
@@ -1006,6 +1006,9 @@ sub show_mainpage() {
        $checked{'ENABLE_IDS'}{'off'} = '';
        $checked{'ENABLE_IDS'}{'on'} = '';
        $checked{'ENABLE_IDS'}{$idssettings{'ENABLE_IDS'}} = "checked='checked'";
+       $checked{'ENABLE_EMAIL'}{'off'} = '';
+       $checked{'ENABLE_EMAIL'}{'on'} = '';
+       $checked{'ENABLE_EMAIL'}{$idssettings{'ENABLE_EMAIL'}} = "checked='checked'";
 
        # Draw current state of the IDS
        &Header::opensection();
@@ -1087,6 +1090,44 @@ print <<END
                                        </td>
                                </tr>
 
+                               <tr>
+                                       <td colspan='$num_zones'>
+                                               <b>$Lang::tr{'ids email alerts'}</b>
+                                       <td>
+                               </tr>
+
+                               <tr>
+                                       <td colspan='$num_zones'>
+                                               <input type='checkbox' name='ENABLE_EMAIL' $checked{'ENABLE_EMAIL'}{'on'}>&nbsp;$Lang::tr{'ids enable email alerts'}
+                                       </td>
+                               </tr>
+
+                               <tr>
+                                       <td>
+                                               <label for='EMAIL_SENDER'>$Lang::tr{'ids email sender'}</label>
+                                       </td>
+
+                                       <td colspan='$num_zones -1'>
+                                               <input type="text" name="EMAIL_SENDER" value="$idssettings{'EMAIL_SENDER'}" placeholder="alert\@example.com" size="64">
+                                       <td>
+                               </tr>
+
+                               <tr>
+                                       <td>
+                                               <label for='EMAIL_RECIPIENTS'>$Lang::tr{'ids email recipients'}</label>
+                                       </td>
+
+                                       <td colspan='$num_zones -1'>
+                                               <input type="text" name="EMAIL_RECIPIENTS" value="$idssettings{'EMAIL_RECIPIENTS'}" placeholder="one\@example.com, multiple\@example.com" size="64">
+                                       </td>
+                               </tr>
+
+                               <tr><!-- empty row for spacing -->
+                                       <td colspan='$num_zones'>
+                                               &nbsp;
+                                       </td>
+                               </tr>
+
                                <tr>
                                        <td colspan='$num_zones' align='right'>
                                                <input type='submit' name='IDS' value='$Lang::tr{'save'}' />
index 210a701ffbae526910bb5ab7fe69ad764192afb7..9a944f16af4ca9256b19ba0de874cbf53fc37bdb 100644 (file)
 'ids download new ruleset' => 'Das neue Regelset wird heruntergeladen und entpackt. Bitte warten Sie, bis dieser Vorgang erfolgreich beendet wurde...',
 'ids enable' => 'Einbruchsverhinderungssystem aktivieren',
 'ids enable automatic updates' => 'Automatische Updates aktivieren',
+'ids enable email alerts' => 'Benachrichtigung per E-Mail aktivieren',
+'ids email alerts' => 'E-Mail Benachrichtigungen',
+'ids email sender' => 'Sender-Addresse',
+'ids email recipients' => 'Empfänger-Addressen',
 'ids extract ruleset' => 'Entpacke Regelset von:',
 'ids finished' => 'Fertig...',
 'ids force ruleset update' => 'Regelset jetzt aktualisieren',
index 57ccaa701ab727e1f6bffeecfd468ae752d34bb4..a0f0ceb8a5f772fe736b570e844c31e0b7040496 100644 (file)
 'ids download new ruleset' => 'Downloading and unpacking new ruleset. Please wait until all operations have completed successfully...',
 'ids enable' => 'Enable Intrusion Prevention System',
 'ids enable automatic updates' => 'Enable automatic updates',
+'ids enable email alerts' => 'Enable e-mail alerts',
+'ids email alerts' => 'E-Mail alerts',
+'ids email sender' => 'Sender address',
+'ids email recipients' => 'Recipients',
 'ids extract ruleset' => 'Extracting ruleset for provider:',
 'ids finished' => 'Finished...',
 'ids force ruleset update' => 'Force ruleset update',