You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Neil <ne...@voidfx.net> on 2008/11/07 10:02:09 UTC

Checking for SPF & DKIM Checks

Is there a way to check if SPFs and DKIMs are being checked by  
SpamAssassin?

Here is, I believe, the relevant spamassassin -D --lint output as far  
as modules go:
[19018] dbg: dns: is Net::DNS::Resolver available? yes
[19018] dbg: dns: Net::DNS version: 0.63
[19018] dbg: diag: module not installed: Mail::SPF ('require' failed)
[19018] dbg: diag: module installed: Mail::SPF::Query, version 1.999001
[19018] dbg: diag: module installed: Mail::DomainKeys, version 1.0
[19018] dbg: diag: module installed: Mail::DKIM, version 0.31

My understanding is Mail::SPF is not needed if you have  
Mail::SPF::Query installed.

I've not seen any sign of SPF or DKIM (or DomainKeys) checks, neither  
in any of my spam reports (and I've been checking just about every  
spam recently) nor in debug output when I've run specific spams  
through spamassassin manually.

Thanks,
-Neil.

Re: Checking for SPF & DKIM Checks

Posted by Mark Martinec <Ma...@ijs.si>.
> > Yes. It's also pointless imho to ise DomainKeys and DKIM both, DKIM is
> > preferred afaik.
>
> Well, I have them both to for when other people use one or the other;
> currently I'm not using either on outbound.

It is pointless to use DomainKeys SA plugin when a DKIM plugin is in use.
The DKIM plugin checks both the DKIM as well as DomainKeys signatures.
Just make sure to use a fairly recent version of Mail::DKIM module,
the 0.32 is ok.

> > I strongly advise you to remove that customisation and let other rules do
> > their job. Otherwise you'll get flooded by spammers who DKIM-sign their
> > spam.

Agreed. Many spammers use short-lived domains and sign their spam with DKIM.
I suspect that more will do so in the future. It is essential that domain
reputation in one way or another enters the SpamAssassin score, either in
a form of hand-crafted rules for popular domains like gmail.com or yahoo.com
or paypal.com, or with some automation, like the optional signing-domain
-based AWL in current SA 3.3 (cvs), or by the use of emerging reputation 
services.

Collecting average score from AWL database on DKIM- (or DK)-signed mail only
for the last month or two, I see 925 different domains signing their mail.
Of these domains about half of them have an average spam score below 5.

But, one third of signing domains achieve an average score above 15.3 !!!
Among these there are some high-rate spam-spewing domains like
FreeLotto.com, webglobaldomain.com, thedailyinfo.info, yahoo.cn, yahoo.in.

It clearly indicates that a mere presence of a valid DKIM/DK signature
is a weak indication of spam or ham, but combined with a domain name
it can contribute valuable score points.

For example, average spam score of mail with a From address
in gmail.com shows:
  average score = -2.8 for mail with valid gmail.com DKIM signature;
  average score = 10.8 for mail without a valid signature
and similarly for yahoo.com:
  average score = -0.7 for mail with valid yahoo.com DK signature;
  average score = 29.5 for mail without a valid signature

In the SA cvs tree under rulesrc/sandbox/mmartinec/ I keep
three .cf files that I'm using, which assign a couple of score
points for mail claiming to be from gmail, yahoo, ebay and paypal,
but is not. On the other hand, DKIM-based whitelist protects
valid mail from trustworthy domains:
  25_dkim.cf, 25_yg.cf, 60_whitelist_dkim.cf


Mark



Re: Checking for SPF & DKIM Checks

Posted by Byung-Hee HWANG <bh...@izb.knu.ac.kr>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matus UHLAR - fantomas wrote:
>>> On 10.11.08 04:11, Byung-Hee HWANG wrote:
>>>> Well, i don't care. I accept the emails passed by DKIM, anyway..
> 
>> Matus UHLAR - fantomas wrote:
>>> so you intentionally create false negatives just because they are DKIM
>>> signed?
> 
> On 10.11.08 07:34, Byung-Hee HWANG wrote:
>> My answer is "Yes" if i should say. Because of the spam case is the
>> concern of the hosting, not DKIM. Yahoo and Google are trying for the
>> such spam case.
> 
>> Let's get serious. If you had reading specs of RFC4408 and RFC4871, you
>> know the role of both SPF and DKIM. Exactly both SPF and DKIM are tools
>> for anti-pishing, not anti-spam (at here i defined the term "SPAM" as
>> "UCE"). Sometimes we received the spam passed DKIM from Yahoo and
>> Google. However. We have no way to stop the such spam in this time.
>> Because stopping the such spam is not DKIM's scope.
> 
> I _know_ the scope of SPF and DKIM. They both don't say that mail is ham or
> the spam, they only say if it's forged:
[...snip...]
The above statement is what i wanted to hear from you ;;

[...snip...]
> Giving them that big negative (well... low) score is just stupid.
> 
> I strongly advise you to remove that customisation and let other rules do
> their job. Otherwise you'll get flooded by spammers who DKIM-sign their
> spam.

Thanks for advice. But, nevertheless, i'll keep the score "-45.3" for
DKIM_VERIFIED. That's only my concern. OK, if you want to see my the
customization, see following:

<URL:http://izb.knu.ac.kr/~bh/stuff/izb-spamassassin-local.cf.example>

byunghee

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iEYEARECAAYFAkkXfUwACgkQsCouaZaxlv6KAQCgikobNguI/oKoPoRidsqUBMUl
nVkAn0X0Ts+iexnqmMOJWhn/jtNWM4Sq
=/cSL
-----END PGP SIGNATURE-----

