Page 1 of 1

spam.blacklist.rules Page Not Fully Loading in MailWatch/MailScanner

Posted: 16 Jul 2025 19:00
by ChadPhilip
In the "Edit MailScanner Rulesets" section of a recent installation of eFa 5.0.0-11, the spam.blacklist.rules page does not load completely, while the spam.whitelist.rules page (and all other ruleset pages) loads fine.

Here is the portion of the page where it is cutoff.

Code: Select all

<td colspan="5">
<ul id="menu" class="yellow">
<li><a href="[status.php](view-source:https://domain.com/mailscanner/status.php)">Recent Messages</a></li>
<li><a href="[lists.php](view-source:https://domain.com/mailscanner/lists.php)">Block and Allow Lists</a></li>
<li><a href="[quarantine.php](view-source:https://domain.com/mailscanner/quarantine.php)">Quarantine</a></li>
<li><a href="[reports.php](view-source:https://domain.com/mailscanner/reports.php)">Search and Reports</a></li>
<li><a href="[other.php](view-source:https://domain.com/mailscanner/other.php)">Tools and Links</a></li>
<li><a href="[sf_version.php](view-source:https://domain.com/mailscanner/sf_version.php)">Software Versions</a></li>
<li><a href="[grey.php](view-source:https://domain.com/mailscanner/grey.php)">greylist</a></li>
<li><a href="[logout.php](view-source:https://domain.com/mailscanner/logout.php)">Logout</a></li>
<script>function changeLang() { document.cookie = "MW_LANG="+document.getElementById("langSelect").selectedOptions[0].value; location.reload();} </script><li class="lang"><select id="langSelect" class="lang" onChange="changeLang()">
<option value="de">Deutsch</option>
<option value="en" selected>English</option>
<option value="es-419">Español</option>
<option value="fr">Français</option>
<option value="it">Italiano</option>
<option value="ja">日本語</option>
<option value="nl">Nederlands</option>
<option value="pt_br">Português</option>
</select></li>

 </ul>
 </td>
 </tr>
 <tr>
  <td colspan="5">
To be clear

Code: Select all

<td colspan="5">
is the final line of HTML generated by msre_edit.php.

This is preventing me from being able to create and edit MailScanner blacklists. All other areas of the GUI seem to be loading correctly, and the overall functionality of this eFa instance appears to be at 100%.

See also https://github.com/E-F-A/eFa5/issues/29

Re: spam.blacklist.rules Page Not Fully Loading in MailWatch/MailScanner

Posted: 17 Jul 2025 11:42
by ChadPhilip
As a workaround, it's possible to edit the spam.blacklist.rules file directly by accessing the shell and visiting the /etc/MailScanner/rules directory.

Re: spam.blacklist.rules Page Not Fully Loading in MailWatch/MailScanner

Posted: 20 Jul 2025 07:05
by Mail2GoCa
Since the other pages load, I'm willing to bet the file /etc/MailScanner/rules/spam.blacklist.rules is one or more of the following:
1. Empty
2. Incorrectly formatted
3. Has file security improperly set

If the file actually has content and is correctly formatted, then check to make sure that both the user apache and the group apache are owners, and that the security attributes are at least -rw-rw-r--

If the file is empty, just add the following to it

Code: Select all

# If you are basing a blacklist on this then you can refer to
# a null (empty) sender address with "/^$/" as the address to match.
#
# This is where you can build a Spam BlackList
# Addresses matching in here, with the value
# "yes" will always be marked as spam.
#From:		152.78.		yes
#From:		130.246.	yes
#From:		host:soton.ac.uk yes # Note this is slower than using the IP
#

Re: spam.blacklist.rules Page Not Fully Loading in MailWatch/MailScanner

Posted: 20 Jul 2025 16:04
by ChadPhilip
Mail2GoCa wrote: 20 Jul 2025 07:05 Since the other pages load, I'm willing to bet the file /etc/MailScanner/rules/spam.blacklist.rules is one or more of the following:
1. Empty
The file was indeed empty and this was causing the page to not load. Thanks for your help.

Re: spam.blacklist.rules Page Not Fully Loading in MailWatch/MailScanner

Posted: 20 Jul 2025 16:25
by Mail2GoCa
My pleasure