You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Alex <my...@gmail.com> on 2015/12/09 05:03:44 UTC
SPF rules and my domain
Hi,
I'm having some problems with SPF and hoped someone could help me to
understand. I've just set up SPF for a domain and now trying to make
sure that spamassassin for that domain is properly blocking/scoring
mail attempting to spoof the envelope sender.
I'm seeing a number of emails hit T_SPF_PERMERROR, but not SPF_FAIL. I
know SPF_FAIL is a broad rule that doesn't specifically mean SPF
failed for my domain.
I'm seeking a rule that will hit when someone attempts to send mail as
my domain without going through one of my mail servers.
I've investigated a number of the SPF records for which the
T_SPF_PERMERROR hits, and it looks to be malformed SPF records.
However, it's also hit occasionally on my domain. What are the
conditions under which this rule would hit?
Do I need to write a meta that somehow combines SPF_FAIL with my
domain to generate a rule that can be used to score spoof/phishing
emails for my domain?
Should I be able to run an email through "spamassassin -t -D" and have
it evaluate SPF? It seems that once it's received, it's no longer
possible:
Dec 8 22:46:30.700 [19165] dbg: spf: already checked for Received-SPF
headers, proceeding with DNS based checks
Dec 8 22:46:30.700 [19165] dbg: spf: relayed through one or more
trusted relays, cannot use header-based Envelope-From, skipping
I'm using postfix, and will probably eventually reject mail that fails
SPF there, but was having some problems with the current pyspf code,
and would just like to use spamassassin for now.
Thanks,
Alex
Re: SPF rules and my domain
Posted by Reindl Harald <h....@thelounge.net>.
Am 09.12.2015 um 18:25 schrieb Alex:
>>> Please help me understand why SPF_FAIL would not be triggered when an
>>> incoming email using my domain is received by a server that is not in
>>> my SPF record.
>>
>> I think you mean, *FROM* a server that is not in your SPF record.
>>
>> SPF says nothing about the *recipient* MTA.
>
> Unless that recipient MTA is my own, correct?
SPF don't care about the recipient at all
P.S: get rid auf reply-all on maling-lists
Re: SPF rules and my domain
Posted by Reindl Harald <h....@thelounge.net>.
Am 11.12.2015 um 17:11 schrieb Alex:
> On Fri, Dec 11, 2015 at 10:33 AM, Matus UHLAR - fantomas
> <uh...@fantomas.sk> wrote:
>>> On 10.12.15 22:54, Alex wrote:
>>>>
>>>> I don't understand why a message from tripadvisor.com would have
>>>> SPF_FAIL, and as part of trying to understand how SPF works, I'd like
>>>> to figure out what's happening.
>>>>
>>>> Would someone be able to take a look at this message and figure out
>>>> why mail from tripadvisor.com fails SPF?
>>>>
>>>> http://pastebin.com/36hzGcTs
>>
>> On 11.12.15 08:56, Matus UHLAR - fantomas wrote:
>>>
>>> the envelope sender seems to be
>>> bounce-15_HTML-74319930-51788793-10834732-43@bounce.e.tripadvisor.com
>>>
>>> bounce.e.tripadvisor.com seems to have no SPF record, so I also don't
>>> understand why SPF tests should hit at all, maybe SPF HELO tests...
>>
>> disregard, please. I made an mistype when checking the SPF records.
>>
>> The main reason why the mail hits SPF_FAIL is that you don't trust even
>> servers
>> you receive mail from - first three hops:
>>
>> h02p01.smtp.routit.net (h02p01.smtp.routit.net [89.146.30.9])
>> pop3.routit.net ([213.144.235.7])
>> h03p02.smtp.routit.net (h03p02.smtp.routit.net [89.146.30.18])
>
> Is it possible this message was forwarded, breaking the trust path?
when you try to understand a little bit what SPF does the answer is
clearly yes, any Received header not litest in your trusted_networks or
internal_networks after the origin server delivered the mail will not
break SPF but also *every* DNSBL/DNSWL and so fire all sort of
false-postives as well as false negatives
> Reindl wrote:
>> who is that?
>> Received: from h03p02.smtp.routit.net (h03p02.smtp.routit.net [89.146.30.18]) by pop3.routit.net (Postfix)
>> with ESMTP id D0A1B42463
>> for <wy...@example.nl>; Fri, 11 Dec 2015 02:18:21 +0100 (CET)
>>
>> who is that?
>> Received: from pop3.routit.net ([213.144.235.7]) by h02p01.smtp.routit.net with ESMTP; 11
>> Dec 2015 02:18:26 +0100
>>
>> who is that?
>> Received: from h02p01.smtp.routit.net (h02p01.smtp.routit.net [89.146.30.9]) by bwimail02.example.com
>> (Postfix) with ESMTP id 0F8CA345F25 for <wy...@example.com>; Thu, 10 Dec
>> 2015 20:18:38 -0500 (EST)
>
> We're not responsible for the example.nl domain
man that message has *five* Received headers after the tripadvsior
server - and it smells like a combination of forwarding and fetchmail
Received: from pop3.routit.net ([213.144.235.7]) by
h02p01.smtp.routit.net with ESMTP; 11 Dec 2015 02:18:26 +0100
Received: from h03p02.smtp.routit.net (h03p02.smtp.routit.net
[89.146.30.18]) by pop3.routit.net (Postfix) with ESMTP id D0A1B42463
for <wy...@example.nl>; Fri, 11 Dec 2015 02:18:21 +0100 (CET)
> so I don't understand
> where that came from. Perhaps that account forwarded it to the
> wytze.vandenberg@example.com (our domain) without any other
> indications of that having occurred, breaking the trust path?
surely
>> that are in X-Spam-RelaysUntrusted header.
>>
>> the next server in path is:
>> mta3.e.tripadvisor.com ([66.231.81.9])
>>
>> that passes the SPF test.
>
> What did you need to do to test this?
what do you need to test when "mta3.e.tripadvisor.com" is clearly
"tripadvisor.com" and that received header is burried in the middle of
other received headers?
Re: SPF rules and my domain
Posted by Alex <my...@gmail.com>.
Hi,
On Fri, Dec 11, 2015 at 10:33 AM, Matus UHLAR - fantomas
<uh...@fantomas.sk> wrote:
>> On 10.12.15 22:54, Alex wrote:
>>>
>>> I don't understand why a message from tripadvisor.com would have
>>> SPF_FAIL, and as part of trying to understand how SPF works, I'd like
>>> to figure out what's happening.
>>>
>>> Would someone be able to take a look at this message and figure out
>>> why mail from tripadvisor.com fails SPF?
>>>
>>> http://pastebin.com/36hzGcTs
>
>
> On 11.12.15 08:56, Matus UHLAR - fantomas wrote:
>>
>> the envelope sender seems to be
>> bounce-15_HTML-74319930-51788793-10834732-43@bounce.e.tripadvisor.com
>>
>> bounce.e.tripadvisor.com seems to have no SPF record, so I also don't
>> understand why SPF tests should hit at all, maybe SPF HELO tests...
>
> disregard, please. I made an mistype when checking the SPF records.
>
> The main reason why the mail hits SPF_FAIL is that you don't trust even
> servers
> you receive mail from - first three hops:
>
> h02p01.smtp.routit.net (h02p01.smtp.routit.net [89.146.30.9])
> pop3.routit.net ([213.144.235.7])
> h03p02.smtp.routit.net (h03p02.smtp.routit.net [89.146.30.18])
Is it possible this message was forwarded, breaking the trust path?
Reindal wrote:
> who is that?
> Received: from h03p02.smtp.routit.net (h03p02.smtp.routit.net [89.146.30.18]) by pop3.routit.net (Postfix)
> with ESMTP id D0A1B42463
>for <wy...@example.nl>; Fri, 11 Dec 2015 02:18:21 +0100 (CET)
>
> who is that?
> Received: from pop3.routit.net ([213.144.235.7]) by h02p01.smtp.routit.net with ESMTP; 11
> Dec 2015 02:18:26 +0100
>
> who is that?
> Received: from h02p01.smtp.routit.net (h02p01.smtp.routit.net [89.146.30.9]) by bwimail02.example.com
> (Postfix) with ESMTP id 0F8CA345F25 for <wy...@example.com>; Thu, 10 Dec
> 2015 20:18:38 -0500 (EST)
We're not responsible for the example.nl domain, so I don't understand
where that came from. Perhaps that account forwarded it to the
wytze.vandenberg@example.com (our domain) without any other
indications of that having occurred, breaking the trust path?
> that are in X-Spam-RelaysUntrusted header.
>
> the next server in path is:
> mta3.e.tripadvisor.com ([66.231.81.9])
>
> that passes the SPF test.
What did you need to do to test this?
Thanks again,
Alex
Re: SPF rules and my domain
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
>On 10.12.15 22:54, Alex wrote:
>>I don't understand why a message from tripadvisor.com would have
>>SPF_FAIL, and as part of trying to understand how SPF works, I'd like
>>to figure out what's happening.
>>
>>Would someone be able to take a look at this message and figure out
>>why mail from tripadvisor.com fails SPF?
>>
>>http://pastebin.com/36hzGcTs
On 11.12.15 08:56, Matus UHLAR - fantomas wrote:
>the envelope sender seems to be
>bounce-15_HTML-74319930-51788793-10834732-43@bounce.e.tripadvisor.com
>
>bounce.e.tripadvisor.com seems to have no SPF record, so I also don't
>understand why SPF tests should hit at all, maybe SPF HELO tests...
disregard, please. I made an mistype when checking the SPF records.
The main reason why the mail hits SPF_FAIL is that you don't trust even servers
you receive mail from - first three hops:
h02p01.smtp.routit.net (h02p01.smtp.routit.net [89.146.30.9])
pop3.routit.net ([213.144.235.7])
h03p02.smtp.routit.net (h03p02.smtp.routit.net [89.146.30.18])
that are in X-Spam-RelaysUntrusted header.
the next server in path is:
mta3.e.tripadvisor.com ([66.231.81.9])
that passes the SPF test.
That simply indicates error in yout trust path
http://wiki.apache.org/spamassassin/TrustPath
--
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.
There's a long-standing bug relating to the x86 architecture that
allows you to install Windows. -- Matthew D. Fuller
Re: SPF rules and my domain
Posted by Reindl Harald <h....@thelounge.net>.
Am 11.12.2015 um 08:56 schrieb Matus UHLAR - fantomas:
>> I don't understand why a message from tripadvisor.com would have
>> SPF_FAIL, and as part of trying to understand how SPF works, I'd like
>> to figure out what's happening.
>>
>> Would someone be able to take a look at this message and figure out
>> why mail from tripadvisor.com fails SPF?
>>
>> http://pastebin.com/36hzGcTs
>
> the envelope sender seems to be
> bounce-15_HTML-74319930-51788793-10834732-43@bounce.e.tripadvisor.com
>
> bounce.e.tripadvisor.com seems to have no SPF record, so I also don't
> understand why SPF tests should hit at all, maybe SPF HELO tests...
how dou you come to that conclusion and what means "seems" in that
context - there is a TXT record or there is none - it's has one
;; ANSWER SECTION:
bounce.e.tripadvisor.com. 3600 IN TXT "v=spf1
include:cust-spf.exacttarget.com -all"
there is a ton of recievd headres and pretty sure spamassassin is *not*
running on the MTA and internal_netwroks / trusted_networks is not
configured properly at all and in that case DNSBL/DNSWL are also not
wokring properly
that is the last external hop
Received: from mta3.e.tripadvisor.com ([66.231.81.9])
by h03p02.smtp.routit.net with ESMTP; 11 Dec 2015 02:18:24 +0100
_____________________________________________________
who is that?
Received: from h03p02.smtp.routit.net (h03p02.smtp.routit.net
[89.146.30.18]) by pop3.routit.net (Postfix) with ESMTP id D0A1B42463
for <wy...@example.nl>; Fri, 11 Dec 2015 02:18:21 +0100 (CET)
who is that?
Received: from pop3.routit.net ([213.144.235.7]) by
h02p01.smtp.routit.net with ESMTP; 11 Dec 2015 02:18:26 +0100
who is that?
Received: from h02p01.smtp.routit.net (h02p01.smtp.routit.net
[89.146.30.9]) by bwimail02.example.com (Postfix) with ESMTP id
0F8CA345F25 for <wy...@example.com>; Thu, 10 Dec 2015
20:18:38 -0500 (EST)
Re: SPF rules and my domain
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
>>>> > My response was based on how you worded your question, which has been
>>>> > removed from the thread now:
>>>> > > > > > Please help me understand why SPF_FAIL would not be triggered
>>>> > > > > > > > > > when an incoming email using my domain is received by a server > >
>>>> > > > > > > > that is not in my SPF record.
>> On Thu, 10 Dec 2015, Matus UHLAR - fantomas wrote:
>>> The SPF fail SHOULD be triggered in that case.
>On Thu, Dec 10, 2015 at 10:28 AM, John Hardin <jh...@impsec.org> wrote:
>> Matus, I think you misread the question. Again: whether or not the
>> *receiving* MTA is mentioned in the SPF record is immaterial.
>>
>> I don't know whether Alex (at the time) misunderstood SPF and asked a
>> question based on that misunderstanding, which I tried to clarify, or he
>> simply mistyped "by" when he should have typed "from".
On 10.12.15 22:54, Alex wrote:
>Yes, I have no idea why I would have written "by". I meant "from". Too
>many hours of SPF at once, I suppose.
I think I've misread the message in the correct way it was meant :-)
>Is it possible to test spamassassin SPF rules after a message is
>received? I've been unsuccessful:
>
>Dec 10 21:15:02.318 [2402] dbg: spf: relayed through one or more
>trusted relays, cannot use header-based Envelope-From, skipping
I think you need to fake header added by your last trusted relay to include
envelope from. Then, SA could accept that. But you need to use correct
format
>I don't understand why a message from tripadvisor.com would have
>SPF_FAIL, and as part of trying to understand how SPF works, I'd like
>to figure out what's happening.
>
>Would someone be able to take a look at this message and figure out
>why mail from tripadvisor.com fails SPF?
>
>http://pastebin.com/36hzGcTs
the envelope sender seems to be
bounce-15_HTML-74319930-51788793-10834732-43@bounce.e.tripadvisor.com
bounce.e.tripadvisor.com seems to have no SPF record, so I also don't
understand why SPF tests should hit at all, maybe SPF HELO tests...
--
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.
Emacs is a complicated operating system without good text editor.
Re: SPF rules and my domain
Posted by Alex <my...@gmail.com>.
Hi,
On Thu, Dec 10, 2015 at 10:28 AM, John Hardin <jh...@impsec.org> wrote:
> On Thu, 10 Dec 2015, Matus UHLAR - fantomas wrote:
>
>>> > My response was based on how you worded your question, which has been
>>> > removed from the thread now:
>>> > > > > > Please help me understand why SPF_FAIL would not be triggered
>>> > > > > > > > > > when an incoming email using my domain is received by a server > >
>>> > > > > > > > that is not in my SPF record.
>>
>> The SPF fail SHOULD be triggered in that case.
>
> Matus, I think you misread the question. Again: whether or not the
> *receiving* MTA is mentioned in the SPF record is immaterial.
>
> I don't know whether Alex (at the time) misunderstood SPF and asked a
> question based on that misunderstanding, which I tried to clarify, or he
> simply mistyped "by" when he should have typed "from".
Yes, I have no idea why I would have written "by". I meant "from". Too
many hours of SPF at once, I suppose.
Is it possible to test spamassassin SPF rules after a message is
received? I've been unsuccessful:
Dec 10 21:15:02.318 [2402] dbg: spf: relayed through one or more
trusted relays, cannot use header-based Envelope-From, skipping
I don't understand why a message from tripadvisor.com would have
SPF_FAIL, and as part of trying to understand how SPF works, I'd like
to figure out what's happening.
Would someone be able to take a look at this message and figure out
why mail from tripadvisor.com fails SPF?
http://pastebin.com/36hzGcTs
Thanks,
Alex
Re: SPF rules and my domain
Posted by John Hardin <jh...@impsec.org>.
On Thu, 10 Dec 2015, Matus UHLAR - fantomas wrote:
>> > My response was based on how you worded your question, which has been
>> > removed from the thread now:
>> >
>> > > > > Please help me understand why SPF_FAIL would not be triggered
>> > > > > when an incoming email using my domain is received by a server
>> > > > > that is not in my SPF record.
>
> The SPF fail SHOULD be triggered in that case.
Matus, I think you misread the question. Again: whether or not the
*receiving* MTA is mentioned in the SPF record is immaterial.
I don't know whether Alex (at the time) misunderstood SPF and asked a
question based on that misunderstanding, which I tried to clarify, or he
simply mistyped "by" when he should have typed "from".
--
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
-----------------------------------------------------------------------
There is no better measure of the unthinking contempt of the
environmentalist movement for civilization than their call to
turn off the lights and sit in the dark. -- Sultan Knish
-----------------------------------------------------------------------
5 days until Bill of Rights day
Re: SPF rules and my domain
Posted by Derek Diget <de...@wmich.edu>.
On Dec 10, 2015 at 16:13 +0100, Reindl Harald wrote:
=>Am 10.12.2015 um 15:56 schrieb Alex:
=>> I thought it was related to the sending domain, which it was, but I
=>> later learned one of the includes in our domain was also apparently
=>> expanded, and caused our SPF record to temporarily exceed the 10 DNS
=>> query limit, confusing the entire situation.
=>
=>well, thats the price you have to pay when you spread "your" services
=>all over the world, hence the testing-tool i linked :-)
Alex, may I suggest that besides looking at the SPF record testing tools
mentioned in this thread, you post to the SPF-Help mailing list[1].
Once that list has verified your SPF record is correct and working as
expected, then we can help with the second aspect of your quest on
trying to be more aggressive with mail that returns a SPF_FAIL using
your domain as it arrives to your inbound/MX record MTAs.
1: <http://www.openspf.org/Forums>
--
***********************************************************************
Derek Diget Office of Information Technology
Western Michigan University - Kalamazoo Michigan USA - www.wmich.edu/
***********************************************************************
Re: SPF rules and my domain
Posted by Reindl Harald <h....@thelounge.net>.
Am 10.12.2015 um 15:56 schrieb Alex:
>>> Please help me understand why SPF_FAIL would not be triggered when >
>>>>
> > > an incoming email using my domain is received by a server that is >
> > > not in
> > > my SPF record.
>>
>> The SPF fail SHOULD be triggered in that case. But in your first mail you
>> have mentioned T_SPF_PERMERROR hits instead and later you have denied it...
>
> I thought it was related to the sending domain, which it was, but I
> later learned one of the includes in our domain was also apparently
> expanded, and caused our SPF record to temporarily exceed the 10 DNS
> query limit, confusing the entire situation.
well, thats the price you have to pay when you spread "your" services
all over the world, hence the testing-tool i linked :-)
Re: SPF rules and my domain
Posted by Alex <my...@gmail.com>.
Hi,
> > Please help me understand why SPF_FAIL would not be triggered when >
> > >
> > an incoming email using my domain is received by a server that is >
> > not in
> > my SPF record.
>
> The SPF fail SHOULD be triggered in that case. But in your first mail you
> have mentioned T_SPF_PERMERROR hits instead and later you have denied it...
I thought it was related to the sending domain, which it was, but I
later learned one of the includes in our domain was also apparently
expanded, and caused our SPF record to temporarily exceed the 10 DNS
query limit, confusing the entire situation.
> it's hard to explain why it does not work if you don't provide proper info.
I understand. Thank you for being patient.
Thanks,
Alex
Re: SPF rules and my domain
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
>>> Yes, understood. This was always about my own MTA receiving a message
>>> appearing to be "FROM" my own domain, and my own SPF record would be
>>> used to check the IP of the remote system to determine if it was
>>> permitted. I may have made that especially clear at one point.
>>>
>>> Does this make sense now? I'm trying to use my SPF record to verify
>>> mail FROM our domain being received by our MX is not spoofed.
>>
>> Right, that was understood.
>>
>> My response was based on how you worded your question, which has been
>> removed from the thread now:
>>
>>> > > Please help me understand why SPF_FAIL would not be triggered when > >
>>> > > an incoming email using my domain is received by a server that is > > not in
>>> > > my SPF record.
The SPF fail SHOULD be triggered in that case. But in your first mail you
have mentioned T_SPF_PERMERROR hits instead and later you have denied it...
it's hard to explain why it does not work if you don't provide proper info.
>> I was addressing the apparent assumption within that question that the
>> recipient MTA matters to SPF validation.
On 09.12.15 21:42, Alex wrote:
>I'm not sure if there's a question there, or I'm still confused. It
>matters because the recipient MTA is my own.
>
>Spamassassin is just going to record a generic SPF_FAIL, regardless of
>whether it's my SPF record or an email from some other domain.
>
>If I wanted to use SPF in spamassassin to block spoofing attempts
>against my domain, how would I do that?
If anyone tried to send mail _to_ your MTA spoofing _your_ domain from
_remote_ (not your) IP that is apparently _not_ part of your domain's SPF
recors, your MTA will refuse the mail as SPF_FAIL.
That's exactly what you want, isn't it?
The problem you may encounter is just the opposite: legitimate clients using
your MTA should not be refused. However they should use SMTP Authentication
and that should be prevented from SPF 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.
Quantum mechanics: The dreams stuff is made of.
Re: SPF rules and my domain
Posted by Reindl Harald <h....@thelounge.net>.
Am 10.12.2015 um 03:42 schrieb Alex:
> If I wanted to use SPF in spamassassin to block spoofing attempts
> against my domain, how would I do that?
>
> Can I create a meta that combines SPF_FAIL with the From header for my
> domain to do this?
SPF *is not* about the From-Header
Re: SPF rules and my domain
Posted by Benny Pedersen <me...@junc.eu>.
On December 10, 2015 3:49:56 PM Alex <my...@gmail.com> wrote:
>> whitelist_from_spf: *@example.tld (your domain)
>> header Return-Path =~ example.tld
>
> That's great. I'll investigate.
>
or blacklist_from *@* with whitelist_auth *@* to hate all equal :)
Re: SPF rules and my domain
Posted by Alex <my...@gmail.com>.
Hi,
>> If I wanted to use SPF in spamassassin to block spoofing attempts
>> against my domain, how would I do that?
>>
>> Can I create a meta that combines SPF_FAIL with the From header for my
>> domain to do this?
>
> This all sounds like:
>
> I (Alex) want to use SPF for incoming email, and score mail that fails
> SPF policy. But I (Alex) know for sure that my own SPF record is
> correct, so for messages that fail my own SPF record, I want a stricter
> policy (i.e. a higher score, or a plain reject).
>
> If this is what you mean, then a meta rule that combines your envelope
> sender domain with SPF_FAIL would be a correct solution.
Yes, that's exactly what I'm trying to do. Phishing attempts go to the
core of trust issues with upper-management.
> Or you could add something like below, which adds a penalty for *all*
> messages using your domain, and SPF saves the real ones.
>
> whitelist_from_spf: *@example.tld (your domain)
> header Return-Path =~ example.tld
That's great. I'll investigate.
Thanks again,
Alex
Re: SPF rules and my domain
Posted by Tom Hendrikx <to...@whyscream.net>.
On 10-12-15 03:42, Alex wrote:
> Hi,
>
>>> Yes, understood. This was always about my own MTA receiving a message
>>> appearing to be "FROM" my own domain, and my own SPF record would be
>>> used to check the IP of the remote system to determine if it was
>>> permitted. I may have made that especially clear at one point.
>>>
>>> Does this make sense now? I'm trying to use my SPF record to verify
>>> mail FROM our domain being received by our MX is not spoofed.
>>
>> Right, that was understood.
>>
>> My response was based on how you worded your question, which has been
>> removed from the thread now:
>>
>>>>> Please help me understand why SPF_FAIL would not be triggered when > >
>>>>> an incoming email using my domain is received by a server that is > > not in
>>>>> my SPF record.
>>
>> I was addressing the apparent assumption within that question that the
>> recipient MTA matters to SPF validation.
>
> I'm not sure if there's a question there, or I'm still confused. It
> matters because the recipient MTA is my own.
>
> Spamassassin is just going to record a generic SPF_FAIL, regardless of
> whether it's my SPF record or an email from some other domain.
>
> If I wanted to use SPF in spamassassin to block spoofing attempts
> against my domain, how would I do that?
>
> Can I create a meta that combines SPF_FAIL with the From header for my
> domain to do this?
>
This all sounds like:
I (Alex) want to use SPF for incoming email, and score mail that fails
SPF policy. But I (Alex) know for sure that my own SPF record is
correct, so for messages that fail my own SPF record, I want a stricter
policy (i.e. a higher score, or a plain reject).
If this is what you mean, then a meta rule that combines your envelope
sender domain with SPF_FAIL would be a correct solution.
Or you could add something like below, which adds a penalty for *all*
messages using your domain, and SPF saves the real ones.
whitelist_from_spf: *@example.tld (your domain)
header Return-Path =~ example.tld
Regards,
Tom
Re: SPF rules and my domain
Posted by Reindl Harald <h....@thelounge.net>.
Am 10.12.2015 um 15:43 schrieb Alex:
> Hi,
>
>>> If I wanted to use SPF in spamassassin to block spoofing attempts
>>> against my domain, how would I do that?
>>
>> Simply put all approved mail servers that you allow to send email with an
>> envelope-from domain of your domain in your SPF record and it won't
>> matter what the receiving server is. It can be your server, my server, or
>> any SA will hit SPF_PASS. Then if any other server tries to send with an
>> envelope-from of your domain, your SA and others will hit SPF_FAIL.
>
> The problem is that SPF_FAIL has a very low score. I need to make sure
> spoofing attempts using my domain are always blocked
then set it higher in "local.cf" or simpy accept that it makes no sense
in SA when you can do that within 5 minutes in your postfix without any SPF
>>> Can I create a meta that combines SPF_FAIL with the From header for my
>>> domain to do this?
>>
>> Yes you can but you don't have to. You should setup scoring and train
>> your bayes database so all SPF_FAIL will be blocked equally. You don't
>> have to do any thing special for your own domain spoofing. Focus on
>> getting all domain spoofing detected properly and yours will automatically
>> be included.
>
> More specifically, we're being hit by spear-phishing attacks, where
> there really are no other rules that hit.
>
> I realize this is only going to get the lazy spammer that actually
> tries to spoof the envelope-sender, but that seems to be quite a few
> of them.
most of them are using a From-Header which is not part of SPF but
visible in the client with a different Envelope, you can't stop them
anyways, for the lazy ones: do it in the MTA
combined SA metarules don't scale in the configuration
Re: SPF rules and my domain
Posted by Alex <my...@gmail.com>.
Hi,
>>If I wanted to use SPF in spamassassin to block spoofing attempts
>>against my domain, how would I do that?
>
> Simply put all approved mail servers that you allow to send email with an
> envelope-from domain of your domain in your SPF record and it won't
> matter what the receiving server is. It can be your server, my server, or
> any SA will hit SPF_PASS. Then if any other server tries to send with an
> envelope-from of your domain, your SA and others will hit SPF_FAIL.
The problem is that SPF_FAIL has a very low score. I need to make sure
spoofing attempts using my domain are always blocked.
>>Can I create a meta that combines SPF_FAIL with the From header for my
>>domain to do this?
>
> Yes you can but you don't have to. You should setup scoring and train
> your bayes database so all SPF_FAIL will be blocked equally. You don't
> have to do any thing special for your own domain spoofing. Focus on
> getting all domain spoofing detected properly and yours will automatically
> be included.
More specifically, we're being hit by spear-phishing attacks, where
there really are no other rules that hit.
I realize this is only going to get the lazy spammer that actually
tries to spoof the envelope-sender, but that seems to be quite a few
of them.
Thanks so much.
Alex
Re: SPF rules and my domain
Posted by David Jones <dj...@ena.com>.
>Spamassassin is just going to record a generic SPF_FAIL, regardless of
>whether it's my SPF record or an email from some other domain.
>If I wanted to use SPF in spamassassin to block spoofing attempts
>against my domain, how would I do that?
Simply put all approved mail servers that you allow to send email with an
envelope-from domain of your domain in your SPF record and it won't
matter what the receiving server is. It can be your server, my server, or
any SA will hit SPF_PASS. Then if any other server tries to send with an
envelope-from of your domain, your SA and others will hit SPF_FAIL.
>Can I create a meta that combines SPF_FAIL with the From header for my
>domain to do this?
Yes you can but you don't have to. You should setup scoring and train
your bayes database so all SPF_FAIL will be blocked equally. You don't
have to do any thing special for your own domain spoofing. Focus on
getting all domain spoofing detected properly and yours will automatically
be included.
Dave
>Thanks again,
>Alex
Re: SPF rules and my domain
Posted by Kris Deugau <kd...@vianet.ca>.
Benny Pedersen wrote:
> Alex skrev den 2015-12-10 03:42:
>
>> If I wanted to use SPF in spamassassin to block spoofing attempts
>> against my domain, how would I do that?
>> Can I create a meta that combines SPF_FAIL with the From header for my
>> domain to do this?
>
> setup pypolicyd-spf is not that hard is it ?
>
> when done, you just configure the spamassassin plugin to reuse the
> recieved-spf header
>
> data in spf must be with all mynetworks in postfix except all non
> routeble ips such as rfc1918 in the spf for mydestination and virtual
> domains
No, that's not correct.
Postfix $mynetworks, and the equivalent setting in other MTA software,
lists IP ranges that can use your server as an outgoing relay, for any
sender/recipient pair, without further authentication (let's leave aside
any further policy limits you might want that go in other settings;
this is the basic minimum).
An ISP like the one I work for lists "many" IP ranges in $mynetworks
(we're up to ~15 ranges totalling something like an aggregate /15;
essentially all IP address space we've been assigned from ARIN), because
we want to allow our customers to send out their email through our server.
Most of these IP ranges should NOT be emitting any SMTP traffic to the
Internet at large, at all, period; they should be using the ISP relay
host or some other authenticated third party mail relay server. So most
of these IPs are irrelevant for SPF except as failure cases.
SPF lists IPs or IP ranges that may use a particular domain as their
envelope sender.
Our SPF record lists a much MUCH smaller list of IPs and ranges;
essentially, the IP ranges our core mail servers live in. Those are,
formally speaking, the only IP addresses in the world authorized to use
vianet.ca as their SMTP envelope sender. Third parties should never see
traffic with a vianet.ca envelope sender directly from any other IP.
Note that our customers are authorized by using our outbound relayhost;
the third party should not "see" the original sender's connection IP
when doing the SPF check.
There is no requirement that there be any overlap between the two,
although in most cases the SPF list is likely a small subset of $mynetworks.
-kgd
Re: SPF rules and my domain
Posted by Reindl Harald <h....@thelounge.net>.
Am 10.12.2015 um 15:47 schrieb Alex:
>> data in spf must be with all mynetworks in postfix except all non routeble
>> ips such as rfc1918 in the spf for mydestination and virtual domains
>
> Doesn't that introduce a trust issue with include: for example? We're
> including constant-contact, salesforce, etc. How are these included in
> $mynetworks, and wouldn't that mean inherently trusting all of
> constant-contact?
just forget SPF and you are done
smtpd_recipient_restrictions =
.. all your other restictions
permit_dnswl_client your-won-rbndsnd instance
check_sender_access hash:/etc/postfix/spoofing_protection.cf
so you can easily skip constant-contact, salesforc and what not and a
local rbldnsd wird to the anyways needed unbound-instance is configured
within 5 minutes and *really* protects *your* envelope from get spoofed
Re: SPF rules and my domain
Posted by Alex <my...@gmail.com>.
Hi,
>> If I wanted to use SPF in spamassassin to block spoofing attempts
>> against my domain, how would I do that?
>> Can I create a meta that combines SPF_FAIL with the From header for my
>> domain to do this?
>
> setup pypolicyd-spf is not that hard is it ?
I mentioned previously that there were some problems with doing that
on fedora. I don't recall what it was, but I'd like to try to use
tools that are already implemented anyway.
> when done, you just configure the spamassassin plugin to reuse the
> recieved-spf header
>
> data in spf must be with all mynetworks in postfix except all non routeble
> ips such as rfc1918 in the spf for mydestination and virtual domains
Doesn't that introduce a trust issue with include: for example? We're
including constant-contact, salesforce, etc. How are these included in
$mynetworks, and wouldn't that mean inherently trusting all of
constant-contact?
> before going live with it, check spf in kittermanns and or dmarchian is
> valid, not after as many do in the past, i have seen ip4:192.168.00/23 in an
> example fail in my logs, no rfc 1918 dont need to be added to spf :=)
Yes, thank you so much. We've already done this.
Thanks,
Alex
Re: SPF rules and my domain
Posted by Benny Pedersen <me...@junc.eu>.
Alex skrev den 2015-12-10 03:42:
> If I wanted to use SPF in spamassassin to block spoofing attempts
> against my domain, how would I do that?
> Can I create a meta that combines SPF_FAIL with the From header for my
> domain to do this?
setup pypolicyd-spf is not that hard is it ?
when done, you just configure the spamassassin plugin to reuse the
recieved-spf header
data in spf must be with all mynetworks in postfix except all non
routeble ips such as rfc1918 in the spf for mydestination and virtual
domains
before going live with it, check spf in kittermanns and or dmarchian is
valid, not after as many do in the past, i have seen ip4:192.168.00/23
in an example fail in my logs, no rfc 1918 dont need to be added to spf
:=)
Re: SPF rules and my domain
Posted by Alex <my...@gmail.com>.
Hi,
>> Yes, understood. This was always about my own MTA receiving a message
>> appearing to be "FROM" my own domain, and my own SPF record would be
>> used to check the IP of the remote system to determine if it was
>> permitted. I may have made that especially clear at one point.
>>
>> Does this make sense now? I'm trying to use my SPF record to verify
>> mail FROM our domain being received by our MX is not spoofed.
>
> Right, that was understood.
>
> My response was based on how you worded your question, which has been
> removed from the thread now:
>
>> > > Please help me understand why SPF_FAIL would not be triggered when > >
>> > > an incoming email using my domain is received by a server that is > > not in
>> > > my SPF record.
>
> I was addressing the apparent assumption within that question that the
> recipient MTA matters to SPF validation.
I'm not sure if there's a question there, or I'm still confused. It
matters because the recipient MTA is my own.
Spamassassin is just going to record a generic SPF_FAIL, regardless of
whether it's my SPF record or an email from some other domain.
If I wanted to use SPF in spamassassin to block spoofing attempts
against my domain, how would I do that?
Can I create a meta that combines SPF_FAIL with the From header for my
domain to do this?
Thanks again,
Alex
Re: SPF rules and my domain
Posted by John Hardin <jh...@impsec.org>.
On Wed, 9 Dec 2015, Alex wrote:
>>>> I think you mean, *FROM* a server that is not in your SPF record.
>>>>
>>>> SPF says nothing about the *recipient* MTA.
>>>
>>> Unless that recipient MTA is my own, correct?
>>
>> No. The recipient *does not matter*. SPF is vetting the *sending* MTA.
>>
>>> The SPF record contains a list of servers that are allowed to send
>>> mail using my domain, including to my own MX.
>>
>> Correct.
>>
>>> This can't be used for spoof protection for my own domain as easily as for
>>> remote systems to ascertain whether an email received by a remote system was
>>> sent legitimately from one of our systems?
>>
>> Yes, it can be used for that purpose. That does not mean the recipient
>> matters. Your MTA is just another MTA using SPF to validate the sending MTA.
>
> That's perhaps the part I didn't make clear. If there is a host
> sending mail to me using my domain, my MTA would validate the email
> using my own SPF record. This is what I'm trying to do.
Right. That's just "my MTA does SPF checks".
>> However, that MTA also has the added burden of correctly classifying email
>> received from internal sources that do not appear in your public SPF record.
>
> Yes, and I would think that's what $mynetworks in postfix is for.
Perhaps. I'm not familiar with postfix, sorry.
>> SPF_FAIL should not be triggered when somebody else's MTA (which will not be
>> in your SPF record) receives a message using your domain *from* your MTA
>> (which will be in your SPF record).
>>
>> If SPF_FAIL triggers in that situation, then SPF is pointless.
>
> Yes, understood. This was always about my own MTA receiving a message
> appearing to be "FROM" my own domain, and my own SPF record would be
> used to check the IP of the remote system to determine if it was
> permitted. I may have made that especially clear at one point.
>
> Does this make sense now? I'm trying to use my SPF record to verify
> mail FROM our domain being received by our MX is not spoofed.
Right, that was understood.
My response was based on how you worded your question, which has been
removed from the thread now:
> > > Please help me understand why SPF_FAIL would not be triggered when
> > > an incoming email using my domain is received by a server that is
> > > not in my SPF record.
I was addressing the apparent assumption within that question that the
recipient MTA matters to SPF validation.
--
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
-----------------------------------------------------------------------
From the Liberty perspective, it doesn't matter if it's a
jackboot or a Birkenstock smashing your face. -- Robb Allen
-----------------------------------------------------------------------
6 days until Bill of Rights day
Re: SPF rules and my domain
Posted by Alex <my...@gmail.com>.
Hi,
>>> I think you mean, *FROM* a server that is not in your SPF record.
>>>
>>> SPF says nothing about the *recipient* MTA.
>>
>>
>> Unless that recipient MTA is my own, correct?
>
> No. The recipient *does not matter*. SPF is vetting the *sending* MTA.
>
>> The SPF record contains a list of servers that are allowed to send
>> mail using my domain, including to my own MX.
>
> Correct.
>
>> This can't be used for spoof protection for my own domain as easily as for
>> remote systems to ascertain whether an email received by a remote system was
>> sent legitimately from one of our systems?
>
> Yes, it can be used for that purpose. That does not mean the recipient
> matters. Your MTA is just another MTA using SPF to validate the sending MTA.
That's perhaps the part I didn't make clear. If there is a host
sending mail to me using my domain, my MTA would validate the email
using my own SPF record. This is what I'm trying to do.
> However, that MTA also has the added burden of correctly classifying email
> received from internal sources that do not appear in your public SPF record.
Yes, and I would think that's what $mynetworks in postfix is for.
> SPF_FAIL should not be triggered when somebody else's MTA (which will not be
> in your SPF record) receives a message using your domain *from* your MTA
> (which will be in your SPF record).
>
> If SPF_FAIL triggers in that situation, then SPF is pointless.
Yes, understood. This was always about my own MTA receiving a message
appearing to be "FROM" my own domain, and my own SPF record would be
used to check the IP of the remote system to determine if it was
permitted. I may have made that especially clear at one point.
Does this make sense now? I'm trying to use my SPF record to verify
mail FROM our domain being received by our MX is not spoofed.
I have some sender access restrictions in place with postfix, but I'm
concerned about adding networks to $mynetworks that we don't control
but are authorized to send mail as my domain according to our SPF
record. Hope that makes sense.
Thanks,
Alex
Re: SPF rules and my domain
Posted by John Hardin <jh...@impsec.org>.
On Wed, 9 Dec 2015, Alex wrote:
>>> Please help me understand why SPF_FAIL would not be triggered when an
>>> incoming email using my domain is received by a server that is not in
>>> my SPF record.
>>
>> I think you mean, *FROM* a server that is not in your SPF record.
>>
>> SPF says nothing about the *recipient* MTA.
>
> Unless that recipient MTA is my own, correct?
No. The recipient *does not matter*. SPF is vetting the *sending* MTA.
> The SPF record contains a list of servers that are allowed to send
> mail using my domain, including to my own MX.
Correct.
> This can't be used for spoof protection for my own domain as easily as
> for remote systems to ascertain whether an email received by a remote
> system was sent legitimately from one of our systems?
Yes, it can be used for that purpose. That does not mean the recipient
matters. Your MTA is just another MTA using SPF to validate the sending
MTA.
However, that MTA also has the added burden of correctly classifying email
received from internal sources that do not appear in your public SPF
record.
SPF_FAIL should not be triggered when somebody else's MTA (which will not
be in your SPF record) receives a message using your domain *from* your
MTA (which will be in your SPF record).
If SPF_FAIL triggers in that situation, then SPF is pointless.
--
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
-----------------------------------------------------------------------
When I say "I don't want the government to do X", do not
automatically assume that means I don't want X to happen.
-----------------------------------------------------------------------
6 days until Bill of Rights day
Re: SPF rules and my domain
Posted by Alex <my...@gmail.com>.
>> Please help me understand why SPF_FAIL would not be triggered when an
>> incoming email using my domain is received by a server that is not in
>> my SPF record.
>
> I think you mean, *FROM* a server that is not in your SPF record.
>
> SPF says nothing about the *recipient* MTA.
Unless that recipient MTA is my own, correct?
The SPF record contains a list of servers that are allowed to send
mail using my domain, including to my own MX. This can't be used for
spoof protection for my own domain as easily as for remote systems to
ascertain whether an email received by a remote system was sent
legitimately from one of our systems?
Thanks,
Alex
Re: SPF rules and my domain
Posted by John Hardin <jh...@impsec.org>.
On Wed, 9 Dec 2015, Alex wrote:
> Please help me understand why SPF_FAIL would not be triggered when an
> incoming email using my domain is received by a server that is not in
> my SPF record.
I think you mean, *FROM* a server that is not in your SPF record.
SPF says nothing about the *recipient* MTA.
--
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
-----------------------------------------------------------------------
Perfect Security and Absolute Safety are unattainable; beware
those who would try to sell them to you, regardless of the cost,
for they are trying to sell you your own slavery.
-----------------------------------------------------------------------
6 days until Bill of Rights day
Re: SPF rules and my domain
Posted by Reindl Harald <h....@thelounge.net>.
Am 09.12.2015 um 17:30 schrieb Alex:
> Hi,
>
>>> My main problem is understanding how to build a rule to block spoofing
>>> attempts against my own domain? Do I need to build a meta that
>>> combines envelope FROM with SPF_FAIL?
>>
>> first: spoofing protection is *only* about envelope and not about the
>> visible From-header (spoofing protection based on the header kills
>
> Yes, I understand that as well, and mentioned that earlier.
>
>> second:
>> spoofing protection belongs in the MTA long before spamassassin
>>
>> why?
>
> Yes, I agree, and also mentioned that, but I wanted to understand the
> SPF rules from within spamassassin.
>
>> * spoofing protection has *nothing* to do with SPF
>
> What? That's exactly what SPF was designed to prevent - spoofing of
> the envelope sender.
bla - i don't need SPF on a MX to know if my own envelope comes from
outside - nobody is doing this via SPF just because it's a different
world when someone spoofs my own domain comapred to a random message
where the admin probably forgot a machine in his SPF
>> smtpd_recipient_restrictions =
>> reject_unlisted_recipient
>> reject_unauth_destination
>> reject_non_fqdn_recipient
>> reject_non_fqdn_sender
>> reject_non_fqdn_helo_hostname
>> reject_invalid_helo_hostname
>> check_sender_access hash:/etc/postfix/spoofing_protection.cf
>>
>> /etc/postfix/spoofing_protection.cf:
>> domain1 REJECT Sender Spoofed
>> domain2 REJECT Sender Spoofed
>> domain3 REJECT Sender Spoofed
>
> I'm using postfix, as I mentioned, and understand I can do this, and know how.
>
> Please help me understand why SPF_FAIL would not be triggered when an
> incoming email using my domain is received by a server that is not in
> my SPF record
it would be triggered but since SA is a scoring system there is no point
let messages spoofing your own envelopes come so far that they touch the
contentfilter
since you say "I wish I could post my domain, but I can't" you are
*really* at your own because very few to no people have the motivation
working with crystal balls when someone don't provide his own domain and
the *real* SA headers of a example message
Re: SPF rules and my domain
Posted by Alex <my...@gmail.com>.
Hi,
>> My main problem is understanding how to build a rule to block spoofing
>> attempts against my own domain? Do I need to build a meta that
>> combines envelope FROM with SPF_FAIL?
>
> first: spoofing protection is *only* about envelope and not about the
> visible From-header (spoofing protection based on the header kills
Yes, I understand that as well, and mentioned that earlier.
> second:
> spoofing protection belongs in the MTA long before spamassassin
>
> why?
Yes, I agree, and also mentioned that, but I wanted to understand the
SPF rules from within spamassassin.
> * spoofing protection has *nothing* to do with SPF
What? That's exactly what SPF was designed to prevent - spoofing of
the envelope sender.
https://en.wikipedia.org/wiki/Sender_Policy_Framework
"SPF is a simple email-validation system designed to detect email
spoofing by providing a mechanism to allow receiving mail exchangers
to check that incoming mail from a domain comes from a host authorized
by that domain's administrators."
> smtpd_recipient_restrictions =
> reject_unlisted_recipient
> reject_unauth_destination
> reject_non_fqdn_recipient
> reject_non_fqdn_sender
> reject_non_fqdn_helo_hostname
> reject_invalid_helo_hostname
> check_sender_access hash:/etc/postfix/spoofing_protection.cf
>
> /etc/postfix/spoofing_protection.cf:
> domain1 REJECT Sender Spoofed
> domain2 REJECT Sender Spoofed
> domain3 REJECT Sender Spoofed
I'm using postfix, as I mentioned, and understand I can do this, and know how.
Please help me understand why SPF_FAIL would not be triggered when an
incoming email using my domain is received by a server that is not in
my SPF record.
Thanks,
Alex
> ___________________________________________________________
>
> in short: you take the script which generates "mydestination.cf" and let it
> spit out the other file while write instead "OK" "REJECT"
>
> mydestination = hash:/etc/postfix/mydestination.cf
> /etc/postfix/mydestination.cf:
> domain1 OK
> domain2 OK
> domain3 OK
> ___________________________________________________________
>
> before some dumbass now says "the world is not postfix alone": the principle
> is the same for every MTA and some things belong to the mTA layer and not in
> the contentfilter
>
Re: SPF rules and my domain
Posted by Reindl Harald <h....@thelounge.net>.
Am 09.12.2015 um 15:44 schrieb Alex:
>>> T_SPF_PERMERROR says pretty clear that you made something wrong
>>> why do people not *verify* DNS changes? seen the same from a
>>> lot of large companies
>>>
>>> http://www.kitterman.com/spf/validate.html
>>>
>> +1 for the Kitterman checking tool - still my first stop for SPF
>> checking.
>>
>> I recently found out about another: https://dmarcian.com/spf-survey/
>> which is also worth using.
>
> Yes, I'm aware of this site. Perhaps I shouldn't have introduced the
> T_SPF_PERMERROR issue because it's not really my main problem, and
> doesn't even occur on my own domain. I wish I could post my domain,
> but I can't.
>
> My main problem is understanding how to build a rule to block spoofing
> attempts against my own domain? Do I need to build a meta that
> combines envelope FROM with SPF_FAIL?
first: spoofing protection is *only* about envelope and not about the
visible From-header (spoofing protection based on the header kills
mailing-lists and even big players like Barracuda networks where dumb
enugh because customers complained 'but i still get spoofed mails, look
at my client' insteda explain them it's not possible)
second:
spoofing protection belongs in the MTA long before spamassassin
why?
* you have already on the MTA a list of domains for accept mails
* spoofing protection has *nothing* to do with SPF
smtpd_recipient_restrictions =
reject_unlisted_recipient
reject_unauth_destination
reject_non_fqdn_recipient
reject_non_fqdn_sender
reject_non_fqdn_helo_hostname
reject_invalid_helo_hostname
check_sender_access hash:/etc/postfix/spoofing_protection.cf
/etc/postfix/spoofing_protection.cf:
domain1 REJECT Sender Spoofed
domain2 REJECT Sender Spoofed
domain3 REJECT Sender Spoofed
___________________________________________________________
in short: you take the script which generates "mydestination.cf" and let
it spit out the other file while write instead "OK" "REJECT"
mydestination = hash:/etc/postfix/mydestination.cf
/etc/postfix/mydestination.cf:
domain1 OK
domain2 OK
domain3 OK
___________________________________________________________
before some dumbass now says "the world is not postfix alone": the
principle is the same for every MTA and some things belong to the mTA
layer and not in the contentfilter
Re: SPF rules and my domain
Posted by Martin Gregorie <ma...@gregorie.org>.
On Wed, 2015-12-09 at 09:44 -0500, Alex wrote:
> My main problem is understanding how to build a rule to block
> spoofing attempts against my own domain? Do I need to build a meta
> that combines envelope FROM with SPF_FAIL?
>
Don't forget that SPF fails and errors will always be related to the
*senders* SPF record.
If you use either SPF checker against your own SPF record all you're
doing is making sure that your SPF record is validly constructed and
correctly describes your domain, its MX records and IP range so that
third parties can avoid hitting you with backscatter when your address
has been forged as the sender of undeliverable spam.
To do what you're currently trying to do:
1) use 'dig' to manually inspect the sender's SPF record using either
the envelope sender domain or the sender domain from the earliest
Received: header on the delivery chain. As Reindl says, ignore the
From: header - if the message is spam its probably forged.
or
2) use either of those SPF tools to inspect the sending domain's SPF
record where 'sender domain' is as described in (1). The tools will say
whether the SPF record is junk or not and, if valid, comparing it with
the output from 'host' or 'dig example.com ANY' will tell you if its
content correctly describes the sender.
Martin
Re: SPF rules and my domain
Posted by Alex <my...@gmail.com>.
Hi,
>> T_SPF_PERMERROR says pretty clear that you made something wrong
>> why do people not *verify* DNS changes? seen the same from a
>> lot of large companies
>>
>> http://www.kitterman.com/spf/validate.html
>>
> +1 for the Kitterman checking tool - still my first stop for SPF
> checking.
>
> I recently found out about another: https://dmarcian.com/spf-survey/
> which is also worth using.
Yes, I'm aware of this site. Perhaps I shouldn't have introduced the
T_SPF_PERMERROR issue because it's not really my main problem, and
doesn't even occur on my own domain. I wish I could post my domain,
but I can't.
My main problem is understanding how to build a rule to block spoofing
attempts against my own domain? Do I need to build a meta that
combines envelope FROM with SPF_FAIL?
Thanks,
Alex
Re: SPF rules and my domain
Posted by Martin Gregorie <ma...@gregorie.org>.
On Wed, 2015-12-09 at 08:11 +0100, Reindl Harald wrote:
>
> T_SPF_PERMERROR says pretty clear that you made something wrong
> why do people not *verify* DNS changes? seen the same from a
> lot of large companies
>
> http://www.kitterman.com/spf/validate.html
>
+1 for the Kitterman checking tool - still my first stop for SPF
checking.
I recently found out about another: https://dmarcian.com/spf-survey/
which is also worth using.
Martin
Re: SPF rules and my domain
Posted by Reindl Harald <h....@thelounge.net>.
Am 09.12.2015 um 05:03 schrieb Alex:
> I'm having some problems with SPF and hoped someone could help me to
> understand. I've just set up SPF for a domain and now trying to make
> sure that spamassassin for that domain is properly blocking/scoring
> mail attempting to spoof the envelope sender.
>
> I'm seeing a number of emails hit T_SPF_PERMERROR, but not SPF_FAIL
what about tell us the domain?
T_SPF_PERMERROR says pretty clear that you made something wrong
why do people not *verify* DNS changes? seen the same from a
lot of large companies
http://www.kitterman.com/spf/validate.html