Re: Checking for SPF & DKIM Checks

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
> > On 10.11.08 04:11, Byung-Hee HWANG wrote:
> >> Well, i don't care. I accept the emails passed by DKIM, anyway..

> Matus UHLAR - fantomas wrote:
> > so you intentionally create false negatives just because they are DKIM
> > signed?

On 10.11.08 07:34, Byung-Hee HWANG wrote:
> My answer is "Yes" if i should say. Because of the spam case is the
> concern of the hosting, not DKIM. Yahoo and Google are trying for the
> such spam case.

> Let's get serious. If you had reading specs of RFC4408 and RFC4871, you
> know the role of both SPF and DKIM. Exactly both SPF and DKIM are tools
> for anti-pishing, not anti-spam (at here i defined the term "SPAM" as
> "UCE"). Sometimes we received the spam passed DKIM from Yahoo and
> Google. However. We have no way to stop the such spam in this time.
> Because stopping the such spam is not DKIM's scope.

I _know_ the scope of SPF and DKIM. They both don't say that mail is ham or
the spam, they only say if it's forged:

- if it's forged, it's likely to be spam.
That's why many people reject mail that (hardly) fails SPF (and maybe DKIM).

- if it's not forged, we do not know anything about it.
That's why the SPF_PASS and DKIM_VERIFIED scores are nearly zero by default.

Spammers use SPF, maybe they (will) use DKIM, but the last fact above makes
us safe not to trust any mail that passes SPF/DKIM checks.

What you are doing, is that you (as I repeat) intentionally make all
DKIM-signed spams pass, so spammers using DKIM will pass your system unless
they get ~50 points from other rules.

> So what we says "DKIM is bad" is wasting times for the spam passed DKIM
> from Yahoo and Google. As same step, we cannot say "SPF is bad". We need
> to talk more about this issue.

I have never said that DKIM or SPF is bad. I said that scores for them
passing are and should be (nearly) zero.

Giving them that big negative (well... low) score is just stupid.

I strongly advise you to remove that customisation and let other rules do
their job. Otherwise you'll get flooded by spammers who DKIM-sign their
spam.

-- 
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.
I feel like I'm diagonally parked in a parallel universe. 

Re: Checking for SPF & DKIM Checks

Posted by Byung-Hee HWANG <bh...@izb.knu.ac.kr>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matus UHLAR - fantomas wrote:
>> mouss wrote:
>>> Byung-Hee HWANG wrote:
>>>> mouss wrote:
>>>> [...]
>>>>> let's start with DKIM.
>>>>> do you have
>>>>> loadplugin Mail::SpamAssassin::Plugin::DKIM
>>>> + i'm use with following rule ;;
>>>> score DKIM_VERIFIED    -45.3
>>>>
>>> then you won't catch spam relayed by yahoo, ... etc.
> 
> On 10.11.08 04:11, Byung-Hee HWANG wrote:
>> Well, i don't care. I accept the emails passed by DKIM, anyway..
> 
> so you intentionally create false negatives just because they are DKIM
> signed?

My answer is "Yes" if i should say. Because of the spam case is the
concern of the hosting, not DKIM. Yahoo and Google are trying for the
such spam case.

Let's get serious. If you had reading specs of RFC4408 and RFC4871, you
know the role of both SPF and DKIM. Exactly both SPF and DKIM are tools
for anti-pishing, not anti-spam (at here i defined the term "SPAM" as
"UCE"). Sometimes we received the spam passed DKIM from Yahoo and
Google. However. We have no way to stop the such spam in this time.
Because stopping the such spam is not DKIM's scope.

So what we says "DKIM is bad" is wasting times for the spam passed DKIM
from Yahoo and Google. As same step, we cannot say "SPF is bad". We need
to talk more about this issue.

byunghee
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iEYEARECAAYFAkkXZZMACgkQsCouaZaxlv6gowCghrzT8q+km/AlSMw7sxsjJkHA
bW4An1yJ2QLUYfMI24X53xIhU5dv6Zc6
=j8qH
-----END PGP SIGNATURE-----

Re: Checking for SPF & DKIM Checks

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
> mouss wrote:
> > Byung-Hee HWANG wrote:
> >> mouss wrote:
> >> [...]
> >>> let's start with DKIM.
> >>
> >>> do you have
> >>> loadplugin Mail::SpamAssassin::Plugin::DKIM
> >>
> >> + i'm use with following rule ;;
> >> score DKIM_VERIFIED    -45.3
> >>
> > 
> > then you won't catch spam relayed by yahoo, ... etc.

On 10.11.08 04:11, Byung-Hee HWANG wrote:
> Well, i don't care. I accept the emails passed by DKIM, anyway..

so you intentionally create false negatives just because they are DKIM
signed?

-- 
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.
I just got lost in thought. It was unfamiliar territory. 

Re: Checking for SPF & DKIM Checks

Posted by Byung-Hee HWANG <bh...@izb.knu.ac.kr>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

mouss wrote:
> Byung-Hee HWANG wrote:
>> mouss wrote:
>> [...]
>>> let's start with DKIM.
>>
>>> do you have
>>> loadplugin Mail::SpamAssassin::Plugin::DKIM
>>
>> + i'm use with following rule ;;
>> score DKIM_VERIFIED    -45.3
>>
> 
> then you won't catch spam relayed by yahoo, ... etc.
> 
Well, i don't care. I accept the emails passed by DKIM, anyway..

