At 19:52 12/09/2013 Thursday, Roman Gelfand wrote:
>consider the follwoing situation...
>
>A user sends email with from: address as ***@domain.com. The
>domain.com doesn't have spf txt record. The smtp server used to send
>this email is mx1.anotherdomai.com. This domain has spf txt record.
>Are you saying spf checker on the destination smtp server is going to
>know to check the source smtp host for spf txt record?
it checks both the ***@domain.com's spf (result neutral no spf)
and helo-id's spf record (result pass so it can assume safely that the email is not from a botnet and thus gets a less suspicious spam-score usually)
> If so, what happens when there is clash between domain.com's spf txt record and
>that of mx1.anotherdomai.com where domain.com forbids the smtp host
>from sending the email and mx1.anotherdomai.com allows?
mx1.anotherdomai.com allows only the HELO much earlier in the transaction so if we assume it passed
the ***@domain.com's spf if it hardfails declares that a user of the non-forged server mx1.anotherdomai.com is attempting to forge mail from ***@domain.com and thus obviously the email should be rejected
if on the other hand ***@domain.com's spf passes but the server helo'd as mx1.anotherdomain.com and that hardfailed then its down to the policy at the receiving site (as it always is) we here will not accept mail from forged servers (or ones so badly administered they appear forged)
> In terms of not ending up in the destination spam box, which one is more preferred
>by the spf checker?
thats down to their policy, for us an spf hardfail never goes to spam folder its 5xx refused and never comes into the system
(as spf is designed to be checked before the mail has been transferred)
spf none and spf softfail and neutral do make the mail more likely to goto the spamfolder in co-operation with later content-checks
spf-pass equally does make the mail slightly less likely to go into the spamfolder if the domain is itself is on a 'reputable' list
>spf txt record for domain.com or
>mx1.anotherdomai.com?
you have failed to understand the two seperate uses of spf
A spf for helo
the spf record for the name that a server uses in its helo greeting
(authenticates that ip to claim to be that server, if the name is used from another the server name is forged)
(should only ever terminate -all, if it terminates ?all or ~all or +all we tend to regard it as suspicious and thus treat as such)
It says everything about the sending server and asserts nothing about the sending user
B spf for the envelope sender
the spf for the domain used in the envelope sender
(authenticates which ips can send email from users at that domain, if the user is seen from another ip the user is forged)
(can legitimately be terminated in any way and can be considerably complex)
It says everything about the sending user nothing about the sending server (other than the user is allowed to use it)
C
the from: address from the from: header in email
(not used in any way by any part of spf)
(for step A people also authenticate via CSV, checking that the PTR>a>IP (FcrDNS), and other forms of validity testing)
(for step B there is no other trustable method other than SPF Im aware of)
(for step C there is DKIM and the very failed and very flawed sender-ID(do-not-use))
>On Tue, Sep 10, 2013 at 7:18 AM, alan <***@alandoherty.net> wrote:
>> At 01:04 10/09/2013 Tuesday, you wrote:
>>>On 09/09/2013 07:22 PM, Roman Gelfand wrote:
>>>>thanks for all the help. I still have a couple of questions...
>>>>
>>>>1. Can you have more than 1 spf txt records for a domain?
>>>Absolutely not.
>>>>2. What does putting host name before v=spf1 do for us? is that
>>>>somehow used in conjunction with helo? Can you have multiple host
>>>>names separated by spaces before v=spf1?
>>>That is the syntax used by the BIND family of DNS servers used to indicate which domain the record is for. The syntax used by your DNS server may vary. The BIND syntax is the canonical syntax used for discussing DNS records via email. You should learn it.
>>>
>>>>3. I am not quite sure what you mean by ...
>>>>if they are the same machine then you should investigate and compile a
>>>>list of all its ips so that you can pass the common (does helo ==
>>>>ip-in-A-of-helo test many receivers perform to weed out bots)
>>>>could you give an example.
>>>Suppose the mail server uses mail1.example.com as its HELO name, and has IPs 192.0.2.1 and 198.51.100.3 (is on two different ISPs). Then the HELO SPF record could be
>>>
>>>mail1.example.com IN TXT "v=spf1 ip4:192.0.2.1 ip4:198.51.100.3 -all"
>>>
>>>Or possibly:
>>>
>>>mail1.example.com IN TXT "v=spf1 a -all"
>>> IN A 192.0.2.1
>>> IN A 198.51.100.3
>>
>>
>> or to put it another way every hostname IS a domain (in dns terms)
>>
>> thus in my case the SPF for my example domain (below)
>> as my real SPF records are to complex/experimental and the domains are to
>>
>> but feel free to actually check the real domains alandoherty.net and alan.gothic.ie and the provider domain orionnetworks.ie that the servers are part of
>>
>> but basically their are 3 mailservers
>> and in this example i have given one 2 ips (all ips are my own so should not annoy anyone)
>> (but as all are well secured by automatons probing them may result in autoblacklisting)
>>
>> example.com IN A 193.120.238.106 ;my webserver/mailserver
>> IN MX 10 mx10.example.com ;my mailservers answering/25 helo-id and TLS cert
>> IN MX 20 mx20.example.com ;my other mailservers answering/25 helo-id and TLS cert
>> IN MX 20 mx30.example.com ;my other mailservers answering/25 helo-id and TLS cert
>> IN TXT "v=spf1 ip4:193.120.238.109 ip4:193.120.238.106 ip4:195.2.202.63 ip4:195.2.202.40 -all"
>> IN TXT "spf2.0/mfrom ip4:193.120.238.109 ip4:193.120.238.106 ip4:195.2.202.63 ip4:195.2.202.40 -all"
>> IN TXT "spf2.0/pra ip4:193.120.238.109 ip4:193.120.238.106 ip4:195.2.202.63 ip4:195.2.202.40 ?all"
>> ;last 2 lines just for the broken sender-id checkers to ensure they do not block mail via mailinglists
>>
>> www.example.com IN A 193.120.238.106 ;my webserver
>> IN MX 0 . ;explicitly states not ever legal ***@xxx
>> IN TXT "v=spf1 -all" ;explicitly states not ever legal to spf
>>
>> some-desktop.example.com IN A 193.120.xx.xx ;a machine
>> IN MX 0 . ;explicitly states not ever legal ***@xxx
>> IN TXT "v=spf1 -all" ;explicitly states not ever legal to spf
>>
>> support.example.com IN A 193.120.238.106 ;another website
>> IN MX 0 . ;explicitly states not ever legal ***@xxx
>> IN TXT "v=spf1 -all" ;explicitly states not ever legal to spf
>>
>> smtps.example.com IN A 193.120.238.106 ;my mailservers answering/587 helo-id and TLS cert
>> IN A 193.120.238.109 ;used by clients to send/relay mail outward
>> IN MX 0 . ;explicitly states not ever legal ***@xxx
>> IN TXT "v=spf1 -all" ;explicitly states not ever legal to spf
>>
>> mx10.example.com IN A 193.120.238.109 ;my mailserver incomming
>> IN MX 0 . ;explicitly states not ever legal ***@xxx
>> IN TXT "v=spf1 -all" ;explicitly states not ever legal to spf
>>
>> mx20.example.com IN A 193.120.238.106 ;my mailserver incomming
>> IN MX 0 . ;explicitly states not ever legal ***@xxx
>> IN TXT "v=spf1 -all" ;explicitly states not ever legal to spf
>>
>> mx30.example.com IN A 195.2.202.63 ;my mailserver incomming
>> IN A 195.2.202.40
>> IN MX 0 . ;explicitly states not ever legal ***@xxx
>> IN TXT "v=spf1 -all" ;explicitly states not ever legal to spf
>>
>> host1.example.com IN A 193.120.238.106 ;my PTR record
>> IN MX 0 . ;explicitly states not ever legal ***@xxx
>> IN TXT "v=spf1 -all" ;explicitly states not ever legal to spf
>>
>> host2.example.com IN A 193.120.238.109 ;my PTR record
>> IN MX 0 . ;explicitly states not ever legal ***@xxx
>> IN TXT "v=spf1 -all" ;explicitly states not ever legal to spf
>>
>> host3.example.com IN A 195.2.202.64 ;my PTR record
>> IN MX 0 . ;explicitly states not ever legal ***@xxx
>> IN TXT "v=spf1 -all" ;explicitly states not ever legal to spf
>>
>> host3a.example.com IN A 195.2.202.40 ;my PTR record
>> IN MX 0 . ;explicitly states not ever legal ***@xxx
>> IN TXT "v=spf1 -all" ;explicitly states not ever legal to spf
>>
>>
>> host1.mxout.example.com IN A 193.120.238.106 ;my mailservers outgoing/sending helo-id and
>> ;where postmaster@ messages come from
>> IN MX 10 mx10.example.com
>> IN MX 20 mx20.example.com
>> IN TXT "v=spf1 ip4:193.120.238.106 -all" ;explicitly states IT IS legal to spf
>>
>> host2.mxout.example.com IN A 193.120.238.109 ;my mailservers outgoing/sending helo-id and
>> ;where postmaster@ messages come from
>> IN MX 10 mx10.example.com
>> IN MX 20 mx20.example.com
>> IN TXT "v=spf1 ip4:193.120.238.109 -all" ;explicitly states IT IS legal to spf
>>
>> host3.mxout.example.com IN A 195.2.202.63 ;my mailservers outgoing/sending helo-id and
>> IN A 195.2.202.40 ;where postmaster@ messages come from
>> IN MX 10 mx10.example.com
>> IN MX 20 mx20.example.com
>> IN TXT "v=spf1 ip4:195.2.202.63 ip4:195.2.202.40 -all" ;explicitly states IT IS legal to spf
>>
>> _client._smtp.host1.mxout.example.com SRV 1 2 1 host1.mxout.example.com.
>> _client._smtp.host2.mxout.example.com SRV 1 2 1 host2.mxout.example.com.
>> _client._smtp.host3.mxout.example.com SRV 1 2 1 host3.mxout.example.com.
>>
>> _client._smtp.example.com SRV 1 1 1 example.com.
>>
>> ;the _client._smtp lines authorised the three listed names to be used in helo and deauthorise any other using an old/unused protocol called csv, but as it costs nothing i still use it as it was well designed
>>
>> <http://en.wikipedia.org/wiki/Certified_Server_Validation>http://en.wikipedia.org/wiki/Certified_Server_Validation
>>
>>
>>
>> -------------------------------------------
>> Sender Policy Framework: http://www.openspf.net [http://www.openspf.net]
>> Modify Your Subscription: http://www.listbox.com/member/ [http://www.listbox.com/member/]
>>
>> Archives: https://www.listbox.com/member/archive/735/=now
>> RSS Feed: https://www.listbox.com/member/archive/rss/735/24896328-acfdfa29
>> Modify Your Subscription: https://www.listbox.com/member/?&
>> Unsubscribe Now: https://www.listbox.com/unsubscribe/?&&post_id=20130910071903:C73359B6-1A0A-11E3-9EE6-CC300201D417
>> Powered by Listbox: http://www.listbox.com
>
>
>-------------------------------------------
>Sender Policy Framework: http://www.openspf.net [http://www.openspf.net]
>Modify Your Subscription: http://www.listbox.com/member/ [http://www.listbox.com/member/]
>
>Archives: https://www.listbox.com/member/archive/735/=now
>RSS Feed: https://www.listbox.com/member/archive/rss/735/13124949-ec5a0568
>Modify Your Subscription: https://www.listbox.com/member/?&
>Unsubscribe Now: https://www.listbox.com/unsubscribe/?&&post_id=20130912145239:7B620B08-1BDC-11E3-8577-C03EB1F05C8B
>Powered by Listbox: http://www.listbox.com