I want email to come from
email@example.com but they are currently coming from
From Postfix documentation:
What domain name to use in outbound mail
The myorigin parameter specifies the domain that appears in mail that is posted on this machine. The default is to use the local machine name, $myhostname, which defaults to the name of the machine. Unless you are running a really small site, you probably want to change that into $mydomain, which defaults to the parent domain of the machine name.
For the sake of consistency between sender and recipient addresses, myorigin also specifies the domain name that is appended to an unqualified recipient address.
Examples (specify only one of the following):
myorigin = $myhostname (default: send mail as "user@$myhostname")
myorigin = $mydomain (probably desirable: "user@$mydomain")
In /etc/postfix/main.cf I have:
myhostname = mail.example.com
mydomain = example.com
myorigin = $mydomain
Dispite what the documents said, my mail is showing as from
I have run
sudo /etc/init.d/postfix restart after making changes to the
main.cf file. Is there another parameter that needs to be set? I have read through the documentation and it seems pretty clear but my result is not consistent with what is described in the document. Thanks for any help.
ps, this is running on Ubuntu 14.04 on an Amazon ec2 instance, with an elastic IP and proper MX records. Mail is being both sent and received. I am sending mail using:
additional info, if it matters. At the command prompt:
user@mail:$ hostname mail user@mail:$ hostname -f mail.example.com user@mail:$ postconf myorigin myorigin = $mydomain user@mail:$ postconf mydomain mydomain = example.com