byunghee
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iEYEARECAAYFAkkXNfMACgkQsCouaZaxlv4prwCgve415FYyvkY9QqT157uWKoD/
C0MAn1Ui/mRXH23KL1kagqJxZb6oVArW
=aZNI
-----END PGP SIGNATURE-----

Re: Checking for SPF & DKIM Checks

Posted by mouss <mo...@netoyen.net>.
Byung-Hee HWANG wrote:
> mouss wrote:
> [...]
>> let's start with DKIM.
> 
>> do you have
>> loadplugin Mail::SpamAssassin::Plugin::DKIM
> 
> + i'm use with following rule ;;
> score DKIM_VERIFIED	-45.3
> 

then you won't catch spam relayed by yahoo, ... etc.


Re: Checking for SPF & DKIM Checks

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
> >> Even with the default DKIM scores, I finding I am getting spam that are
> >> DKIM_VERIFIED causing the score to dip below zero and let the message
> >> through, for example:
> >>
> >> http://micah.riseup.net/1
> >
> > that's spam relayed by a debian list. definitely a different beast...

On 09.11.08 21:28, Francis Russell wrote:
> As for DKIM, surely it's a bad thing to give it any score? It's supposed 
> to be an authentication mechanism not an anti-spam mechanism in itself.

Assigning them a score is not a bad idea. Especially for failed DKIM tests.
afaik they are currently onearly zero because they are only being tested.

But assigning negative score not close to zero when DKIM test passes is very
risky and I will keep tham at scores close to 0.

-- 
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.
Depression is merely anger without enthusiasm. 

Re: Checking for SPF & DKIM Checks

Posted by Francis Russell <Fr...@btinternet.com>.
 >> Even with the default DKIM scores, I finding I am getting spam that are
 >> DKIM_VERIFIED causing the score to dip below zero and let the message
 >> through, for example:
 >>
 >> http://micah.riseup.net/1
 >
 > that's spam relayed by a debian list. definitely a different beast...

I interpret those headers as spam being sent to a Debian e-mail address, 
then forwarded to a personal address.

As for DKIM, surely it's a bad thing to give it any score? It's supposed 
to be an authentication mechanism not an anti-spam mechanism in itself.

The problem with all those emails is that the only sign that they're 
spam is the content itself. 20_advance_fee.cf contains all the rules 
that try to catch these types of messages. Your best bet is to try to 
create some more variations on those, or as John said, the sought_fraud 
ruleset as well.

Francis

Re: Checking for SPF & DKIM Checks

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
> mouss <mo...@netoyen.net> writes:
> > That's what I meant. Maybe I use the term "relay" too "liberally"?
> > anyway, such spam is harder to stop unless you add the list relays to
> > your trusted_networks.

On 11.11.08 12:05, Micah Anderson wrote:
> This is something in SA that I have the hardest time understanding, the
> trusted_networks and internal_networks settings. I've read all the posts
> that try to clarify it and I still can't keep it straight :) 
> 
> How would adding a list relay to my trusted_networks actually make
> stopping spam easier? Doesn't that make it a network that I should spend
> less time doing SA processing, because I 'trust' it?

configuring trusted hosts affects which hosts are checked in many blacklists
and whitelists.
-- 
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.
Linux IS user friendly, it's just selective who its friends are...

Re: Checking for SPF & DKIM Checks

Posted by mouss <mo...@netoyen.net>.
Micah Anderson wrote:
> mouss <mo...@netoyen.net> writes:
> 
>> Francis Russell wrote:
>>>  >> Even with the default DKIM scores, I finding I am getting spam that are
>>>  >> DKIM_VERIFIED causing the score to dip below zero and let the message
>>>  >> through, for example:
>>>  >>
>>>  >> http://micah.riseup.net/1
>>>  >
>>>  > that's spam relayed by a debian list. definitely a different beast...
>>>
>>> I interpret those headers as spam being sent to a Debian e-mail
>>> address, then forwarded to a personal address.
> 
> That is a correct interpretation. I get most of my spam this way.
> 
>> That's what I meant. Maybe I use the term "relay" too "liberally"?
>> anyway, such spam is harder to stop unless you add the list relays to
>> your trusted_networks.
> 
> This is something in SA that I have the hardest time understanding, the
> trusted_networks and internal_networks settings. I've read all the posts
> that try to clarify it and I still can't keep it straight :) 
> 
> How would adding a list relay to my trusted_networks actually make
> stopping spam easier? Doesn't that make it a network that I should spend
> less time doing SA processing, because I 'trust' it?
> 

trusted means that it does not originate spam, and in particular, that 
you can trust the Received headers added by the said relay.

for example, your own relay will relay spam (if not, then you don't need 
a filter!), but you trust it not to originate that spam (otherwise, you 
need to fix the problem, because you will probably hit ALL_TRUSTED) and 
doesn't forge Received headers.

this may look paradoxal, but you can view it as: "the more friends you 
trust, the more you can focus on ennemies".

but there's no need to go that far. in this particular case, spam is 
coming via a debian server which is listed in DNSWL, so it gets few 
negative points. but if you add the debian server to your 
trusted_networks, then the corresponding relay is skipped and you won't 
get the DNSWL hit.

note that I am not recommending that you add the debian server to your 
trusted_networks, nor I am recommending against.

maybe there's a need for a "safe_networks" (or "white_networks") setting?



Re: Checking for SPF & DKIM Checks

