SPF softfail in received mail

rutsagig

New Member
Sep 5, 2020
2
0
1
40
I have a mail VPS server and I'm installed PMG on another VPS to test it. I have a config like this:

PMG server: pmg.server.com (IP 5.5.5.5)
Default relay: mail.server.com (IP: 1.1.1.1)
Realydomain: mydomain.com
Trusted networks: Mail server IP (I think this is not mandatory)
I didn't change anything else yet.

I point mydomain.com MX record to PMG server and it's working, but all mail I receive fails SPF, since origin IP is always PMG server IP. E.g.
If I send mail from me@gmail.com to me@mydomain.com I receive it with this headers:

Code:
Received-SPF: softfail (gmail.com ... _spf.google.com: Sender is not authorized by default to use 'me@gmail.com' in 'mfrom' identity, however domain is not currently prepared for false failures (mechanism '~all' matched)) receiver=mail.server.com; identity=mailfrom; envelope-from="me@gmail.com"; helo=pmg.server.com; client-ip=5.5.5.5

Received: from pmg.server.com (pmg.server.com [5.5.5.5])

    by mail.server.com (Postfix) with ESMTP id 199DE3EDE2

    for <me@mydomain.com>; Thu, 10 Sep 2020 17:21:33 +0200 (CEST)

Received: from pmg.server.com (localhost.localdomain [127.0.0.1])

    by pmg.server.com (Proxmox) with ESMTP id DCC7041D1E

    for <me@mydomain.com>; Thu, 10 Sep 2020 17:21:32 +0200 (CEST)

Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42])

    by pmg.server.com (Proxmox) with ESMTP id C106841D1D

    for <me@mydomain.com>; Thu, 10 Sep 2020 17:21:27 +0200 (CEST)

Received: by mail-wr1-f42.google.com with SMTP id o5so7083964wrn.13

    for <me@mydomain.com>; Thu, 10 Sep 2020 08:21:27 -0700 (PDT)


Received: from [192.168.1.200] ()

    by smtp.googlemail.com with ESMTPSA id m3sm4825713wme.31.2020.09.10.08.21.20

    for <me@mydomain.com>

    (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);

    Thu, 10 Sep 2020 08:21:20 -0700 (PDT)

To: me@mydomain.com

From: Me <me@gmail.com>

Subject: testing

X-Spamd-Bar: ++

X-Spam-Level: **

Authentication-Results: mail.server.com;

    dkim=pass header.d=gmail.com header.s=20161025 header.b=P8T51Srz;

    dmarc=pass (policy=none) header.from=gmail.com;

    spf=softfail (mail.server.com: 5.5.5.5 is neither permitted nor denied by domain of me@gmail.com) smtp.mailfrom=me@gmail.com

I have SPF softfail with all senders, even with certain domains (like me@myisp.com) I don't receive mails, I get this in mail.log:

Code:
to=<me@mydomain.com>, relay=mail.server.com[1.1.1.1]:25, delay=0.45, delays=0.01/0.03/0.01/0.4, dsn=5.7.1, status=bounced (host mail.server.com[1.1.1.1] said: 550 5.7.1 <me@mydomain.com>: Recipient address rejected: Please see http://www.openspf.net/Why?s=mfrom;id=me%40myisp.com;ip=1.1.1.1;r=mail.server.com (in reply to RCPT TO command))

pmg postfix/smtp[20436]: A81D441D1D: to=<me@myisp.com>, relay=mx1.myisp.com[130.117.53.188]:25, delay=8.2, delays=0/0/0.48/7.7, dsn=2.0.0, status=sent (250 OK id=1kGLV6-0007PI-8s)

How can I solve this?
 
Add PMG as trusted relay on mail server?
What if my mail server is a reseller where I don't have admin rights?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!