Linux – Postfix smtp relay + original sender address

email-servergmaillinuxmail-forwardingpostfix

This is my setup:

ArchLinux box
Postfix, setup with smtp relay as described here / gmailrelay@gmail.com (example, not actual. read on)
Dynamic DSL IP from my ISP
DynDNS account / ddclient to refresh my IP

This setup works fine. I can send mail from my local accounts from my ArchLinux box to the outside world.

However: I would like the "From" email address to show localuser@myaccount.dyndns.org instead of gmailrelay@gmail.com so I can reply directly to my box, instead to that Gmail account I don't even check.
Is this possible with postfix?

P.S. I don't want to forward mails from Gmail 🙂
P.P.S. I have already tried sending directly to localuser@myaccount.dyndns.org using my personal Gmail account, and that works too.

Best Answer

I think tour Postfix is already sending your mails with the right from address. GMail is probably rewriting the from address to your GMail address.

It might work if you add the desired from address as a "send mail as" email address in your GMail account settings. https://support.google.com/mail/bin/answer.py?hl=en&ctx=mail&answer=22370

Related Topic