<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<p>You don't have a wildcard asterisk before the @ in your rules,
adding that would fix it, I believe.<br>
</p>
<br>
<div class="moz-cite-prefix">On 3/14/2018 3:21 PM,
<a class="moz-txt-link-abbreviated" href="mailto:nilton@hgnet.com.br">nilton@hgnet.com.br</a> wrote:<br>
</div>
<blockquote type="cite"
cite="mid:f90e7829-b43e-a884-163f-23f59cd1ec49@hgnet.com.br">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<p>Hi List<br>
<br>
This is my first post here, so I'm sorry for my blunders. Sorry
also for my very bad english.<br>
<br>
I have a new installation of MailScanner with Postfix and Mysql
and I am seeing a serious problem that I have not been able to
solve yet and I need your help:<br>
<br>
Ubuntu 16.04 + MailScanner 5.0.7-2 + Postfix 3.1.0-3 + MySQL
5.7.21<br>
<br>
Everything works fine except for one detail. All rules related
to domains hosted on this mailserver are ignored by MailScanner.<br>
<br>
Look this:<br>
<br>
Local domains:<br>
domain1.com.br<br>
domain2.com.br<br>
domain3.com.br<br>
<br>
----------------<br>
MailScanner.com<br>
Archive Mail = %rules-dir%/archive.rules<br>
Spam Actions = %rules-dir%/archive-spam.rules<br>
Required SpamAssassin Score = %rules-dir%/score.rules<br>
Is Definitely Not Spam = %rules-dir%/spam.whitelist.rules<br>
-----------------<br>
<br>
archive.rules<br>
FromOrTo: @domain2.com.br <a
class="moz-txt-link-abbreviated"
href="mailto:monitor@domain2.com.br" moz-do-not-send="true">monitor@domain2.com.br</a><br>
FromOrTo: @domain3.com.br <a
class="moz-txt-link-abbreviated"
href="mailto:monitor@domain3.com.br" moz-do-not-send="true">monitor@domain3.com.br</a><br>
FromOrTo: default <a
class="moz-txt-link-abbreviated"
href="mailto:monitor@X-Domain1-MailScanner-To:.com.br"
moz-do-not-send="true">monitor@X-Domain1-MailScanner-To:.com.br</a><br>
<br>
The rules for domin2.com.br and domain3.com.br are ignored by
Mailscanner and all messages follow default rules.<br>
----------------<br>
<br>
archive-spam.rules<br>
To: @domain2.com.br forward <a
class="moz-txt-link-abbreviated"
href="mailto:spam@domain2.com.br" moz-do-not-send="true">spam@domain2.com.br</a>
delete header "X-Spam-Status: Yes"<br>
To: @domain3.com.br forward <a
class="moz-txt-link-abbreviated"
href="mailto:spam@domain3.com.br" moz-do-not-send="true">spam@domain3.com.br</a>
delete header "X-Spam-Status: Yes"<br>
From: default forward <a
class="moz-txt-link-abbreviated"
href="mailto:spam@X-Domain1-MailScanner-To:.com.br"
moz-do-not-send="true">spam@X-Domain1-MailScanner-To:.com.br</a>
delete header "X-Spam-Status: Yes"<br>
<br>
In the same way, the rules for domin2.com.br and domain3.com.br
are ignored by Mailscanner and all the messages follow default
rules.<br>
--------------------<br>
<br>
score.rules<br>
To: @domain2.com.br 8.0<br>
To: @domain3.com.br 9.0<br>
To: default 5.0<br>
<br>
All messages for domain2.com and domain3.com are cached or not
based on default score 5.0.<br>
------------------<br>
<br>
spam.whitelist.rules<br>
From: @domain1.com.br yes<br>
From: @domain2.com.br yes<br>
From: @domain3.com.br yes<br>
From: @google.com yes<br>
FromOrTo: default no<br>
<br>
Interestingly the "From:" rules even for local domains are
recognized by MailScanner.<br>
Thus, it is possible to conclude that only the rules that
contain "To:" only for local domains do not work.<br>
----------------------<br>
<br>
Notice the message header below that X-Domain1-MailScanner-To:
It is empty, but X-Domain1-MailScanner-From: is not empty.<br>
<br>
Return-Path: <a class="moz-txt-link-rfc2396E"
href="mailto:usertmp@Domain1.com.br" moz-do-not-send="true"><usertmp@Domain1.com.br></a><br>
Delivered-To: <a class="moz-txt-link-abbreviated"
href="mailto:usertmp@Domain1.com.br" moz-do-not-send="true">usertmp@Domain1.com.br</a><br>
X-Spam-Status: No<br>
X-Domain1-MailScanner-To: <br>
X-Domain1-MailScanner-From: <a class="moz-txt-link-abbreviated"
href="mailto:usertmp@Domain1.com.br" moz-do-not-send="true">usertmp@Domain1.com.br</a><br>
X-Domain1-MailScanner-SpamCheck: não spam (está em uma lista
branca),<br>
SpamAssassin (escore=0.4, requerido 4, ALL_TRUSTED -1.00,<br>
BR_SAVED_URI 1.50, DKIM_SIGNED 0.10, DKIM_VALID -0.10,<br>
DKIM_VALID_AU -0.10)<br>
X-Domain1-MailScanner: Found to be clean<br>
X-Domain1-MailScanner-ID: B6EBB14201A.AE9C1<br>
X-Domain1-MailScanner-Information: Please contact the ISP for
more information<br>
Received: from webmail.Domain1.com.br (localhost [127.0.0.1])<br>
by mx1.Domain1.net.br (Postfix) with ESMTP id B6EBB14201A<br>
for <a class="moz-txt-link-rfc2396E"
href="mailto:usertmp@Domain1.com.br" moz-do-not-send="true"><usertmp@Domain1.com.br></a>;
Wed, 14 Mar 2018 13:18:51 -0300 (-03)<br>
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple;
d=Domain1.com.br;<br>
s=default; t=1521044331; bh=w9NEcM38aPoJUJrmljw+GCJaBSw=;<br>
h=Date:From:To:Subject;<br>
b=164tD2Zhn2gvABzES+a+cpd/lZG8QHFaBb8B53JMPXbjbGVgTLIV8oH7dILByLLHV<br>
c4W1EIgZ865H+m5BulZvekDY1gRg6E5dlkXjTp5M6CfNFbEyoV9rJUp4hs3civ/4Fq<br>
hbRBSIxuEmoEEdsjiPrkApczoGOWxL+7PCLOfHKiiBc8MlEnr7dPI8kve8dOMgOKXR<br>
NWz0H4qK6W+XUAIAHWSWryxWMnb6vkSafF/CxSN9W2hhjtFuqt5GhqFhOA+xxnLviQ<br>
FdbyGg4W468XGYPsJppj8wSuVhQ7FzsuKFaM2X44oXcEGQV62HmpRpwfZyk77A4ue8<br>
8TxnOVTxrogdg==<br>
MIME-Version: 1.0<br>
Content-Type: text/plain; charset=US-ASCII;<br>
format=flowed<br>
Content-Transfer-Encoding: 7bit<br>
Date: Wed, 14 Mar 2018 13:18:51 -0300<br>
From: <a class="moz-txt-link-abbreviated"
href="mailto:usertmp@Domain1.com.br" moz-do-not-send="true">usertmp@Domain1.com.br</a><br>
To: <a class="moz-txt-link-abbreviated"
href="mailto:usertmp@Domain1.com.br" moz-do-not-send="true">usertmp@Domain1.com.br</a><br>
-------------------------<br>
<br>
<br>
On the other server where everything works fine.<br>
From - Wed Mar 14 13:19:49 2018<br>
X-Account-Key: account27<br>
X-UIDL: 000001925a9d6bca<br>
X-Mozilla-Status: 0001<br>
X-Mozilla-Status2: 00000000<br>
X-Mozilla-Keys:
<br>
Return-Path: <a class="moz-txt-link-rfc2396E"
href="mailto:nilton@exemplo2.com.br" moz-do-not-send="true"><nilton@exemplo2.com.br></a><br>
Delivered-To: <a class="moz-txt-link-abbreviated"
href="mailto:nilton@exemplo2.com.br" moz-do-not-send="true">nilton@exemplo2.com.br</a><br>
X-Spam-Status: No<br>
X-HGnet-MailScanner-To: <br>
X-HGnet-MailScanner-From: <a class="moz-txt-link-abbreviated"
href="mailto:nilton@exemplo2.com.br" moz-do-not-send="true">nilton@exemplo2.com.br</a><br>
X-HGnet-MailScanner-SpamCheck: não spam (está em uma lista
branca),<br>
SpamAssassin (escore=0.4, requerido 4, ALL_TRUSTED -1.00,<br>
BR_SAVED_URI 1.50, DKIM_SIGNED 0.10, DKIM_VALID -0.10,<br>
DKIM_VALID_AU -0.10)<br>
X-HGnet-MailScanner: Found to be clean<br>
X-HGnet-MailScanner-ID: B6EBB14201A.AE9C1<br>
X-HGnet-MailScanner-Information: Please contact the ISP for more
information<br>
Received: from webmail.exemplo2.com.br (localhost [127.0.0.1])<br>
by mx1.hgnet.net.br (Postfix) with ESMTP id B6EBB14201A<br>
for <a class="moz-txt-link-rfc2396E"
href="mailto:nilton@exemplo2.com.br" moz-do-not-send="true"><nilton@exemplo2.com.br></a>;
Wed, 14 Mar 2018 13:18:51 -0300 (-03)<br>
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple;
d=exemplo2.com.br;<br>
s=default; t=1521044331; bh=w9NEcM38aPoJUJrmljw+GCJaBSw=;<br>
h=Date:From:To:Subject;<br>
b=164tD2Zhn2gvABzES+a+cpd/lZG8QHFaBb8B53JMPXbjbGVgTLIV8oH7dILByLLHV<br>
c4W1EIgZ865H+m5BulZvekDY1gRg6E5dlkXjTp5M6CfNFbEyoV9rJUp4hs3civ/4Fq<br>
hbRBSIxuEmoEEdsjiPrkApczoGOWxL+7PCLOfHKiiBc8MlEnr7dPI8kve8dOMgOKXR<br>
NWz0H4qK6W+XUAIAHWSWryxWMnb6vkSafF/CxSN9W2hhjtFuqt5GhqFhOA+xxnLviQ<br>
FdbyGg4W468XGYPsJppj8wSuVhQ7FzsuKFaM2X44oXcEGQV62HmpRpwfZyk77A4ue8<br>
8TxnOVTxrogdg==<br>
MIME-Version: 1.0<br>
Content-Type: text/plain; charset=US-ASCII;<br>
format=flowed<br>
Content-Transfer-Encoding: 7bit<br>
Date: Wed, 14 Mar 2018 13:18:51 -0300<br>
From: <a class="moz-txt-link-abbreviated"
href="mailto:nilton@exemplo2.com.br" moz-do-not-send="true">nilton@exemplo2.com.br</a><br>
To: <a class="moz-txt-link-abbreviated"
href="mailto:nilton@exemplo2.com.br" moz-do-not-send="true">nilton@exemplo2.com.br</a><br>
<br>
-----------------<br>
<br>
MailScanner or Postfix? There is a possibility that the problem
is in the way postfix is constructing the header, but I do not
know how to debug it.<br>
<br>
Thank you for your help on this.<br>
</p>
<div class="moz-signature">
<meta content="text/html; charset=utf-8"
http-equiv="content-type">
<title>HGnet - A solução em TI.</title>
<font color="#808080"><font face="Times New Roman, serif"><font
size="2"><small><big style="font-weight: bold;"><big><big><small><span
style="color: rgb(35, 67, 105);"></span></small></big></big></big></small></font></font></font>
<table style="text-align: left; width: 334px; height: 120px;">
<tbody>
<tr>
<td>
<div style="text-align: center;"><span
style="font-family: Times New Roman,serif;"><span
style="text-decoration: underline;"><a
href="www.hgnet.com.br" moz-do-not-send="true"><img
style="border: 0px solid ; width: 100px;
height: 58px;" alt=""
src="cid:part19.7920D7AF.B6B69A83@shout.net"
class=""></a></span></span><br>
</div>
<font color="#808080"><font face="Times New Roman,
serif"><font size="2"><small> </small></font></font></font>
<div style="text-align: center; color: rgb(42, 80,
126);"><font face="Times New Roman, serif"><font
size="2"><small><big style="font-weight: bold;"><big><big><small>A
Solução em TI</small></big></big></big></small></font></font></div>
</td>
<td>
<div style="text-align: center;"><big style="color:
rgb(41, 78, 123);"><font style="color: rgb(49, 93,
147);"><font face="Times New Roman, serif"><b><br>
<small>Nilton Godoi</small></b></font></font></big><br>
<font color="#808080"><font face="Times New Roman,
serif"> <font size="2"><small><small>Fones: +55
11 3582-2746 3582-2756</small></small></font></font></font><br>
<font color="#808080"><font face="Times New Roman,
serif"><font size="2"><small><small> Celular: +55
11 98191-0001<br>
</small></small></font></font></font><font
size="+1" color="#808080"><font face="Times New
Roman, serif"> <a
class="moz-txt-link-abbreviated"
href="http://www.hgnet.com.br"
moz-do-not-send="true">www.hgnet.com.br</a></font></font><font
color="#808080"><font face="Times New Roman, serif"><font
size="2"><small><small><br>
</small></small></font></font></font></div>
<font color="#808080"><font face="Times New Roman,
serif"><font size="2"><small> <big
style="font-weight: bold;"><big><big><small><span
style="color: rgb(35, 67, 105);"></span></small></big></big></big></small></font></font></font></td>
</tr>
</tbody>
</table>
<br>
<font color="#808080"><font face="Times New Roman, serif"><font
size="2"><small><big style="font-weight: bold;"><big><big><small><span
style="color: rgb(35, 67, 105);"></span></small></big></big></big></small></font></font></font>
</div>
<br>
--
<br>
Esta mensagem foi verificada pelo sistema de antiv�rus e <br>
acredita-se estar livre de perigo.
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">
</pre>
</blockquote>
<br>
</body>
</html>