Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9804

Set Postfix myorigin to the domain that sent the email for multiple domains (Google Workspace SMTP Relay) [closed]

$
0
0

I have a Google Workspace account that has multiple sites running on one user. I have aliases setup for gmail.

I've setup a Google Workspace SMTP Relay to send emails from my linux server for systems like Wordpress using postfix.

It works fine with postfix and emails get sent. However, the problem is that all emails are being mailed by the default domain of the Google Workspace account, because the myorigin setting points to it, e.g default.com.

Here are my postfix/main.cf settings:

myorigin = /etc/mailnamemydestination =  localhostrelayhost = [smtp-relay.gmail.com]:587mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128mailbox_size_limit = 0recipient_delimiter = +inet_interfaces = allinet_protocols = all

In the file /etc/mailname, default.com is the entry. If I change it to say domain-2.com then emails will be sent from domain-2.com. But all my sites will also send emails from domain-2.com.

What I want to happen is for every email to be mailed by the appropriate domain. So if domain-3's Wordpress sends an email I want it to be mailed by domain-3.com rather than domain-2.com or whatever is in /etc/mailname

Adding multiple domains to the /etc/mailname file doesn't seem to work.

I also tried

myorigin = localhostmyorigin = localdomainmyorigin = localhost.localdomain

How can I accomplish this?


Viewing all articles
Browse latest Browse all 9804

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>