Search code examples
gmailpostfix-mta

set sender address in postfix smtp relay


I have setup postfix locally on my Linux box, it relays to my gmail account. This works nicely thanks to http://www.howtoforge.com/postfix_relaying_through_another_mailserver

However I would like to be able to specify the sender address (From:), I could not figure out what I needed to do. Does anyone knows how I can specify any of my (pre)configured valid gmail address ? All I could find is this: http://support.google.com/mail/bin/answer.py?hl=en&answer=22370

Thanks


Solution

  • I did post this question to the debian-users group and got the following answer:

    You can specify any headers with -a, e.g.

    $ mail -a 'From: "My Name" ' da

    http://lists.debian.org/debian-user/2012/04/msg00993.html

    Which works beautifully