Posted by Greg Troxel <gd...@ir.bbn.com>.
Micah Anderson <mi...@riseup.net> writes:

> mouss <mo...@netoyen.net> writes:
>
>> That's what I meant. Maybe I use the term "relay" too "liberally"?
>> anyway, such spam is harder to stop unless you add the list relays to
>> your trusted_networks.
>
> This is something in SA that I have the hardest time understanding, the
> trusted_networks and internal_networks settings. I've read all the posts
> that try to clarify it and I still can't keep it straight :) 
>
> How would adding a list relay to my trusted_networks actually make
> stopping spam easier? Doesn't that make it a network that I should spend
> less time doing SA processing, because I 'trust' it?

internal_networks should be your own computers.

It's not about less time, it's about being able to believe the previous
hop IP and look it up in RBLs.

trusted_networks is the set of all IP addresses that deliver mail to you
that have the 'reliable headers' property.  In the current case, the
debian server is sending some spam, but almost surely the Received:
lines on that spam are correct.  So if the server's address is in
trusted_networks, your SA will look up the address debian got the mail
From in RBLs.  I added the netbsd mail server and several others to
trusted_networks and got a big improvement in spam filtering.

Re: Checking for SPF & DKIM Checks

Posted by Micah Anderson <mi...@riseup.net>.
mouss <mo...@netoyen.net> writes:

> Francis Russell wrote:
>>  >> Even with the default DKIM scores, I finding I am getting spam that are
>>  >> DKIM_VERIFIED causing the score to dip below zero and let the message
>>  >> through, for example:
>>  >>
>>  >> http://micah.riseup.net/1
>>  >
>>  > that's spam relayed by a debian list. definitely a different beast...
>>
>> I interpret those headers as spam being sent to a Debian e-mail
>> address, then forwarded to a personal address.

That is a correct interpretation. I get most of my spam this way.

> That's what I meant. Maybe I use the term "relay" too "liberally"?
> anyway, such spam is harder to stop unless you add the list relays to
> your trusted_networks.

This is something in SA that I have the hardest time understanding, the
trusted_networks and internal_networks settings. I've read all the posts
that try to clarify it and I still can't keep it straight :) 

How would adding a list relay to my trusted_networks actually make
stopping spam easier? Doesn't that make it a network that I should spend
less time doing SA processing, because I 'trust' it?

micah


Re: Checking for SPF & DKIM Checks

Posted by mouss <mo...@netoyen.net>.
Francis Russell wrote:
>  >> Even with the default DKIM scores, I finding I am getting spam that are
>  >> DKIM_VERIFIED causing the score to dip below zero and let the message
>  >> through, for example:
>  >>
>  >> http://micah.riseup.net/1
>  >
>  > that's spam relayed by a debian list. definitely a different beast...
> 
> I interpret those headers as spam being sent to a Debian e-mail address, 
> then forwarded to a personal address.
> 

That's what I meant. Maybe I use the term "relay" too "liberally"? 
anyway, such spam is harder to stop unless you add the list relays to 
your trusted_networks.

> As for DKIM, surely it's a bad thing to give it any score? It's supposed 
> to be an authentication mechanism not an anti-spam mechanism in itself.
> 

same can be said for many other rules/methods. checking that a message 
is well formed is not an anti-spam measure in itself. checking that a 
message is not html-only is not an anti-spam measure in itself. but 
these things are patterns that can help detect spam. No single approach 
will detect all spam. SA is about using multiple patterns to detect spam.

> The problem with all those emails is that the only sign that they're 
> spam is the content itself. 20_advance_fee.cf contains all the rules 
> that try to catch these types of messages. Your best bet is to try to 
> create some more variations on those, or as John said, the sought_fraud 
> ruleset as well.

Re: Checking for SPF & DKIM Checks

Posted by Francis Russell <fr...@yahoo.co.uk>.
 >> Even with the default DKIM scores, I finding I am getting spam that are
 >> DKIM_VERIFIED causing the score to dip below zero and let the message
 >> through, for example:
 >>
 >> http://micah.riseup.net/1
 >
 > that's spam relayed by a debian list. definitely a different beast...

I interpret those headers as spam being sent to a Debian e-mail address, 
then forwarded to a personal address.

As for DKIM, surely it's a bad thing to give it any score? It's supposed 
to be an authentication mechanism not an anti-spam mechanism in itself.

The problem with all those emails is that the only sign that they're 
spam is the content itself. 20_advance_fee.cf contains all the rules 
that try to catch these types of messages. Your best bet is to try to 
create some more variations on those, or as John said, the sought_fraud 
ruleset as well.

Francis

Re: Checking for SPF & DKIM Checks

Posted by Graham Murray <gr...@gmurray.org.uk>.
mouss <mo...@netoyen.net> writes:

> I personally don't care of such spam (spam sent to MLs) unless there
> is a lotof it. Ideally, it should be stopped by the list server.

Unfortunately there often is, and the servers do not stop it. I notice
it especially with some sourceforge list where nearly all postings to
some list being spam with only the occasional on-topic posting.

Re: Checking for SPF & DKIM Checks

Posted by mouss <mo...@netoyen.net>.
Micah Anderson wrote:
> Byung-Hee HWANG <bh...@izb.knu.ac.kr> writes:
> 
>> mouss wrote:
>> [...]
>>> let's start with DKIM.
>>>
>>> do you have
>>> loadplugin Mail::SpamAssassin::Plugin::DKIM
>> + i'm use with following rule ;;
>> score DKIM_VERIFIED	-45.3
> 
> Even with the default DKIM scores, I finding I am getting spam that are
> DKIM_VERIFIED causing the score to dip below zero and let the message
> through, for example:
> 
> http://micah.riseup.net/1

