I installed a web server using Postfix, Dovecot, Roundcube Apache2 and Ubuntu 20. I created spf record (v=spf1 mx ~all), default._domainkey record and a _dmarc record in my all domains' DNS panels.
When I send an email from one of these accounts to GMail, it appears in spam folder. I clicked "show original" and got my primary email address, not the address which I'd sent from:
Received: from mail.myprimarydomain ([IP])
Roundcube displays correct user name and default identity but it displays my primary hostname for the host.
Do I have to set rDNS? If so do I have to run two machines? (I have only one right now)
How can I use own host name for each mail servers?