You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Filip Havlíček <fi...@pro-com.cz> on 2015/03/04 13:35:55 UTC
Bayes learning for legitimate users
Hi,
I would like to ask you, how can I *allow **only **legitimate* email
addresses (existing users) for bayes learning?
Table bayes_token grow up to 0,5GB right now, because there are
thounsands of unknown email addresses like:
abko@hotmail.com
ablewis60@hotmail.com
abluxq@hotmail.com
Re: Bayes learning for legitimate users
Posted by Filip Havlíček <fi...@pro-com.cz>.
Sorry for bad reply only for you.
How can I found out right path for config file: local.cf ? Maybe config
is loaded from other path.
I used MySQL structure from this file:
http://spamassassin.apache.org/full/3.0.x/dist/sql/bayes_mysql.sql
Thanks
Dne 4.3.2015 v 14:43 Reindl Harald napsal(a):
> don't reply offlist!
>
> Am 04.03.2015 um 14:13 schrieb Filip Havlíček:
>> So you recommend set parameter *bayes_auto_learn* to value *0*? I had
>> truncate tables and try set bayes_auto_learn 0 in
>> /etc/spamassassin/local.cf but it does not work - new hundrends records
>> of unknown email addresses occured in tables *bayes_vars*, *bayes_token*
>> and *bayes_seen* :-(. Any ideas?
>
> is /etc/spamassassin/local.cf really correct?
> if it si are the permissions correct?
>
> "/etc/mail/spamassassin/local.cf" is the correct path here
>
> how is your SA called?
> look for "user_prefs" in ~/.spamassassin/
>
> no idea what "bayes_vars" is
>
>> Dne 4.3.2015 v 13:45 Reindl Harald napsal(a):
>>> Am 04.03.2015 um 13:35 schrieb Filip Havlíček:
>>>> I would like to ask you, how can I *allow **only **legitimate* email
>>>> addresses (existing users) for bayes learning?
>>>>
>>>> Table bayes_token grow up to 0,5GB right now, because there are
>>>> thounsands of unknown email addresses like:
>>>> abko@hotmail.com
>>>> ablewis60@hotmail.com
>>>> abluxq@hotmail.com
>>>
>>> don't use auto-learning or at least adjust the scores which are taken
>>> for autolearning - SpamAssassin can't know if a address exists while
>>> you could use http://www.postfix.org/ADDRESS_VERIFICATION_README.html
>>> on the MTA level
>>>
>>> *but* be careful with sender verification, you need to place a lot of
>>> DNSWL in front to not become blacklisted for your own
>>>
>>> i guess your main problem is that way too much mail makes it to SA at
>>> all instead block it by RBL scoring and other MTA restrictions long
>>> before - see below an example, all the stuff before the bayes stats
>>> never touched SpamAssassin
>>> __________________________________________________
>>>
>>> Connections: 314179
>>>
>>> Postscreen: 171577
>>> Helo: 1435
>>> Subject: 187
>>> Attachment: 29
>>> Header Length: 8
>>> Sender Regex: 263
>>> Sender Blocked: 174
>>> Sender Verify: 301
>>> Sender Invalid: 1622
>>> Sender Spoofed: 10
>>> Sender Parked: 10
>>> PTR Missing: 227
>>> PTR Generic: 447
>>> SPF: 709
>>> __________________________________________________
>>>
>>> BAYES_00 46223 77.63 %
>>> BAYES_05 733 1.23 %
>>> BAYES_20 894 1.50 %
>>> BAYES_40 957 1.60 %
>>> BAYES_50 6463 10.85 %
>>> BAYES_60 641 1.07 %
>>> BAYES_80 472 0.79 %
>>> BAYES_95 344 0.57 %
>>> BAYES_99 2814 4.72 %
>>> BAYES_999 2452 4.11 %
>
Re: Bayes learning for legitimate users
Posted by Reindl Harald <h....@thelounge.net>.
don't reply offlist!
Am 04.03.2015 um 14:13 schrieb Filip Havlíček:
> So you recommend set parameter *bayes_auto_learn* to value *0*? I had
> truncate tables and try set bayes_auto_learn 0 in
> /etc/spamassassin/local.cf but it does not work - new hundrends records
> of unknown email addresses occured in tables *bayes_vars*, *bayes_token*
> and *bayes_seen* :-(. Any ideas?
is /etc/spamassassin/local.cf really correct?
if it si are the permissions correct?
"/etc/mail/spamassassin/local.cf" is the correct path here
how is your SA called?
look for "user_prefs" in ~/.spamassassin/
no idea what "bayes_vars" is
> Dne 4.3.2015 v 13:45 Reindl Harald napsal(a):
>> Am 04.03.2015 um 13:35 schrieb Filip Havlíček:
>>> I would like to ask you, how can I *allow **only **legitimate* email
>>> addresses (existing users) for bayes learning?
>>>
>>> Table bayes_token grow up to 0,5GB right now, because there are
>>> thounsands of unknown email addresses like:
>>> abko@hotmail.com
>>> ablewis60@hotmail.com
>>> abluxq@hotmail.com
>>
>> don't use auto-learning or at least adjust the scores which are taken
>> for autolearning - SpamAssassin can't know if a address exists while
>> you could use http://www.postfix.org/ADDRESS_VERIFICATION_README.html
>> on the MTA level
>>
>> *but* be careful with sender verification, you need to place a lot of
>> DNSWL in front to not become blacklisted for your own
>>
>> i guess your main problem is that way too much mail makes it to SA at
>> all instead block it by RBL scoring and other MTA restrictions long
>> before - see below an example, all the stuff before the bayes stats
>> never touched SpamAssassin
>> __________________________________________________
>>
>> Connections: 314179
>>
>> Postscreen: 171577
>> Helo: 1435
>> Subject: 187
>> Attachment: 29
>> Header Length: 8
>> Sender Regex: 263
>> Sender Blocked: 174
>> Sender Verify: 301
>> Sender Invalid: 1622
>> Sender Spoofed: 10
>> Sender Parked: 10
>> PTR Missing: 227
>> PTR Generic: 447
>> SPF: 709
>> __________________________________________________
>>
>> BAYES_00 46223 77.63 %
>> BAYES_05 733 1.23 %
>> BAYES_20 894 1.50 %
>> BAYES_40 957 1.60 %
>> BAYES_50 6463 10.85 %
>> BAYES_60 641 1.07 %
>> BAYES_80 472 0.79 %
>> BAYES_95 344 0.57 %
>> BAYES_99 2814 4.72 %
>> BAYES_999 2452 4.11 %
Re: Bayes learning for legitimate users
Posted by Reindl Harald <h....@thelounge.net>.
Am 04.03.2015 um 13:35 schrieb Filip Havlíček:
> I would like to ask you, how can I *allow **only **legitimate* email
> addresses (existing users) for bayes learning?
>
> Table bayes_token grow up to 0,5GB right now, because there are
> thounsands of unknown email addresses like:
> abko@hotmail.com
> ablewis60@hotmail.com
> abluxq@hotmail.com
don't use auto-learning or at least adjust the scores which are taken
for autolearning - SpamAssassin can't know if a address exists while you
could use http://www.postfix.org/ADDRESS_VERIFICATION_README.html on the
MTA level
*but* be careful with sender verification, you need to place a lot of
DNSWL in front to not become blacklisted for your own
i guess your main problem is that way too much mail makes it to SA at
all instead block it by RBL scoring and other MTA restrictions long
before - see below an example, all the stuff before the bayes stats
never touched SpamAssassin
__________________________________________________
Connections: 314179
Postscreen: 171577
Helo: 1435
Subject: 187
Attachment: 29
Header Length: 8
Sender Regex: 263
Sender Blocked: 174
Sender Verify: 301
Sender Invalid: 1622
Sender Spoofed: 10
Sender Parked: 10
PTR Missing: 227
PTR Generic: 447
SPF: 709
__________________________________________________
BAYES_00 46223 77.63 %
BAYES_05 733 1.23 %
BAYES_20 894 1.50 %
BAYES_40 957 1.60 %
BAYES_50 6463 10.85 %
BAYES_60 641 1.07 %
BAYES_80 472 0.79 %
BAYES_95 344 0.57 %
BAYES_99 2814 4.72 %
BAYES_999 2452 4.11 %
Re: Bayes learning for legitimate users
Posted by John Hardin <jh...@impsec.org>.
On Wed, 4 Mar 2015, Filip Havlíček wrote:
> I would like to ask you, how can I *allow **only **legitimate* email
> addresses (existing users) for bayes learning?
Reject invalid users at the MTA level during SMTP before the message even
hits SA.
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
Failure to plan ahead on someone else's part does not constitute
an emergency on my part. -- David W. Barts in a.s.r
-----------------------------------------------------------------------
4 days until Daylight Saving Time begins in U.S. - Spring Forward
Re: Bayes learning for legitimate users
Posted by Matthias Leisi <ma...@leisi.net>.
>
> Am 14.03.2015 um 16:45 schrieb Matus UHLAR - fantomas <uh...@fantomas.sk>:
> ...but as I mentioned before, training spam from mail to non-existent
> recipients may be even a good thing…
I would not train from mail to non-existent recipients, but would restrict to a defined set of spamtraps (which may have been non-existent addresses at some point in the past…).
— Matthias
Re: Bayes learning for legitimate users
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 14.03.15 15:00, Filip Havlíček wrote:
>I manage email through ISPConfig, I think wildcard for any domain is
>not set.
seems you have relay_recipient_maps set, isn't your domain listed there?
note that postfix rejects non-existing recipients by default
(http://www.postfix.org/postconf.5.html#smtpd_reject_unlisted_recipient)
and in such case mail to non-existing recipients should not get to proxy,
filter or milter so it could be learned from
...but as I mentioned before, training spam from mail to non-existent
recipients may be even a good thing...
>Dne 13.3.2015 v 16:02 Matus UHLAR - fantomas napsal(a):
>>>>>>Filip Havlí?ek wrote:
>>>>>>>I would like to ask you, how can I *allow **only **legitimate* email
>>>>>>>addresses (existing users) for bayes learning?
>>
>>On 13.03.15 14:54, Filip Havlíček wrote:
>>>there is my configuration:
>>>/etc/spamassassin/local.cf: http://pastebin.com/PM5jN8wi
>>>/etc/postfix/main.cf: http://pastebin.com/KWN7Ebyi
>>>/etc/amavis/conf.d/50-user: http://pastebin.com/ijSaqhuJ
>>
>>you have virtual domains set up. Did you set up wildcard in any of them?
>>
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
WinError #98652: Operation completed successfully.
Re: Bayes learning for legitimate users
Posted by Filip Havlíček <fi...@pro-com.cz>.
I manage email through ISPConfig, I think wildcard for any domain is not
set.
Dne 13.3.2015 v 16:02 Matus UHLAR - fantomas napsal(a):
>>>>> Filip Havlí?ek wrote:
>>>>>> I would like to ask you, how can I *allow **only **legitimate* email
>>>>>> addresses (existing users) for bayes learning?
>
> On 13.03.15 14:54, Filip Havlíček wrote:
>> there is my configuration:
>> /etc/spamassassin/local.cf: http://pastebin.com/PM5jN8wi
>> /etc/postfix/main.cf: http://pastebin.com/KWN7Ebyi
>> /etc/amavis/conf.d/50-user: http://pastebin.com/ijSaqhuJ
>
> you have virtual domains set up. Did you set up wildcard in any of them?
>
Re: Bayes learning for legitimate users
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
>>>>Filip Havlí?ek wrote:
>>>>>I would like to ask you, how can I *allow **only **legitimate* email
>>>>>addresses (existing users) for bayes learning?
On 13.03.15 14:54, Filip Havlíček wrote:
>there is my configuration:
>/etc/spamassassin/local.cf: http://pastebin.com/PM5jN8wi
>/etc/postfix/main.cf: http://pastebin.com/KWN7Ebyi
>/etc/amavis/conf.d/50-user: http://pastebin.com/ijSaqhuJ
you have virtual domains set up. Did you set up wildcard in any of them?
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
WinError #99999: Out of error messages.
Re: Bayes learning for legitimate users
Posted by Filip Havlíček <fi...@pro-com.cz>.
Hi,
there is my configuration:
/etc/spamassassin/local.cf: http://pastebin.com/PM5jN8wi
/etc/postfix/main.cf: http://pastebin.com/KWN7Ebyi
/etc/amavis/conf.d/50-user: http://pastebin.com/ijSaqhuJ
So, what I should modify? Thanks
Dne 4.3.2015 v 20:39 Reindl Harald napsal(a):
>
>
> Am 04.03.2015 um 19:57 schrieb Matus UHLAR - fantomas:
>>> On Wed, 04 Mar 2015 13:35:55 +0100
>>> Filip Havlí?ek wrote:
>>>> I would like to ask you, how can I *allow **only **legitimate* email
>>>> addresses (existing users) for bayes learning?
>>
>> On 04.03.15 14:37, RW wrote:
>>> Why send them through SpamAssassin in the first place?
>>
>> He apparently wants to filter mail for spam but can't reject nonexistent
>> users recipients :-)
>
> in other words he is a backscatter and part of the spam-problem
> because if you don't know your own valid users where do your MTA
> deliver to and what happens with mail not rejected but not deliverable?
>
>> However, that would also mean that spam going to random - nonexistent
>> users
>> will NOT be trained even if it scores damn high
>
> and luckily all the not catched spam with a damned low score too
>
Re: Bayes learning for legitimate users
Posted by Reindl Harald <h....@thelounge.net>.
Am 04.03.2015 um 19:57 schrieb Matus UHLAR - fantomas:
>> On Wed, 04 Mar 2015 13:35:55 +0100
>> Filip Havlí?ek wrote:
>>> I would like to ask you, how can I *allow **only **legitimate* email
>>> addresses (existing users) for bayes learning?
>
> On 04.03.15 14:37, RW wrote:
>> Why send them through SpamAssassin in the first place?
>
> He apparently wants to filter mail for spam but can't reject nonexistent
> users recipients :-)
in other words he is a backscatter and part of the spam-problem because
if you don't know your own valid users where do your MTA deliver to and
what happens with mail not rejected but not deliverable?
> However, that would also mean that spam going to random - nonexistent users
> will NOT be trained even if it scores damn high
and luckily all the not catched spam with a damned low score too
Re: Bayes learning for legitimate users
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
>On Wed, 04 Mar 2015 13:35:55 +0100
>Filip Havlí?ek wrote:
>> I would like to ask you, how can I *allow **only **legitimate* email
>> addresses (existing users) for bayes learning?
On 04.03.15 14:37, RW wrote:
>Why send them through SpamAssassin in the first place?
He apparently wants to filter mail for spam but can't reject nonexistent
users recipients :-)
However, that would also mean that spam going to random - nonexistent users
will NOT be trained even if it scores damn high.
>Don't turn-off auto-training unless you have a strategy for replacing
>it.
agreed.
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
"Where do you want to go to die?" [Microsoft]
Re: Bayes learning for legitimate users
Posted by RW <rw...@googlemail.com>.
On Wed, 04 Mar 2015 13:35:55 +0100
Filip Havlí?ek wrote:
> Hi,
>
> I would like to ask you, how can I *allow **only **legitimate* email
> addresses (existing users) for bayes learning?
Why send them through SpamAssassin in the first place?
> Table bayes_token grow up to 0,5GB right now, because there are
> thounsands of unknown email addresses like:
That table shouldn't grow without limit , you can run
sa-learn --force-expire from cron to prevent this. You may want to
increase bayes_expiry_max_db_size before to prevent the size plummeting.
Alternately you can expire directly using SQL based on time.
Some people add a timestamp field to the bayes_seen table to expire
entries from SQL. Alternately you can simple empty the table
occasionally, the information is only needed to reverse or forget
training.
Don't turn-off auto-training unless you have a strategy for replacing
it.