I have postfix running and directing mail to a smarthost at my ISP. I would like email with a particular outgoing email address to be forwarded to another server, specifically GMail; all the rest through the ISP. e.g. Outgoing mail labelled From: X@gmail.com should be sent via the X account on GMail, rather than through the ISP. This is fairly straightforward on end-user mail clients, so hopefully I just missed the obvious for postfix. Only one such address need be supported for this.

  • see stackoverflow.com/questions/19775648/… – cas Oct 22 '15 at 2:02
  • note that sender-based routing is based on the envelope sender address, which may or may not be the same as the From: header in the message. As far as mail routing is concerned, headers are irrelevant - only the envelope matters. – cas Oct 22 '15 at 2:03
  • The other question gives me a lead. Not sure what the envelope From header is when it leaves mutt, this might be something set by Postfix. – casualunixer Oct 22 '15 at 3:12
  • by default, mutt uses the From: header as the envelope sender, but there are ways to override that. and mutt isn't the only thing that can send mail on a system. The point of my comment was that i was highlighting the difference between headers and envelope, which IME is one thing about mail that many people either don't know about or have difficulty understanding. – cas Oct 22 '15 at 3:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.