Why doesn't SPF?

Set up TXT record in DNS:
@ "v=spf1 +a include:_spf.google.com -all"

In postfix is forwarding test@domain.ru mail mymail@gmail.com
The email falls in spam:
google.com: domain of transitioning mymail@gmail.com IPOFMYSERVER does not designate as permitted sender)


What am I doing wrong? Or we have to wait 72 hours?

dig TXT mydomain.com
and viewdns.info/dnsrecord/?domain=mydomain.com

Show: "v=spf1 +a include:_spf.google.com -all"

spoiler

Delivered-To: target@gmail.com
Received: by with SMTP id 10.64.166.8 zc8csp729648ieb;
Fri, 29 Apr 2016 04:51:01 -0700 (PDT)
X-Received: by with SMTP id 10.194.230.69 sw5mr21150135wjc.144.1461930661579;
Fri, 29 Apr 2016 04:51:01 -0700 (PDT)
Return-Path:
Received: from mydomain.com ([46.101.247.118])
by mx.google.com with ESMTP id m14si16984275wjw.192.2016.04.29.04.51.01
for ;
Fri, 29 Apr 2016 04:51:01 -0700 (PDT)
Received-SPF: softfail (google.com: domain of transitioning mygmail@gmail.com 46.101.247.118 does not designate as permitted sender) client-ip=46.101.247.118;
Authentication-Results: mx.google.com;
spf=softfail (google.com: domain of transitioning mygmail@gmail.com 46.101.247.118 does not designate as permitted sender) smtp.mailfrom=mygmail@gmail.com
Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50])
by mydomain.com (Postfix) with ESMTPS id D1A8212021B
for ; Fri, 29 Apr 2016 14:51:00 +0300 (MSK)
Received: by mail-lf0-f50.google.com with SMTP id j11so131086508lfb.1
for ; Fri, 29 Apr 2016 04:51:00 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-gm-message-state:mime-version:reply-to:date:message-id:subject
:from:to;
bh=p+mmTW1hPWVgJY5gdnhI1FVxrF+tV0EdNaJGsNSB/rA=;
b=GhdkhxTo3gHHP2RgAE+csoeuoBBatdYEThJGPRHnnXNzDGZQqiduhehsmd4zna5nyx
IzisvQLKLOZVr7wj/4HioTIq25wC4St1tMFK2XrXEWHvPk3Fb4cqauoie82/cJuV7G1B
fW1yT2E9rp2hKj0jh14+62yN3/sLS3RRLTi1G0LS2zJUCh9fGohHptfDvAhvnuixmb5a
4eKDj66Cg48u9YpW3iV8CXjVtKLX4nIL6syca7+w1xqWMrsF2rtVRLjc9JMmGz5/CV27
pHr4qZ9cQ5lsPlNgL694nupVWzMHtZ3Gycfl+8/lu/2gGvrC07ckYe7zbSU7Q9OoQCsk
mvDA==
X-Gm-Message-State: AOPr4FXmOxKf+u2eSjw8EEcPEv1n0vn4jvZCfHTtEO2Onfy1bd5escgscn+VaWBolaQc9w==
X-Received: by with SMTP id 10.112.72.42 a10mr1093893lbv.111.1461930659912;
Fri, 29 Apr 2016 04:50:59 -0700 (PDT)
Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com. [209.85.215.52])
by smtp.gmail.com with ESMTPSA id z8sm2227525lbv.42.2016.04.29.04.50.59
for
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Fri, 29 Apr 2016 04:50:59 -0700 (PDT)
Received: by mail-lf0-f52.google.com with SMTP id j11so131085989lfb.1
for ; Fri, 29 Apr 2016 04:50:59 -0700 (PDT)
MIME-Version: 1.0
X-Received: by with SMTP id 10.112.235.195 uo3mr7269922lbc.18.1461930659172;
Fri, 29 Apr 2016 04:50:59 -0700 (PDT)
Reply-To: mygmail@gmail.com
Received: by 10.25.83.10 with HTTP; Fri, 29 Apr 2016 04:50:59 -0700 (PDT)
Date: Fri, 29 Apr 2016 14:50:59 +0300
X-Gmail-Original-Message-ID:
Message-ID:
Subject: GUGOGOGIOG
From: "mygmail@gmail.com"
To: mail@mydomain.com
July 12th 19 at 17:05
3 answers
July 12th 19 at 17:07
and which domain is registered in the settings of postfix?
you can still see what I will say here https://www.mail-tester.com/
there's enough detail to describe the problem

and what is the PTR of Your IP ?
Specified in postfix virtual:

mail@mydomain.com target@gmail.com - veda26 commented on July 12th 19 at 17:10
Mail-tester is not sent in this way, writing in response: "we do Not specify how the SS or VSS", and as normally configured through postfix does not know. - veda26 commented on July 12th 19 at 17:13
Although maybe you should try using sendmail? - veda26 commented on July 12th 19 at 17:16
The PTR: dig -x my ip? - veda26 commented on July 12th 19 at 17:19
Yes, that's how - Robert.Schamberger18 commented on July 12th 19 at 17:22
:
; <<>> DiG 9.9.5-3ubuntu0.8-Ubuntu <<>> -x 46.101.247.118
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 37932
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;118.247.101.46.in-addr.arpa. IN PTR