that's spam relayed by a debian list. definitely a different beast...

I personally don't care of such spam (spam sent to MLs) unless there is 
a lotof it. Ideally, it should be stopped by the list server.

> 
> I am thinking of actually increasing the score because of this.

I wouldn't do that. you could create rules to catch this particular junk.

Re: Checking for SPF & DKIM Checks

Posted by Micah Anderson <mi...@riseup.net>.
Byung-Hee HWANG <bh...@izb.knu.ac.kr> writes:

> mouss wrote:
> [...]
>> let's start with DKIM.
>> 
>> do you have
>> loadplugin Mail::SpamAssassin::Plugin::DKIM
>
> + i'm use with following rule ;;
> score DKIM_VERIFIED	-45.3

Even with the default DKIM scores, I finding I am getting spam that are
DKIM_VERIFIED causing the score to dip below zero and let the message
through, for example:

http://micah.riseup.net/1

I am thinking of actually increasing the score because of this.

micah


Re: Checking for SPF & DKIM Checks

Posted by Byung-Hee HWANG <bh...@izb.knu.ac.kr>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

mouss wrote:
[...]
> let's start with DKIM.
> 
> do you have
> loadplugin Mail::SpamAssassin::Plugin::DKIM

+ i'm use with following rule ;;
score DKIM_VERIFIED	-45.3

byunghee



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iEYEARECAAYFAkkXIOwACgkQsCouaZaxlv4GawCeNmUcIaKwhoIWY2wJCqyvwZ7n
oNkAn0dc3f+TiBR5erKkioQRQNj9rk/t
=MMuX
-----END PGP SIGNATURE-----

Re: Checking for SPF & DKIM Checks

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 08.11.08 16:47, Neil wrote:
> Do you have any recommendations on scores for these rules?

I increased score of SPF_FAIL to 10. spfmilter usually crashes and this is
another way to implement spf checks for me :)
-- 
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.
On the other hand, you have different fingers. 

Re: Checking for SPF & DKIM Checks

Posted by mouss <mo...@netoyen.net>.
Neil wrote:
> [snip]
> Heh, thanks for helping me out with this.
> 
> Do you have any recommendations on scores for these rules?


I use the default scores for these.

Re: Checking for SPF & DKIM Checks

Posted by Neil <ne...@voidfx.net>.
On 8 Nov 2008, at 16:41, mouss wrote:

> Neil wrote:
>> [snip]
>> Content analysis details:   (-6.1 points, 4.5 required)
>> pts rule name              description
>> ---- ----------------------  
>> --------------------------------------------------
>> -0.0 SPF_PASS               SPF: sender matches SPF record
>
> This is because SA list domain has an SPF.
>
>> -0.0 DKIM_VERIFIED          Domain Keys Identified Mail: signature  
>> passes
>>                            verification
>> 0.0 DKIM_SIGNED            Domain Keys Identified Mail: message has  
>> a signature
>
> these are because my message is signed.
>
>> -2.6 BAYES_00               BODY: Bayesian spam probability is 0 to  
>> 1%
>>                            [score: 0.0000]
>
> this is because the message matches your Bayes data
>
>> -4.0 RCVD_IN_DNSWL_MED      RBL: Sender listed at http://www.dnswl.org/ 
>> , medium
>
> this is because SA server is listed in DNSWL.
>
>>                             trust
>>                            [140.211.11.2 listed in list.dnswl.org]
>> 0.5 AWL                    AWL: From: address is in the auto white- 
>> list
>
> This is because other messages from me were considered ham.
>
>
> so it works now!
>
> happy assassinating ;-)
>


Heh, thanks for helping me out with this.

Do you have any recommendations on scores for these rules?

Re: Checking for SPF & DKIM Checks

Posted by mouss <mo...@netoyen.net>.
Neil wrote:
> [snip]
> 
> Content analysis details:   (-6.1 points, 4.5 required)
> 
>  pts rule name              description
> ---- ---------------------- 
> --------------------------------------------------
> -0.0 SPF_PASS               SPF: sender matches SPF record

This is because SA list domain has an SPF.

> -0.0 DKIM_VERIFIED          Domain Keys Identified Mail: signature passes
>                             verification
>  0.0 DKIM_SIGNED            Domain Keys Identified Mail: message has a 
> signature

these are because my message is signed.

> -2.6 BAYES_00               BODY: Bayesian spam probability is 0 to 1%
>                             [score: 0.0000]

this is because the message matches your Bayes data

> -4.0 RCVD_IN_DNSWL_MED      RBL: Sender listed at http://www.dnswl.org/, 
> medium

this is because SA server is listed in DNSWL.

>                              trust
>                             [140.211.11.2 listed in list.dnswl.org]
>  0.5 AWL                    AWL: From: address is in the auto white-list

This is because other messages from me were considered ham.

> 

so it works now!

happy assassinating ;-)




Re: Checking for SPF & DKIM Checks

Posted by Neil <ne...@voidfx.net>.
On 8 Nov 2008, at 12:53, mouss wrote:

