How to set sending domain for generated mails due spf?

czechsys

Renowned Member
Nov 18, 2015
441
50
93
For pmg generated mails i see From: pmg.domain.tld. Where in gui i can set something as "mydomain" for postfix (dns.domain in template?), so pmg generated mails can align to mydomain spf record? Can't find it.
 
Hey,

you can't really use domains in your SPF record, what you can add is something like a:A.EXAMPLE.COM, but that will just be the IP that IPv4 address that A.EXAMPLE.COM resolves to. With SPF the mailserver's IP is checked, and that is not something you really configure in postfix on your mailserver/PMG.

edit: In case you are interested, here [1] is the SPF record spec.

[1] https://datatracker.ietf.org/doc/html/rfc7208#section-3
 
Last edited:
I will rewrite use-case. Pmg send mail for example: From: root@pmg.domain.tld.
I need to send as root@domain.tld so spf will allign with _spf.domain.tld., because in now it's trying to find _spf.pmg.domain.tld record and spf check fail.

Code:
Hi mail server Neo! My hostname is pmg-01.domain.tld and I want to deliver an email on behalf of root@pmg-01.domain.tld.
The HELO/EHLO identity and the domain part of the sender address (pmg-01.domain.tld), officially referred to as RFC5321.MailFrom (also known as Return-Path, Bounce Address, or Envelope From), are used to check the domain's SPF policy. This policy is defined in a DNS TXT record specifying the IP addresses authorized to send emails on behalf of the domain.


neo.learndmarc.com
>> Running SPF
------------------
I couldn't find a valid SPF policy at pmg-01.domain.tld using the identity RFC5321.MailFrom. The Auth Result is none.
 
Last edited: