Try,

mydomain = example.com
postfix reload

Marius.

-----Original Message-----
From: [email protected] [mailto:[email protected]] 
On Behalf Of Gabor Szabo
Sent: Thursday, May 8, 2014 2:12 PM
To: [email protected]
Subject: Setting the domain name of outgoing e-mail

hi,

I have just set up an Ubuntu 14.04 and installed postfix using aptitude install 
postfix.
When I send an e-mail (as root) to a gmail account it arrives from 
root@localhost

I tried to configure it to send as [email protected] but the only way I managed 
to make it work isn't really right. In /etc/postfix/main.cf I had

   myorigin = /etc/mailname
and /etc/mailname had example.com in it but that did not help.
I tried setting
    myorigin = example.com
and tried

 myorigin = $mydomain

but I still got the mail from root@localhost.

The only way I could convince it to send from [email protected] was to add

162.243.46.210 example.com

to the /etc/hosts  file. This is not really acceptable as example.com should 
resolve to another IP address and not to this machine.

Am I doing something incorrectly?
How could I convince postfix to use the content of mydomain as the domain name 
when sending e-mail?

regards
    Gabor

Reply via email to