> Neil wrote:
>> On 8 Nov 2008, at 07:40, mouss wrote:
>>> Neil wrote:
>>>> But still; how can I know that SPF and DKIM checks are working?
>>>
>>>
>>> copy _this_ message (the one you are reading now) to a file:  
>>> message.eml, then (assuming a Bourne shell, not a C shell), run
>>>
>>> # spamassassin -D -t < message.eml 2>&1 | tee sa.out
>>>
>>> and check sa.out for spf and dkim.
>>>
>> Done, (hopefully) relevant excerpts are below.
>> In addition, I grep'ed the entire thing for "spf" and "dkim", and  
>> turned up nothing but the usual suspects (ie. rule files'  
>> filenames, the mail header, and mail body).  Then, just to be  
>> thorough, I read the entire thing, and didn't find anything myself  
>> that would indicate to me that it's doing SPF and/or DKIM checks.
>> Thanks for all the help,
>> Neil.
>>
[snip]
>> Content analysis details:   (-6.1 points, 4.5 required)
>> pts rule name              description
>> ---- ----------------------  
>> --------------------------------------------------
>> -2.6 BAYES_00               BODY: Bayesian spam probability is 0 to  
>> 1%
>>                            [score: 0.0000]
>> -4.0 RCVD_IN_DNSWL_MED      RBL: Sender listed at http://www.dnswl.org/ 
>> , medium
>>                             trust
>>                            [140.211.11.2 listed in list.dnswl.org]
>> 0.5 AWL                    AWL: From: address is in the auto white- 
>> list
>
> let's start with DKIM.
>
> do you have
> loadplugin Mail::SpamAssassin::Plugin::DKIM
>
> (uncommented) in one of your .pre files?
>


Yeah, I found that in v312.pre commented.  I assumed I should  
uncomment it, and did.  Likewise, I found SPF in init.pre, commented,  
and so I uncommented it as well.

Another test of your sample mail gave me the following report:


Content analysis details:   (-6.1 points, 4.5 required)

  pts rule name              description
---- ----------------------  
--------------------------------------------------
-0.0 SPF_PASS               SPF: sender matches SPF record
-0.0 DKIM_VERIFIED          Domain Keys Identified Mail: signature  
passes
                             verification
  0.0 DKIM_SIGNED            Domain Keys Identified Mail: message has  
a signature
-2.6 BAYES_00               BODY: Bayesian spam probability is 0 to 1%
                             [score: 0.0000]
-4.0 RCVD_IN_DNSWL_MED      RBL: Sender listed at http:// 
www.dnswl.org/, medium
                              trust
                             [140.211.11.2 listed in list.dnswl.org]
  0.5 AWL                    AWL: From: address is in the auto white- 
list



Re: Checking for SPF & DKIM Checks

Posted by mouss <mo...@netoyen.net>.
Neil wrote:
> 
> On 8 Nov 2008, at 07:40, mouss wrote:
> 
>> Neil wrote:
>>> But still; how can I know that SPF and DKIM checks are working?
>>
>>
>> copy _this_ message (the one you are reading now) to a file: 
>> message.eml, then (assuming a Bourne shell, not a C shell), run
>>
>> # spamassassin -D -t < message.eml 2>&1 | tee sa.out
>>
>> and check sa.out for spf and dkim.
>>
> 
> Done, (hopefully) relevant excerpts are below.
> 
> In addition, I grep'ed the entire thing for "spf" and "dkim", and turned 
> up nothing but the usual suspects (ie. rule files' filenames, the mail 
> header, and mail body).  Then, just to be thorough, I read the entire 
> thing, and didn't find anything myself that would indicate to me that 
> it's doing SPF and/or DKIM checks.
> 
> Thanks for all the help,
> Neil.
> 
> 
> [23928] dbg: config: fixed relative path: 
> /var/lib/spamassassin/3.002001/updates_spamassassin_org/25_dkim.cf
> [23928] dbg: config: using 
> "/var/lib/spamassassin/3.002001/updates_spamassassin_org/25_dkim.cf" for 
> included file
> [23928] dbg: config: read file 
> /var/lib/spamassassin/3.002001/updates_spamassassin_org/25_dkim.cf
> [23928] dbg: config: fixed relative path: 
> /var/lib/spamassassin/3.002001/updates_spamassassin_org/25_domainkeys.cf
> [23928] dbg: config: using 
> "/var/lib/spamassassin/3.002001/updates_spamassassin_org/25_domainkeys.cf" 
> for included file
> [23928] dbg: config: read file 
> /var/lib/spamassassin/3.002001/updates_spamassassin_org/25_domainkeys.cf
> ...
> [23928] dbg: config: fixed relative path: 
> /var/lib/spamassassin/3.002001/updates_spamassassin_org/25_spf.cf
> [23928] dbg: config: using 
> "/var/lib/spamassassin/3.002001/updates_spamassassin_org/25_spf.cf" for 
> included file
> [23928] dbg: config: read file 
> /var/lib/spamassassin/3.002001/updates_spamassassin_org/25_spf.cf
> ...
> [23928] dbg: config: fixed relative path: 
> /var/lib/spamassassin/3.002001/updates_spamassassin_org/60_whitelist_dkim.cf 
> 
> [23928] dbg: config: using 
> "/var/lib/spamassassin/3.002001/updates_spamassassin_org/60_whitelist_dkim.cf" 
> for included file
> [23928] dbg: config: read file 
> /var/lib/spamassassin/3.002001/updates_spamassassin_org/60_whitelist_dkim.cf 
> 
> [23928] dbg: config: fixed relative path: 
> /var/lib/spamassassin/3.002001/updates_spamassassin_org/60_whitelist_spf.cf
> [23928] dbg: config: using 
> "/var/lib/spamassassin/3.002001/updates_spamassassin_org/60_whitelist_spf.cf" 
> for included file
> [23928] dbg: config: read file 
> /var/lib/spamassassin/3.002001/updates_spamassassin_org/60_whitelist_spf.cf
> ...
> [23928] dbg: check: is spam? score=-6.053 required=4.5
> [23928] dbg: check: tests=AWL,BAYES_00,RCVD_IN_DNSWL_MED
> [23928] dbg: check: 
> subtests=__CT,__CTE,__CT_TEXT_PLAIN,__DOS_HAS_ANY_URI,__DOS_HAS_LIST_ID,__DOS_HAS_LIST_UNSUB,__DOS_HAS_MAILING_LIST,__DOS_RCVD_SAT,__DOS_RELAYED_EXT,__FS_SUBJ_RE,__HAS_ANY_URI,__HAS_MSGID,__HAS_RCVD,__HAS_SUBJECT,__LAST_UNTRUSTED_RELAY_NO_AUTH,__MIME_VERSION,__MOZILLA_MSGID,__MSGID_OK_HOST,__NAKED_TO,__NONEMPTY_BODY,__RCVD_IN_DNSWL,__SANE_MSGID,__SUBJ_RE,__TOCC_EXISTS,__TVD_BODY,__TVD_MIME_ATT_TP,__UNUSABLE_MSGID 
> 
> ...
> 
> Content analysis details:   (-6.1 points, 4.5 required)
> 
>  pts rule name              description
> ---- ---------------------- 
> --------------------------------------------------
> -2.6 BAYES_00               BODY: Bayesian spam probability is 0 to 1%
>                             [score: 0.0000]
> -4.0 RCVD_IN_DNSWL_MED      RBL: Sender listed at http://www.dnswl.org/, 
> medium
>                              trust
>                             [140.211.11.2 listed in list.dnswl.org]
>  0.5 AWL                    AWL: From: address is in the auto white-list
> 
> 

