Score:0

Postfix to gmail relay - preserving the sender's address

sc flag

Relayed emails come 'from' [email protected], not [email protected], so I cannot reply.

I have several domains and am using Postfix to relay emails sent to [email protected] on to [email protected] as outlined in Your own mail server with Postfix leveraging Gmail as storage (via smtp.gmail.com). I have additionally set up Gmail aliases to send emails as [email protected] and it almost all works brilliantly. However, I cannot reply to emails in my Gmail inbox, sent to my aliases, as the 'from' information gets overwritten with my Gmail email address instead of that of the actual sender.

Is it possible to ensure the sender's email address propagates in the relay or is this the stage where I have to buy a Workspace subscription?

Score:0
gr flag

Gmail and many mail services do this for obvious spam reasons. Gmail is not legitimate to send emails "From: [email protected]" if the owner of theirdomain.com has not explicitly allowed Gmail to do that that (through SPF by instance), and if it did, it is only for its own purpose, not for other Gmail users (you). This is seen as sender spoofing.

A Workspace subscription will permit you to send emails "From: [email protected]" if you own yourdomain.com and you have got it verified, but you will still be unable to send emails "From: [email protected]".

You should use the "Reply-to" header in your case.

Megalomatt avatar
sc flag
Thank you, however, I think you misread the question. I do not want to send emails as [email protected], I want to reply to them.
gr flag
You need a postfix rule to put the initial From value into the Reply-to header before sending the mail to Gmail's servers.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.