Is it possible to configure postfix to set the envelope From/Sender field to the virtualhost domain from which the email originates? In my current config, it sends from mail.myserver.com. I would like it to simply send from my-virtualhost-domain.com, (set dynamically).
The reason for this is that I would like to eliminate the “sent via mail.myserver.com” messages and also reduce false spam flags by setting SPF per virtualhost domain.
Maybe I’m just trying to accomplish the wrong thing. The problem is that when “mail.myserver.com” sends an email on behalf of “vhost1.com”, an SPF record on mail.myserver.com isn’t enough to pacify many spam filters, Office365 in particular.
If anyone has any suggestions, I’d love to hear them.
That’s correct. An RDNS for mail.server.tld must be in place and DKIM for the domain which sends mail via mail.server.tld.
The IP address should not be recently blacklisted. The IP block to which the IP address belongs should not be tainted and it helps if a few (hundred or thousand) recipients specifically whitelist the email address from which mail is being sent; or at least add it to their address books.