let's start with DKIM.

do you have
loadplugin Mail::SpamAssassin::Plugin::DKIM

(uncommented) in one of your .pre files?


Re: Checking for SPF & DKIM Checks

Posted by Neil <ne...@voidfx.net>.
On 8 Nov 2008, at 07:40, mouss wrote:

> Neil wrote:
>> But still; how can I know that SPF and DKIM checks are working?
>
>
> copy _this_ message (the one you are reading now) to a file:  
> message.eml, then (assuming a Bourne shell, not a C shell), run
>
> # spamassassin -D -t < message.eml 2>&1 | tee sa.out
>
> and check sa.out for spf and dkim.
>

Done, (hopefully) relevant excerpts are below.

In addition, I grep'ed the entire thing for "spf" and "dkim", and  
turned up nothing but the usual suspects (ie. rule files' filenames,  
the mail header, and mail body).  Then, just to be thorough, I read  
the entire thing, and didn't find anything myself that would indicate  
to me that it's doing SPF and/or DKIM checks.

Thanks for all the help,
Neil.


[23928] dbg: config: fixed relative path: /var/lib/spamassassin/ 
3.002001/updates_spamassassin_org/25_dkim.cf
[23928] dbg: config: using "/var/lib/spamassassin/3.002001/ 
updates_spamassassin_org/25_dkim.cf" for included file
[23928] dbg: config: read file /var/lib/spamassassin/3.002001/ 
updates_spamassassin_org/25_dkim.cf
[23928] dbg: config: fixed relative path: /var/lib/spamassassin/ 
3.002001/updates_spamassassin_org/25_domainkeys.cf
[23928] dbg: config: using "/var/lib/spamassassin/3.002001/ 
updates_spamassassin_org/25_domainkeys.cf" for included file
[23928] dbg: config: read file /var/lib/spamassassin/3.002001/ 
updates_spamassassin_org/25_domainkeys.cf
...
[23928] dbg: config: fixed relative path: /var/lib/spamassassin/ 
3.002001/updates_spamassassin_org/25_spf.cf
[23928] dbg: config: using "/var/lib/spamassassin/3.002001/ 
updates_spamassassin_org/25_spf.cf" for included file
[23928] dbg: config: read file /var/lib/spamassassin/3.002001/ 
updates_spamassassin_org/25_spf.cf
...
[23928] dbg: config: fixed relative path: /var/lib/spamassassin/ 
3.002001/updates_spamassassin_org/60_whitelist_dkim.cf
[23928] dbg: config: using "/var/lib/spamassassin/3.002001/ 
updates_spamassassin_org/60_whitelist_dkim.cf" for included file
[23928] dbg: config: read file /var/lib/spamassassin/3.002001/ 
updates_spamassassin_org/60_whitelist_dkim.cf
[23928] dbg: config: fixed relative path: /var/lib/spamassassin/ 
3.002001/updates_spamassassin_org/60_whitelist_spf.cf
[23928] dbg: config: using "/var/lib/spamassassin/3.002001/ 
updates_spamassassin_org/60_whitelist_spf.cf" for included file
[23928] dbg: config: read file /var/lib/spamassassin/3.002001/ 
updates_spamassassin_org/60_whitelist_spf.cf
...
[23928] dbg: check: is spam? score=-6.053 required=4.5
[23928] dbg: check: tests=AWL,BAYES_00,RCVD_IN_DNSWL_MED
[23928] dbg: check:  
subtests=__CT,__CTE,__CT_TEXT_PLAIN,__DOS_HAS_ANY_URI,__DOS_HAS_LIST_ID,__DOS_HAS_LIST_UNSUB,__DOS_HAS_MAILING_LIST,__DOS_RCVD_SAT,__DOS_RELAYED_EXT,__FS_SUBJ_RE,__HAS_ANY_URI,__HAS_MSGID,__HAS_RCVD,__HAS_SUBJECT,__LAST_UNTRUSTED_RELAY_NO_AUTH,__MIME_VERSION,__MOZILLA_MSGID,__MSGID_OK_HOST,__NAKED_TO,__NONEMPTY_BODY,__RCVD_IN_DNSWL,__SANE_MSGID,__SUBJ_RE,__TOCC_EXISTS,__TVD_BODY,__TVD_MIME_ATT_TP,__UNUSABLE_MSGID
...

