Whitelist not working

Tony Clark tclark at clarktechnical.com
Wed Aug 26 17:47:07 UTC 2015


Thanks!  I found the problem from your post.  My password and user were 
wrong in SQLBlackWhiteList.pm

In looking over the install doc, I found a problem I had when I first 
did the install.  I had nothing to copy the bayes from.  What do I do if 
there is no  bayes_* ?


Here is the relevant install entry:


Create the 'new' bayes directory, make the directory owned by the same 
group as the web server user and make the directory setgid:

mkdir /etc/MailScanner/bayes
chown root:apache /etc/MailScanner/bayes
chmod g+rws /etc/MailScanner/bayes

Copy the existing bayes databases and set the permissions:

cp /root/.spamassassin/bayes_* /etc/MailScanner/bayes
chown root:apache /etc/MailScanner/bayes/bayes_*
chmod g+rw /etc/MailScanner/bayes/bayes_*



On 8/26/2015 9:30 AM, Randal, Phil wrote:
> There are two ways of adding a whitelist entry in the latest version of MailWatch.
>
> One using the MailScanner ruleset editor, the other using the SQL DB backend.
>
> I presume you mean the latter.
>
>  From the INSTALL document:
>
> If you want to use the integrate Blacklist/Whitelist (optional):
>
>     then edit the file and change the connection string in the CreateList subroutine to match MailWatch.pm.
>
> Copy SQLBlackWhiteList.pm to /usr/lib/MailScanner/MailScanner/CustomFunctions   and in MailScanner.conf set:
>   Is Definitely Not Spam = &SQLWhitelist
>   Is Definitely Spam = &SQLBlacklist
>
> Then edit SQLBlackWhitelist.pm and change the connection string in the
> CreateList subroutine to match MailWatch.pm.
>
> Cheers,
>
> Phil
>
>
>
> -----Original Message-----
> From: MailScanner [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Tony Clark
> Sent: 26 August 2015 13:41
> To: MailScanner Discussion
> Subject: Re: Whitelist not working
>
> I'm a bit lost.  It's not just the spam.whitelist.rules, it's the whitelist functionality in  MailWatch and MailScanner.
>
> Does anyone know what file is updated if I add a whitelist entry in MailWatch for MailScanner?
>
> The whitelist inside MailWatch is not working at all.
>
> Thanks
>
> --
>
>
> On 8/24/2015 10:57 AM, Denis Beauchemin wrote:
>> I've found this in Config.pm (MailScanner version 4.85.2):
>>       # No rule matched, so return the default
>>       #print STDERR "Returning default as nothing matched.\n";
>>       return $Defaults{$name};
>> ...
>>       # Return the results if there were any, else the defaults
>>       return join(" ", @results) if @results;
>>       return $Defaults{$name};
>>
>> So the default clause can appear anywhere in the rules file. But other rules are a first match:
>>       # It's a first-match rule
>>
>> Denis
>>
>> -----Message d'origine-----
>> De : MailScanner [mailto:mailscanner-bounces at lists.mailscanner.info]
>> De la part de Denis Beauchemin Envoyé : 24 août 2015 10:52 À :
>> MailScanner Discussion <mailscanner at lists.mailscanner.info>
>> Objet : RE: Whitelist not working
>>
>> Could it be a first match rule EXCEPT for the default clause that will only match if no other rule match?
>>
>> Denis
>>
>> -----Message d'origine-----
>> De : MailScanner [mailto:mailscanner-bounces at lists.mailscanner.info]
>> De la part de Mogens Melander Envoyé : 24 août 2015 10:42 À :
>> mailscanner at lists.mailscanner.info
>> Objet : RE: Whitelist not working
>>
>> If that's the case, it makes no sense to me.
>>
>> I believe this is a first match fires rule, which makes position important, and explains why yours not work.
>>
>> On Mon, August 24, 2015 14:57, Denis Beauchemin wrote:
>>> Martin,
>>>
>>> I have many rules files with default rules at the beginning of the
>>> files and they work just fine. Also I couldn’t find any warning about
>>> this in the /etc/MailScanner/rules/README file that explains how to
>>> use rules so I have to assume there is no such requirement.
>>>
>>> Denis
>>>
>>> De : MailScanner [mailto:mailscanner-bounces at lists.mailscanner.info]
>>> De la part de Martin Hepworth Envoyé : 24 août 2015 08:38 À :
>>> MailScanner Discussion <mailscanner at lists.mailscanner.info>
>>> Objet : Re: Whitelist not working
>>>
>>> Denis
>>> You sure - Jules always used to say the rules files are treated liek
>>> firewall rules, first line to hit as you work from top to bottom will
>>> activate.
>>> Unless, of course it changed while I've not bee following too much.
>>>
>>>
>>> --
>>> Martin Hepworth, CISSP
>>> Oxford, UK
>>>
>>> On 24 August 2015 at 13:28, Denis Beauchemin
>>> <Denis.Beauchemin at usherbrooke.ca<mailto:Denis.Beauchemin at usherbrooke.
>>> c
>>> a>>
>>> wrote:
>>> This is not true: no need to put the default line last.
>>>
>>> Denis
>>>
>>> -----Message d'origine-----
>>> De : MailScanner
>>> [mailto:mailscanner-bounces at lists.mailscanner.info<mailto:mailscanner
>>> -
>>> bounces at lists.mailscanner.info>]
>>> De la part de Mogens Melander
>>> Envoyé : 21 août 2015 23:33
>>> À : MailScanner Discussion
>>> <mailscanner at lists.mailscanner.info<mailto:mailscanner at lists.mailscan
>>> n
>>> er.info>>
>>> Objet : Re: Whitelist not working
>>>
>>> The default should be last in the file.
>>>
>>> From: *@*.mydomain.com<http://mydomain.com>          yes
>>> FromOrTo:       default         no
>>>
>>> On Fri, August 21, 2015 21:56, Tony Clark wrote:
>>>>
>>>> I cannot get any whitelist entries to work in MailScanner.
>>>>
>>>> I am updating the whitelist in MailWatch, but I am not seeing it get
>>>> updated in spam.whitelist.rules
>>>>
>>>> I've tried manually updating spam.whitelist.rules, but every time I
>>>> send a test SPAM, it gets blocked as spam.
>>>>
>>>> Here are my file contents:
>>>>
>>>> ---
>>>> spam.whitelist.rules:
>>>>
>>>> # 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 WhiteList # Addresses matching
>>>> in here, with the value # "yes" will never be marked as spam.
>>>> #From:          152.78.         yes
>>>> #From:          130.246.        yes
>>>> #From:          host:soton.ac.uk<http://soton.ac.uk> yes # Note this is
>>>> slower than using the
>>>> IP
>>>>
>>>
>>> --
>>> Mogens Melander
>>> +66 8701 33224<tel:%2B66%208701%2033224>
>>>
>>>
>>> --
>>> This message has been scanned for viruses and dangerous content by
>>> MailScanner, and is believed to be clean.
>>>
>>>
>>>
>>> --
>>> MailScanner mailing list
>>> mailscanner at lists.mailscanner.info<mailto:mailscanner at lists.mailscann
>>> e r.info> http://lists.mailscanner.info/listinfo/mailscanner
>>>
>>>
>>>
>>> --
>>> MailScanner mailing list
>>> mailscanner at lists.mailscanner.info<mailto:mailscanner at lists.mailscann
>>> e r.info> http://lists.mailscanner.info/listinfo/mailscanner
>>>
>>>
>>> --
>>> This message has been scanned for viruses and dangerous content by
>>> MailScanner, and is believed to be clean.
>>>
>>>
>>>
>>> --
>>> MailScanner mailing list
>>> mailscanner at lists.mailscanner.info
>>> http://lists.mailscanner.info/listinfo/mailscanner
>>>
>>>
>>
>>
>> --
>> Mogens Melander
>> +66 8701 33224
>>
>>
>> --
>> This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
>>
>>
>>
>
>
> --
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/listinfo/mailscanner
>
> Hoople Ltd, Registered in England and Wales No. 7556595
> Registered office: Plough Lane, Hereford, HR4 0LE
>
> "Any opinion expressed in this e-mail or any attached files are those of the individual and not necessarily those of Hoople Ltd. You should be aware that Hoople Ltd. monitors its email service. This e-mail and any attached files are confidential and intended solely for the use of the addressee. This communication may contain material protected by law from being passed on. If you are not the intended recipient and have received this e-mail in error, you are advised that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. If you have received this e-mail in error please contact the sender immediately and destroy all copies of it."
>
>


More information about the MailScanner mailing list