;; AUTHORITY SECTION:
247.101.46.in-addr.arpa. 1799 IN SOA ns1.digitalocean.com. hostmaster.247.101.46.in-addr.arpa. 1461924619 10800 3600 604800 1800

;; Query time: 35 msec
;; SERVER: 2001:4860:4860::8844#53(2001:4860:4860::8844)
;; WHEN: Sun May 01 03:43:18 MSK 2016
;; MSG SIZE rcvd: 123
- veda26 commented on July 12th 19 at 17:25
: You would do well to add a reverse entry for your IP, because now it is not, and it's actually a big problem, if You want to send emails from your server - Robert.Schamberger18 commented on July 12th 19 at 17:28
July 12th 19 at 17:09
Full title coming the letters show, please.
Updated the full title in question under the spoiler. - veda26 commented on July 12th 19 at 17:12
Received-SPF: softfail (google.com: domain of transitioning mygmail@gmail.com 46.101.247.118 does not designate as permitted sender) client-ip=46.101.247.118;

you need to make the IP address in the SPF record. - veda26 commented on July 12th 19 at 17:15
: this ip is listed in A record. - veda26 commented on July 12th 19 at 17:18
domain prompt. - veda26 commented on July 12th 19 at 17:21
: fedos.top - Robert.Schamberger18 commented on July 12th 19 at 17:24
1. You don't have to send mail to gmail from gmail account
2. You need as from to use the box from the domain fedos.top , now is mymail@gmail.com that is clearly felitsa. - veda26 commented on July 12th 19 at 17:27
July 12th 19 at 17:11
You have a strange letter, I wonder how you have shaped it.
You palitsya not SPF, you felitsa DMARC for your domain gmail.com. Felitsa DMARC because the e-mail is not DKIM signed, although sent through the web interface and GMail'. And it's not DKIM signed is likely because the From: is formed with an error.
From: "mygmail@gmail.com"
there should not be double quotes. Or
From: mygmail@gmail.com
or
From: "My Name" <mygmail@gmail.com></mygmail@gmail.com>

PS And SPF mydomain.com this letter does not affect at all, i.e. the SPF checked domain gmail.com your IP there, of course not, he will always be felitsa on the redirection if you address the envelope to overwrite will not.
DMARC felitsa if not one of SPF or DKIM didn't pass.
I understand that the fall in spam emails, not from web gmail and Postfix when sending to gmail - veda26 commented on July 12th 19 at 17:14
: DMARC felitsa, if you do not pass DMARC, SPF and DKIM SPF. DMARC-SPF will never pass on redirects, because even if you overwrite the address of the SMTP envelope for your pass and SPF (to be Received-SPF: softfail domain mydomain.com) will differ by domain and SPF domain of the from: that is unacceptable DMARC and DMARC SPF sfeylitsya although SPF pass. There's nothing to do, so sort it out, why not DKIM. DKIM on the forwarding persists, if the DKIM signature, the letter will pass DMARC. - veda26 commented on July 12th 19 at 17:17
Will Received-SPF: pass I wanted to say - veda26 commented on July 12th 19 at 17:20
: I sent it from gmail.

So You suggest to try to configure DKIM signature in postfix?
If I understand correctly, it will still felitsa, since DKIM must be signed by the sender, not the redirector(that is, in my case gmail server, not postfix) - veda26 commented on July 12th 19 at 17:23
: No, DKIM in your Postfix here is irrelevant. If you are sending emails with the address @gmail.com - send via GMail login while create a valid title in your letter the wrong From: header. Other sposobu send email from @gmail.com without breaking DMARC no. - Robert.Schamberger18 commented on July 12th 19 at 17:26
: that is the only option to do the authorization server and via it is normal to enter in settings-accounts to gmail? - veda26 commented on July 12th 19 at 17:29
: I can't answer this question because I don't know exactly how and where you generate the letter and how submitte it in Gmail. - Robert.Schamberger18 commented on July 12th 19 at 17:32
: added, as in this statement - veda26 commented on July 12th 19 at 17:35
so the question is not how you set up Postfix, but how you original email created because he From: and broken DKIM signature no. - felicita.Keeling65 commented on July 12th 19 at 17:38
: so I gave a link with an anchor, which describes just how I did it.

Thank you very much for the clarification. I'll try to raise himself from the smtp authorization and view - will it work. How to do - close the question. Thanks again. - veda26 commented on July 12th 19 at 17:41
: if you have set up as in the instructions, then just fix the generation of the letter - remove unnecessary double quotes in the From: and it should work. - felicita.Keeling65 commented on July 12th 19 at 17:44
: where exactly to change the generate letter? postfix does not generate anything, it just redirects. And generates letters yourself gmail in it then I change nothing. - veda26 commented on July 12th 19 at 17:47
: so you just go to the web interface GMail'and write a letter and you get a letter with double quotes in the From: around address and no user name?
From: "mygmail@gmail.com" - felicita.Keeling65 commented on July 12th 19 at 17:50
Yes. Tried to write You in icq, but I somehow blocked. The new check did not help. - Robert.Schamberger18 commented on July 12th 19 at 17:53
a, place the spoiler in the post as code. You have obviously lost all that was in angle brackets. - lolita commented on July 12th 19 at 17:56

Find more questions by tags E-mailMail serverSPFSystem administration