Content analysis details:   (-6.1 points, 4.5 required)

  pts rule name              description
---- ----------------------  
--------------------------------------------------
-2.6 BAYES_00               BODY: Bayesian spam probability is 0 to 1%
                             [score: 0.0000]
-4.0 RCVD_IN_DNSWL_MED      RBL: Sender listed at http:// 
www.dnswl.org/, medium
                              trust
                             [140.211.11.2 listed in list.dnswl.org]
  0.5 AWL                    AWL: From: address is in the auto white- 
list



Re: Checking for SPF & DKIM Checks

Posted by mouss <mo...@netoyen.net>.
Neil wrote:
> 
> But still; how can I know that SPF and DKIM checks are working?
> 


copy _this_ message (the one you are reading now) to a file: 
message.eml, then (assuming a Bourne shell, not a C shell), run

# spamassassin -D -t < message.eml 2>&1 | tee sa.out

and check sa.out for spf and dkim.




Re: Checking for SPF & DKIM Checks

Posted by Neil <ne...@voidfx.net>.
On 7 Nov 2008, at 09:22, Benny Pedersen wrote:

>
> On Fri, November 7, 2008 10:02, Neil wrote:
>
>> My understanding is Mail::SPF is not needed if you have
>> Mail::SPF::Query installed.
>
> currect, but Mail::SPF::Query does not support SPF rr in dns,  
> Mail::SPF does
>

Thanks.

But still; how can I know that SPF and DKIM checks are working?


Re: Checking for SPF & DKIM Checks

Posted by Benny Pedersen <me...@junc.org>.
On Fri, November 7, 2008 10:02, Neil wrote:

> My understanding is Mail::SPF is not needed if you have
> Mail::SPF::Query installed.

currect, but Mail::SPF::Query does not support SPF rr in dns, Mail::SPF does

-- 
Benny Pedersen
Need more webspace ? http://www.servage.net/?coupon=cust37098


Re: Checking for SPF & DKIM Checks

Posted by Neil <ne...@voidfx.net>.
On 7 Nov 2008, at 04:33, Matus UHLAR - fantomas wrote:

> On 07.11.08 04:02, Neil wrote:
>> Is there a way to check if SPFs and DKIMs are being checked by
>> SpamAssassin?
>
>> Here is, I believe, the relevant spamassassin -D --lint output as far
>> as modules go:
>> [19018] dbg: dns: is Net::DNS::Resolver available? yes
>> [19018] dbg: dns: Net::DNS version: 0.63
>> [19018] dbg: diag: module not installed: Mail::SPF ('require' failed)
>> [19018] dbg: diag: module installed: Mail::SPF::Query, version  
>> 1.999001
>> [19018] dbg: diag: module installed: Mail::DomainKeys, version 1.0
>> [19018] dbg: diag: module installed: Mail::DKIM, version 0.31
>>
>> My understanding is Mail::SPF is not needed if you have
>> Mail::SPF::Query installed.
>
> Yes. It's also pointless imho to ise DomainKeys and DKIM both, DKIM is
> preferred afaik.
>

Well, I have them both to for when other people use one or the other;  
currently I'm not using either on outbound.

>> I've not seen any sign of SPF or DKIM (or DomainKeys) checks, neither
>> in any of my spam reports (and I've been checking just about every
>> spam recently) nor in debug output when I've run specific spams
>> through spamassassin manually.
>
> Did you enable network checks?
>

I think so; I'm seeing DNSBLs, etc. in my scores.

-Neil.

Re: Checking for SPF & DKIM Checks

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 07.11.08 04:02, Neil wrote:
> Is there a way to check if SPFs and DKIMs are being checked by  
> SpamAssassin?

> Here is, I believe, the relevant spamassassin -D --lint output as far  
> as modules go:
> [19018] dbg: dns: is Net::DNS::Resolver available? yes
> [19018] dbg: dns: Net::DNS version: 0.63
> [19018] dbg: diag: module not installed: Mail::SPF ('require' failed)
> [19018] dbg: diag: module installed: Mail::SPF::Query, version 1.999001
> [19018] dbg: diag: module installed: Mail::DomainKeys, version 1.0
> [19018] dbg: diag: module installed: Mail::DKIM, version 0.31
> 
> My understanding is Mail::SPF is not needed if you have  
> Mail::SPF::Query installed.

Yes. It's also pointless imho to ise DomainKeys and DKIM both, DKIM is
preferred afaik.

> I've not seen any sign of SPF or DKIM (or DomainKeys) checks, neither  
> in any of my spam reports (and I've been checking just about every  
> spam recently) nor in debug output when I've run specific spams  
> through spamassassin manually.

Did you enable network checks?

-- 
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.
Fighting for peace is like fucking for virginity...