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

Bugs in eFa 5
Post Reply
ChadPhilip
Posts: 3
Joined: 16 Jul 2025 18:16

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

Post 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
ChadPhilip
Posts: 3
Joined: 16 Jul 2025 18:16

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

Post 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.
Mail2GoCa
Posts: 58
Joined: 10 Oct 2018 09:11

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

Post 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
#
ChadPhilip
Posts: 3
Joined: 16 Jul 2025 18:16

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

Post 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.
mpj_admin
Posts: 4
Joined: 05 Jan 2022 14:40

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

Post by mpj_admin »

Hi Mail2GoCa,
please help. I set this in /etc/MailScanner/rules/spam.blacklist.rules:
FromOrTo: mxout.mta1.net deny
FromOrTo: mxout.mta2.net deny
FromOrTo: mxout.mta3.net deny
FromOrTo: mxout.mta4.net deny
and restarted systemctl restart mailscanner.service
SPAM still comes
I have two questions for you:
1. Do I have the correct syntax of the entry?
2. Do I also have to set the path to /etc/MailScanner/rules/spam.blacklist.rules in MailScanner.conf?
In MailScanner.conf "Spam List =" and "Spam Domain List =" is empty
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
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
#
Mail2GoCa
Posts: 58
Joined: 10 Oct 2018 09:11

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

Post by Mail2GoCa »

Since it's a blacklist file, the verb at the end needs to be "yes" and not "deny"
Also when you specify hostnames, you have to preceed the host ame with "host:"

So an example would be:
FromOrTo: host:mxout.mta1.net yes
mpj_admin
Posts: 4
Joined: 05 Jan 2022 14:40

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

Post by mpj_admin »

Thank you very much and please provide more information.
The SPAM senders are, for example, the following servers:
pn315.mxout.mta1.net
pn125.mxout.mta1.net
pn260.mxout.mta1.net
df125.mxout.mta1.net

How to write SPAM blocking correctly.
The syntax should be:
FromOrTo: host:mxout.mta1.net yes
or
FromOrTo: host:.mxout.mta1.net yes
or
FromOrTo: host:*mxout.mta1.net yes

Thanks in advance for your help.
Post Reply