0

This is my setup:

ArchLinux box
Postfix, setup with smtp relay as described here / [email protected] (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 [email protected] instead of [email protected] 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 [email protected] using my personal Gmail account, and that works too.

2 Answers 2

2

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

5
  • But i have several users on that computer... user1, user2, user3, and I can only set one address as "sand as"
    – Kaurin
    Mar 7, 2012 at 22:49
  • Ok, now i'm pretty sure postfix is doing this. I have set "send mail as" and i still get the gmail address as the reply address.
    – Kaurin
    Mar 8, 2012 at 16:42
  • Strange, I assume you verified the send as and all? You should check what's going on in the log, probably /var/mail.log. To see the complete smtp conversation between postfix and smtp.gmail.com, increase postfix smtp verbosity by adding a -v behind the smtp unix - - - - - smtp line in /etc/postfix/master.cf. (Doc)
    – user113226
    Mar 8, 2012 at 18:11
  • i have added the -v. here is the pastebin pastebin.com/7spSDj58
    – Kaurin
    Mar 8, 2012 at 19:26
  • No, Google will change it unless you have business account under your own domain name.
    – symcbean
    Jul 2, 2023 at 0:39
1

I have a similar setup and wanted the same result - emails to appear to be from the original sender, not my relay gmail user. It is definitely postfix sending the relay user to google:

Mar 22 12:44:16 mail postfix/smtp[22507]: < smtp.gmail.com[142.250.115.108]:587: 235 2.7.0 Accepted
Mar 22 12:44:16 mail postfix/smtp[22507]: smtp_stream_setup: maxtime=300 enable_deadline=0
Mar 22 12:44:16 mail postfix/smtp[22507]: > smtp.gmail.com[142.250.115.108]:587: MAIL FROM:<[email protected]> SIZE=4093
Mar 22 12:44:16 mail postfix/smtp[22507]: > smtp.gmail.com[142.250.115.108]:587: RCPT TO:<[email protected]>

Yes, in this example I am sending to the relayuser.

After combing through postfix configuration man pages, this does not appear to be possible. Next step is to read through the source to see if there is an undocumented feature available.

Just my thought process, your mileage may vary.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .