On 29/01/2023 20:55, Adam H. Kerman wrote:
> Several of you, including you, accused me of failing to provide
> information. It's quoted right there above. That's an accusion of having
> committed a lie of omission. Hey, it's unmoderated Usenet. You get to
> address me however you wish. But kindly don't deny what you actually
> did.
>
> The MAIL FROM domain [redacted] has an SPF record with
> a hard 550-5.7.26 fail policy (-all) but it fails to
> pass SPF checks with the ip [redacted]: 550-5.7.26.
we assume domain redacted =
example.net
we assume ip redacted = 0.0.0.0
1. If the spf entry for
example.net is "v=spf1 mx:
example.net -all"
Then only MX servers for
example.net are allowed to send mail, to know
whcih ones those are you can use dig, example: dig -t MX
example.net
; <<>> DiG 9.18.10 <<>> -t MX
example.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31608
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;
example.net. IN MX
;; ANSWER SECTION:
example.net. 3600 IN MX 10
example.com.
example.net. 3600 IN MX 10
example.org.
;; Query time: 30 msec
;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP)
;; WHEN: Sun Jan 29 23:11:58 CET 2023
;; MSG SIZE rcvd: 149
In this case you can only send from the smtp servers on the
exmaple.com
and
example.org. Checking the ip, is quite simple with "host
example.com" and "host
example.org" and those are most likely different
from the ip of
example.net.
2. If the spf entry for
example.net is "v=spf1
a:
anothermachine.example.net -all"
then just do a "host
anothermachine.example.net" to see the ip of the
allowed mail server for sending mail for
example.net. I guess that would
in your case not be 0.0.0.0.
3. If the spf entry for
example.net is "v=spf1 ip:0.0.0.1 -all"
then sending from 0.0.0.0 will never be accepted.
Sure you can combine those as you want, there is a limit on how many you
can have in a spf record (to overcome that you use includes, but over 10
layers of include will cause problems).
If things are wrongly setup, then you may have "v=spf1 mx:
example.net
-all ip:0.0.0.0"
in this case it's only the MX entries for the
example.net that are
allowed to send, as the -all comes before the ip:0.0.0.0 which means it
should be ignored.
My guess is that you seen the MX and think it means that
exampl.net
itself can send mail, but that really depends if it's included among the
MX records for the domain or not.
This was described in the link I posted in my first reply to this thread.
--
//Aho