While it is certainly possible to masquerade messages from your Postfix server using the "myorigin" parameter, it may have some undesirable side effects like you needing to also set up Postfix to receive email for the masqueraded domain using the "mydestination" parameter. In addition, using this approach is an all or nothing choice (except for the root user who remains exposed from the real origin).
Instead, if you want to be able to just masquerade a few user accounts, so that it appears that emails from these accounts are masqueraded and not all, then the Postfix "generic" option may be for you.
When I send email from the command line in Linux (Fedora 14) from my keith account (to an address not on my machine), I want it to appear that the email originated from my wright.keith@gmail account. Otherwise, most likely my email will get bounced because it will appear to have come from firstname.lastname@example.org.
Here's what I did to achieve this:
1. I added these two lines to the /etc/postfix/generic file:
2. I added this line to /etc/postfix/main.cf:
smtp_generic_maps = hash:/etc/postfix/generic
3. I executed this command as root to hash the generic file into generic.db:
4. I restarted postfix to make the changes effective:
service postfix restart
Thanks to this wonderful tip from nixcraft.com (not sure why the url is cyberciti.biz):